diff options
| author | Kendall Condon <goon.pri.low@gmail.com> | 2025-09-19 17:45:43 -0400 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2025-09-30 18:28:47 -0700 |
| commit | f50c6479774d49fc21c5652b39bcad3c2512867b (patch) | |
| tree | 4c27a9c71489f778323b2decccd9607007da4e19 /lib/std/debug.zig | |
| parent | e79a00adf664ef46b74da5ed2d620d342b9f8807 (diff) | |
| download | zig-f50c6479774d49fc21c5652b39bcad3c2512867b.tar.gz zig-f50c6479774d49fc21c5652b39bcad3c2512867b.zip | |
add deflate compression, simplify decompression
Implements deflate compression from scratch. A history window is kept in
the writer's buffer for matching and a chained hash table is used to
find matches. Tokens are accumulated until a threshold is reached and
then outputted as a block. Flush is used to indicate end of stream.
Additionally, two other deflate writers are provided:
* `Raw` writes only in store blocks (the uncompressed bytes). It
utilizes data vectors to efficiently send block headers and data.
* `Huffman` only performs Huffman compression on data and no matching.
The above are also able to take advantage of writer semantics since they
do not need to keep a history.
Literal and distance code parameters in `token` have also been reworked.
Their parameters are now derived mathematically, however the more
expensive ones are still obtained through a lookup table (expect on
ReleaseSmall).
Decompression bit reading has been greatly simplified, taking advantage
of the ability to peek on the underlying reader. Additionally, a few
bugs with limit handling have been fixed.
Diffstat (limited to 'lib/std/debug.zig')
0 files changed, 0 insertions, 0 deletions
