Module miniz_oxide::inflate::core
source · Expand description
Streaming decompression functionality.
Modules
- Flags to
decompress()
to control how inflation works.
Macros
Structs
- Main decompression struct.
- A struct containing huffman code lengths and the huffman code tree used by the decompressor.
Enums
Constants
- The mask used when indexing the base/extra arrays.
- Base length for each distance code.
- Number of extra bits for each distance code.
- The maximum length of a code that can be looked up in the fast lookup table.
- The size of the fast lookup table.
- Base length for each length code.
- Number of extra bits for each length code.
- The length of the first (literal/length) huffman table.
- The length of the second (distance) huffman table.
- The number of huffman tables used.
- The length of the last (huffman code length) huffman table.
Statics
Functions
- Presumes that there is at least match_len bytes in output left.
- 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. - 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).
- Ensure that there is data in the bit buffer.
- memset 🔒Sets the value of all the elements of the slice to
val
. - 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. - 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 an le u16 value from the slice iterator.
- Read an le u32 value from the slice iterator.
- transfer 🔒
- Check that the zlib header is correct and that there is enough space in the buffer for the window size specified in the header.