Expand description
Crate wrapping miniz_oxide in a C API that mimics the C API of the original miniz. Originally designed to allow use of miniz_oxide as a back-end to the flate2 crate.
The C API is in a bit of a rough shape currently.
Modules§
- lib_
oxide - This module mainly contains functionality replicating the miniz higher level API.
Macros§
- unmangle
- Unmangle the wrapped functions if no_c_export is not defined.
For benchmarks, and other comparisons where we want to have both the miniz and miniz_oxide
functions available, functions shouldn not be marked
no_mangle
since that will cause conflicts.
Structs§
- mz_
stream - Inner stream state containing pointers to the used buffers and internal state.
- tdefl_
compressor - Main compression struct. Not the same as
CompressorOxide
#[repr(C)] - tinfl_
decompressor
Enums§
- CAPI
Compression Level - CAPI
Compression Strategy - CAPI
Flush - Deflate flush modes.
- CAPI
Return Status - MZError
- A list of miniz failed status codes.
- MZFlush
- A list of flush types.
- MZStatus
- A list of miniz successful status codes.
- tdefl_
flush - tinfl_
status
Constants§
Functions§
- miniz_
def_ ⚠alloc_ func - Default allocation function using
malloc
. - miniz_
def_ ⚠free_ func - Default free function using
free
. - miniz_
def_ ⚠realloc_ func - mz_
adler32 ⚠ - Calculate adler32 checksum of the provided buffer with the initial adler32 checksum of
adler
. If c_ulong is wider than 32 bits, only the lower 32 bits will be used. - mz_
compress ⚠ - mz_
compress2 ⚠ - mz_
compress Bound - mz_
crc32 ⚠ - Calculate crc-32 of the provided buffer with the initial CRC32 checksum of
crc
. If c_ulong is wider than 32 bits, only the lower 32 bits will be used. - mz_
crc32_ oxide - mz_
deflate ⚠ - mz_
deflate Bound - mz_
deflate ⚠End - mz_
deflate ⚠Init - mz_
deflate ⚠Init2 - mz_
deflate ⚠Reset - mz_
inflate ⚠ - mz_
inflate ⚠End - mz_
inflate ⚠Init - mz_
inflate ⚠Init2 - mz_
uncompress ⚠ - tdefl_
allocate ⚠ - Allocate a compressor.
- tdefl_
compress ⚠ - tdefl_
compress_ ⚠buffer - tdefl_
compress_ ⚠mem_ to_ heap - tdefl_
compress_ ⚠mem_ to_ mem - tdefl_
compress_ ⚠mem_ to_ output - tdefl_
create_ comp_ flags_ from_ zip_ params - tdefl_
deallocate ⚠ - Deallocate the compressor. (Does nothing if the argument is null).
- tdefl_
get_ ⚠adler32 - tdefl_
get_ ⚠prev_ return_ status - tdefl_
init ⚠ - Initialize the compressor struct in the space pointed to by
d
. if d is null, an error is returned. - tinfl_
decompress ⚠ - tinfl_
decompress_ ⚠mem_ to_ heap - Decompress data from
p_src_buf
to a continuously growing heap-allocated buffer. - tinfl_
decompress_ ⚠mem_ to_ mem
Type Aliases§
- MZResult
Result
alias for all miniz status codes both successful and failed.- mz_
alloc_ callback - mz_
alloc_ func - Signature of function used to allocate the compressor/decompressor structs.
- mz_bool
- mz_
free_ callback - mz_
free_ func - Signature of function used to free the compressor/decompressor structs.
- mz_
realloc_ func - mz_uint
- mz_
uint32