libisofs
1.5.4
About: libisofs is a library to create an ISO 9660 filesystem, supports extensions like RockRidge or Joliet, makes bootable ISO 9660, and records file attributes which are of interest for data backups.
![]() ![]() |
#include "../libisofs.h"
#include "../filter.h"
#include "../fsource.h"
#include "../util.h"
#include "../stream.h"
#include <sys/types.h>
#include <sys/time.h>
#include <sys/wait.h>
#include <unistd.h>
#include <stdio.h>
#include <errno.h>
#include <string.h>
Go to the source code of this file.
Data Structures | |
struct | GzipFilterRuntime |
struct | GzipFilterStreamData |
Functions | |
static int | gzip_stream_uncompress (IsoStream *stream, void *buf, size_t desired) |
static int | gzip_stream_close_flag (IsoStream *stream, int flag) |
static int | gzip_stream_close (IsoStream *stream) |
static int | gzip_stream_open_flag (IsoStream *stream, int flag) |
static int | gzip_stream_open (IsoStream *stream) |
static int | gzip_stream_convert (IsoStream *stream, void *buf, size_t desired, int flag) |
static int | gzip_stream_compress (IsoStream *stream, void *buf, size_t desired) |
static off_t | gzip_stream_get_size (IsoStream *stream) |
static int | gzip_stream_is_repeatable (IsoStream *stream) |
static void | gzip_stream_get_id (IsoStream *stream, unsigned int *fs_id, dev_t *dev_id, ino_t *ino_id) |
static void | gzip_stream_free (IsoStream *stream) |
static int | gzip_update_size (IsoStream *stream) |
static IsoStream * | gzip_get_input_stream (IsoStream *stream, int flag) |
static int | gzip_clone_stream (IsoStream *old_stream, IsoStream **new_stream, int flag) |
static int | gzip_cmp_ino (IsoStream *s1, IsoStream *s2) |
static int | gzip_uncompress_cmp_ino (IsoStream *s1, IsoStream *s2) |
int | gzip_add_filter (IsoFile *file, int flag) |
int | iso_file_add_gzip_filter (IsoFile *file, int flag) |
Install a gzip or gunzip filter on top of the content stream of a data file. More... | |
int | iso_gzip_get_refcounts (off_t *gzip_count, off_t *gunzip_count, int flag) |
Inquire the number of gzip compression and uncompression filters which are in use. More... | |
Variables | |
static off_t | gzip_ref_count = 0 |
static off_t | gunzip_ref_count = 0 |
IsoStreamIface | gzip_stream_compress_class |
IsoStreamIface | gzip_stream_uncompress_class |
int gzip_add_filter | ( | IsoFile * | file, |
int | flag | ||
) |
Definition at line 764 of file gzip.c.
References iso_file_add_filter(), iso_file_get_size(), iso_file_get_stream(), iso_file_remove_filter(), iso_stream_get_size(), ISO_SUCCESS, and ISO_ZLIB_NOT_ENABLED.
Referenced by iso_file_add_gzip_filter().
Definition at line 535 of file gzip.c.
References iso_stream::data, GzipFilterStreamData::id, ISO_OUT_OF_MEM, iso_stream_clone_filter_common(), ISO_STREAM_NO_CLONE, ISO_SUCCESS, GzipFilterStreamData::orig, GzipFilterStreamData::running, and GzipFilterStreamData::size.
Definition at line 615 of file gzip.c.
References iso_stream::class, gzip_stream_compress_class, iso_stream_cmp_ino(), and iso_stream_get_input_stream().
|
static |
Definition at line 231 of file gzip.c.
References gzip_stream_close_flag().
Referenced by gzip_stream_free(), and gzip_stream_get_size().
|
static |
Definition at line 195 of file gzip.c.
References iso_stream::class, iso_stream::data, gzip_stream_uncompress(), ISO_NULL_POINTER, iso_stream_close(), ISO_ZLIB_NOT_ENABLED, GzipFilterStreamData::orig, IsoStream_Iface::read, and GzipFilterStreamData::running.
Referenced by gzip_stream_close().
|
static |
Definition at line 416 of file gzip.c.
References gzip_stream_convert().
|
static |
Definition at line 316 of file gzip.c.
References iso_stream::data, GzipFilterRuntime::do_flush, GzipFilterRuntime::error_ret, GzipFilterRuntime::in_buffer, GzipFilterRuntime::in_buffer_size, GzipFilterRuntime::in_counter, ISO_FILE_NOT_OPENED, ISO_NULL_POINTER, iso_stream_read(), ISO_ZLIB_COMPR_ERR, ISO_ZLIB_EARLY_EOF, ISO_ZLIB_NOT_ENABLED, GzipFilterStreamData::orig, GzipFilterRuntime::out_buffer, GzipFilterRuntime::out_buffer_size, GzipFilterRuntime::out_counter, GzipFilterRuntime::rpt, and GzipFilterStreamData::running.
Referenced by gzip_stream_compress(), and gzip_stream_uncompress().
|
static |
Definition at line 490 of file gzip.c.
References iso_stream::class, iso_stream::data, gunzip_ref_count, gzip_ref_count, gzip_stream_close(), gzip_stream_uncompress(), iso_stream_unref(), GzipFilterStreamData::orig, IsoStream_Iface::read, and GzipFilterStreamData::running.
|
static |
Definition at line 477 of file gzip.c.
References iso_stream::data, GzipFilterStreamData::id, ISO_FILTER_FS_ID, and ISO_FILTER_GZIP_DEV_ID.
|
static |
Definition at line 429 of file gzip.c.
References iso_stream::class, iso_stream::data, gzip_stream_close(), gzip_stream_open_flag(), ISO_NULL_POINTER, IsoStream_Iface::read, and GzipFilterStreamData::size.
|
static |
|
static |
Definition at line 306 of file gzip.c.
References gzip_stream_open_flag().
|
static |
Definition at line 241 of file gzip.c.
References iso_stream::class, iso_stream::data, IsoStream_Iface::get_size, gzip_stream_uncompress(), ISO_FILE_ALREADY_OPENED, ISO_NULL_POINTER, iso_stream_open(), ISO_ZLIB_COMPR_ERR, ISO_ZLIB_NOT_ENABLED, GzipFilterStreamData::orig, GzipFilterRuntime::out_buffer, GzipFilterRuntime::out_buffer_size, IsoStream_Iface::read, GzipFilterStreamData::running, and GzipFilterStreamData::size.
Referenced by gzip_stream_get_size(), and gzip_stream_open().
|
static |
Definition at line 422 of file gzip.c.
References gzip_stream_convert().
Referenced by gzip_stream_close_flag(), gzip_stream_free(), and gzip_stream_open_flag().
Definition at line 634 of file gzip.c.
References iso_stream::class, gzip_stream_uncompress_class, iso_stream_cmp_ino(), and iso_stream_get_input_stream().
|
static |
int iso_file_add_gzip_filter | ( | IsoFile * | file, |
int | flag | ||
) |
Install a gzip or gunzip filter on top of the content stream of a data file.
gzip is a compression format which is used by programs gzip and gunzip. The filter will not be installed if its output size is not smaller than the size of the input stream. This is only enabled if the use of libz was enabled at compile time.
file | The data file node which shall show filtered content. |
flag | Bitfield for control purposes bit0= Do not install filter if the number of output blocks is not smaller than the number of input blocks. Block size is 2048. bit1= Install a decompression filter rather than one for compression. bit2= Only inquire availability of gzip filtering. file may be NULL. If available return 2, else return error. bit3= is reserved for internal use and will be forced to 0 |
Definition at line 819 of file gzip.c.
References gzip_add_filter().
int iso_gzip_get_refcounts | ( | off_t * | gzip_count, |
off_t * | gunzip_count, | ||
int | flag | ||
) |
Inquire the number of gzip compression and uncompression filters which are in use.
gzip_count | Will return the number of currently installed compression filters. |
gunzip_count | Will return the number of currently installed uncompression filters. |
flag | Bitfield for control purposes, unused yet, submit 0 |
Definition at line 826 of file gzip.c.
References gunzip_ref_count, gzip_ref_count, and ISO_SUCCESS.
|
static |
Definition at line 139 of file gzip.c.
Referenced by gzip_stream_free(), and iso_gzip_get_refcounts().
|
static |
Definition at line 136 of file gzip.c.
Referenced by gzip_stream_free(), and iso_gzip_get_refcounts().
IsoStreamIface gzip_stream_compress_class |
Definition at line 580 of file gzip.c.
Referenced by gzip_cmp_ino().
IsoStreamIface gzip_stream_uncompress_class |
Definition at line 597 of file gzip.c.
Referenced by gzip_uncompress_cmp_ino().