Squash
0.7.0
|
Function table for plugins. More...
Data Fields | |
SquashCodecInfo | info |
Capability information about the codec. | |
const SquashOptionInfo * | options |
options which may bo passed to the codec to modify its operation | |
SquashStream *(* | create_stream )(SquashCodec *codec, SquashStreamType stream_type, SquashOptions *options) |
Create a new SquashStream. More... | |
SquashStatus(* | process_stream )(SquashStream *stream, SquashOperation operation) |
Process a SquashStream. More... | |
SquashStatus(* | decompress_buffer )(SquashCodec *codec, size_t *decompressed_length, uint8_t decompressed[SQUASH_ARRAY_PARAM(*decompressed_length)], size_t compressed_length, const uint8_t compressed[SQUASH_ARRAY_PARAM(compressed_length)], SquashOptions *options) |
Decompress a buffer. More... | |
SquashStatus(* | compress_buffer )(SquashCodec *codec, size_t *compressed_length, uint8_t compressed[SQUASH_ARRAY_PARAM(*compressed_length)], size_t uncompressed_length, const uint8_t uncompressed[SQUASH_ARRAY_PARAM(uncompressed_length)], SquashOptions *options) |
Compress a buffer. More... | |
SquashStatus(* | compress_buffer_unsafe )(SquashCodec *codec, size_t *compressed_length, uint8_t compressed[SQUASH_ARRAY_PARAM(*compressed_length)], size_t uncompressed_length, const uint8_t uncompressed[SQUASH_ARRAY_PARAM(uncompressed_length)], SquashOptions *options) |
Compress a buffer. More... | |
size_t(* | get_uncompressed_size )(SquashCodec *codec, size_t compressed_length, const uint8_t compressed[SQUASH_ARRAY_PARAM(compressed_length)]) |
Get the buffer's uncompressed size. More... | |
size_t(* | get_max_compressed_size )(SquashCodec *codec, size_t uncompressed_length) |
Get the maximum compressed size. More... | |
void(* | _reserved1 )(void) |
Reserved for future use. | |
void(* | _reserved2 )(void) |
Reserved for future use. | |
void(* | _reserved3 )(void) |
Reserved for future use. | |
void(* | _reserved4 )(void) |
Reserved for future use. | |
void(* | _reserved5 )(void) |
Reserved for future use. | |
void(* | _reserved6 )(void) |
Reserved for future use. | |
void(* | _reserved7 )(void) |
Reserved for future use. | |
void(* | _reserved8 )(void) |
Reserved for future use. | |
Function table for plugins.
This struct should only be used from within a plugin.
This structure may grow over time to accomodate new features, so when setting up the callbacks in a plugin you must set each field individually instead of copying an entire instance of the struct.
SquashCodecImpl::compress_buffer |
Compress a buffer.
codec | The codec. |
uncompressed | The uncompressed data. |
uncompressed_length | The length of the uncompressed data. |
compressed | Buffer in which to store the compressed data. |
compressed_length | Location of the buffer size on input, used to store the length of the compressed data on output. |
options | Compression options (or NULL) |
SquashCodecImpl::compress_buffer_unsafe |
Compress a buffer.
Plugins implementing this function can be sure that compressed is at least as long as the maximum compressed length for a buffer of uncompressed_length bytes.
codec | The codec. |
uncompressed | The uncompressed data. |
uncompressed_length | The length of the uncompressed data. |
compressed | Buffer in which to store the compressed data. |
compressed_length | Location of the buffer size on input, used to store the length of the compressed data on output. |
options | Compression options (or NULL) |
SquashCodecImpl::create_stream |
Create a new SquashStream.
codec | The codec. |
stream_type | The type of stream to create. |
options | The stream options. |
SquashCodecImpl::decompress_buffer |
Decompress a buffer.
codec | The codec. |
compressed | The compressed data. |
compressed_length | The length of the compressed data. |
uncompressed | Buffer in which to store the uncompressed data. |
uncompressed_length | Location of the buffer size on input, used to store the length of the uncompressed data on output. |
options | Decompression options (or NULL) |
SquashCodecImpl::get_max_compressed_size |
Get the maximum compressed size.
codec | The codec. |
uncompressed_length | Size of the uncompressed data. |
SquashCodecImpl::get_uncompressed_size |
Get the buffer's uncompressed size.
codec | The codec. |
compressed | Compressed data. |
compressed_length | Compressed data length (in bytes). |
SquashCodecImpl::process_stream |
Process a SquashStream.
stream | The stream. |
operation | The operation to perform. |