lib-image · crate
kinogaki-deflate
DEFLATE (RFC 1951) and zlib (RFC 1950) compression and decompression, with the CRC-32 and Adler-32 checksums the formats around them use.
- Repository
- lib-image (kinogaki/lib-image)
- Folder
libs/lib-image/crates/deflate- Source
- 8 files, 2,181 lines
- Tests
- 2 files, 526 lines
What it is
DEFLATE (RFC 1951) and zlib (RFC 1950) compression and decompression, with the CRC-32 and Adler-32 checksums the formats around them use. One implementation shared by PNG, ZIP (usdz) and anything else that needs it; no unsafe code and no dependencies.
Depends on
None.
Third-party
None.
Used by
| Crate | Repository | As | What it is |
|---|---|---|---|
kinogaki-exr-format | OpenEXR | normal | OpenEXR, a format plugin: an EXR file reads as one standard Image, every part's channels its layers, and an Image writes as one EXR, Cryptomatte included. |
kinogaki-fbx | FBX | normal | FBX as a read-only format plugin for Kinogaki Studio. |
kinogaki-png | lib-image | normal | PNG images (ISO/IEC 15948, W3C PNG Third Edition) over kinogaki_deflate. |
Modules
checksum(private)CRC-32 (IEEE 802.3, as ZIP, gzip and PNG use it) and Adler-32 (zlib).208 linesdeflate(private)Compression into raw DEFLATE streams (RFC 1951).550 lineshuffman(private)Length-limited Huffman code lengths and canonical codes for the encoder.172 linesinflate(private)Decompression of raw DEFLATE streams (RFC 1951).560 linesinflate::bits(private)The bit reader a stream is decoded through.131 linesinflate::table(private)Huffman decoding tables: an entry's layout, a code's table (its first level, then its second-level tables), built in place for a dynamic block, and the fixed block's.294 linestables(private)DEFLATE's format constants (RFC 1951 §3.2.5–3.2.7).146 lines
Public types and traits
At the crate root
Structs Adler32Crc32
Enums ErrorLevel
By module: 3 public types and traits in 2 modules
checksum Adler32Crc32
deflate Level
Besides these, 6 public functions at module level.
