Crate miniz_oxide_c_api[][src]

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

This module mainly contains functionality replicating the miniz higher level API.

Macros

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

Inner stream state containing pointers to the used buffers and internal state.

Main compression struct. Not the same as CompressorOxide #[repr(C)]

Enums

Deflate flush modes.

A list of miniz failed status codes.

A list of flush types.

A list of miniz successful status codes.

Constants

Functions

Default allocation function using malloc.

Default free function using free.

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.

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.

Allocate a compressor.

Deallocate the compressor. (Does nothing if the argument is null).

Initialize the compressor struct in the space pointed to by d. if d is null, an error is returned.

Decompress data from p_src_buf to a continuously growing heap-allocated buffer.

Type Definitions

Result alias for all miniz status codes both successful and failed.

Signature of function used to allocate the compressor/decompressor structs.

Signature of function used to free the compressor/decompressor structs.