Debian Codegraph @

.cargo/vendor/fdeflate/README.md

raw
1 # fdeflate
2
3 [![crates.io](https://img.shields.io/crates/v/fdeflate.svg)](https://crates.io/crates/fdeflate)
4 [![Documentation](https://docs.rs/fdeflate/badge.svg)](https://docs.rs/fdeflate)
5 [![Build Status](https://img.shields.io/github/actions/workflow/status/image-rs/fdeflate/rust.yml?label=Rust%20CI)](https://github.com/image-rs/fdeflate/actions)
6
7 A fast deflate implementation.
8
9 This crate contains an optimized implementation of the deflate algorithm tuned to compress PNG
10 images. It is compatible with standard zlib, but make a bunch of simplifying assumptions that
11 drastically improve encoding performance:
12
13 - Exactly one block per deflate stream.
14 - No distance codes except for run length encoding of zeros.
15 - A single fixed huffman tree trained on a large corpus of PNG images.
16 - All huffman codes are <= 12 bits.
17
18 It also contains a fast decompressor that supports arbitrary zlib streams but does especially
19 well on streams that meet the above assumptions.
20
21 ### Inspiration
22
23 The algorithms in this crate take inspiration from multiple sources:
24 * [fpnge](https://github.com/veluca93/fpnge)
25 * [zune-inflate](https://github.com/etemesi254/zune-image/tree/main/zune-inflate)
26 * [RealTime Data Compression blog](https://fastcompression.blogspot.com/2015/10/huffman-revisited-part-4-multi-bytes.html)