|
libsquashfs 1.3.0
A new set of tools and libraries for working with SquashFS images
|
Encapsultes a compressor with a simple interface to compress or extract chunks of data. More...
#include <compressor.h>


Data Fields | |
| sqfs_object_t | base |
| void(* | get_configuration )(const sqfs_compressor_t *cmp, sqfs_compressor_config_t *cfg) |
| Get the current compressor configuration. | |
| int(* | write_options )(sqfs_compressor_t *cmp, sqfs_file_t *file) |
| Write compressor options to disk if non-default settings have been used. | |
| int(* | read_options )(sqfs_compressor_t *cmp, sqfs_file_t *file) |
| Read compressor options from disk. | |
| sqfs_s32(* | do_block )(sqfs_compressor_t *cmp, const sqfs_u8 *in, sqfs_u32 size, sqfs_u8 *out, sqfs_u32 outsize) |
| Compress or uncompress a chunk of data. | |
Data Fields inherited from sqfs_object_t | |
| void(* | destroy )(struct sqfs_object_t *instance) |
| struct sqfs_object_t *(* | copy )(const struct sqfs_object_t *orig) |
Additional Inherited Members | |
Static Public Member Functions inherited from sqfs_object_t | |
| static SQFS_INLINE void | sqfs_destroy (void *obj) |
| Destroy an object and free all its memory. | |
| static SQFS_INLINE void * | sqfs_copy (const void *obj) |
| Create a deep copy of an object if possible. | |
Encapsultes a compressor with a simple interface to compress or extract chunks of data.
Definition at line 40 of file compressor.h.
| sqfs_object_t base |
Definition at line 41 of file compressor.h.
| sqfs_s32(* do_block) (sqfs_compressor_t *cmp, const sqfs_u8 *in, sqfs_u32 size, sqfs_u8 *out, sqfs_u32 outsize) |
Compress or uncompress a chunk of data.
| cmp | A pointer to a compressor object. |
| in | A pointer to the input buffer to read from. |
| size | The number of bytes to read from the input and compress. |
| out | The destination buffer to write the result to. |
| outsize | The available space in the destination buffer. |
Definition at line 92 of file compressor.h.
| void(* get_configuration) (const sqfs_compressor_t *cmp, sqfs_compressor_config_t *cfg) |
Get the current compressor configuration.
| cmp | A pointer to the compressor object. |
| cfg | A pointer to the object to write the configuration to. |
Definition at line 49 of file compressor.h.
| int(* read_options) (sqfs_compressor_t *cmp, sqfs_file_t *file) |
Read compressor options from disk.
| cmp | A pointer to a compressor object. |
| file | A file to read from. |
Definition at line 76 of file compressor.h.
| int(* write_options) (sqfs_compressor_t *cmp, sqfs_file_t *file) |
Write compressor options to disk if non-default settings have been used.
The options are stored in an uncompressed meta data block directly after the super block.
| cmp | A pointer to a compressor object. |
| file | A file to write to. |
Definition at line 66 of file compressor.h.