Module miniz_oxide::inflate::core
source ยท Expand description
Streaming decompression functionality.
Modulesยง
- Flags to
decompress()
to control how inflation works.
Macrosยง
- generate_state ๐
Structsยง
- Main decompression struct.
- HuffmanTable ๐A struct containing huffman code lengths and the huffman code tree used by the decompressor.
- LocalVars ๐
Enumsยง
Constantsยง
- BASE_EXTRA_MASK ๐The mask used when indexing the base/extra arrays.
- DIST_BASE ๐Base length for each distance code.
- DIST_EXTRA ๐Number of extra bits for each distance code.
- DIST_TABLE ๐
- FAST_LOOKUP_BITS ๐The maximum length of a code that can be looked up in the fast lookup table.
- FAST_LOOKUP_SIZE ๐The size of the fast lookup table.
- HUFFLEN_TABLE ๐
- LENGTH_BASE ๐Base length for each length code.
- LENGTH_EXTRA ๐Number of extra bits for each length code.
- LITLEN_TABLE ๐
- MAX_HUFF_SYMBOLS_0 ๐The length of the first (literal/length) huffman table.
- MAX_HUFF_SYMBOLS_1 ๐The length of the second (distance) huffman table.
- MAX_HUFF_TABLES ๐The number of huffman tables used.
- MAX_HUFF_TREE_SIZE ๐
- MIN_TABLE_SIZES ๐
- _MAX_HUFF_SYMBOLS_2 ๐The length of the last (huffman code length) huffman table.
Functionsยง
- apply_match ๐Presumes that there is at least match_len bytes in output left.
- decode_huffman_code ๐Try to decode the next huffman code, and puts it in the counter field of the decompressor if successful.
- Main decompression function. Keeps decompressing data from
in_buf
until thein_buf
is empty,out
is full, the end of the deflate stream is hit, or there is an error in the deflate stream. - decompress_fast ๐Fast inner decompression loop which is run while there is at least 259 bytes left in the output buffer, and at least 6 bytes left in the input buffer (The maximum one match would need + 1).
- end_of_input ๐
- fill_bit_buffer ๐Ensure that there is data in the bit buffer.
- init_tree ๐
- memset ๐Sets the value of all the elements of the slice to
val
. - pad_to_bytes ๐
- read_bits ๐Try to read
amount
number of bits fromin_iter
and call the functionf
with the bits as an an argument after reading, returning the result of that function, orAction::End
if there are not enough bytes left. - read_byte ๐Try to read one byte from
in_iter
and callf
with the read byte as an argument, returning the result. If reading fails,Action::End is returned
- read_u16_le ๐Read an le u16 value from the slice iterator.
- read_u32_le ๐Read an le u32 value from the slice iterator.
- reverse_bits ๐
- start_static_table ๐
- transfer ๐
- undo_bytes ๐
- validate_zlib_header ๐Check that the zlib header is correct and that there is enough space in the buffer for the window size specified in the header.
Type Aliasesยง
- BitBuffer ๐