• Home
  • History
  • Annotate
  • only in this directory
NameDateSize

..22-Jun-20217

harness.cH A D22-Jun-20213.3 KiB

MakefileH A D22-Jun-20211.1 KiB

README.mdH A D22-Jun-20211.4 KiB

zstd_decompress.cH A D22-Jun-202188 KiB

zstd_decompress.hH A D22-Jun-20212.4 KiB

README.md

1Educational Decoder
2===================
3
4`zstd_decompress.c` is a self-contained implementation in C99 of a decoder,
5according to the [Zstandard format specification].
6While it does not implement as many features as the reference decoder,
7such as the streaming API or content checksums, it is written to be easy to
8follow and understand, to help understand how the Zstandard format works.
9It's laid out to match the [format specification],
10so it can be used to understand how complex segments could be implemented.
11It also contains implementations of Huffman and FSE table decoding.
12
13[Zstandard format specification]: https://github.com/facebook/zstd/blob/dev/doc/zstd_compression_format.md
14[format specification]: https://github.com/facebook/zstd/blob/dev/doc/zstd_compression_format.md
15
16`harness.c` provides a simple test harness around the decoder:
17
18    harness <input-file> <output-file> [dictionary]
19
20As an additional resource to be used with this decoder,
21see the `decodecorpus` tool in the [tests] directory.
22It generates valid Zstandard frames that can be used to verify
23a Zstandard decoder implementation.
24Note that to use the tool to verify this decoder implementation,
25the --content-size flag should be set,
26as this decoder does not handle streaming decoding,
27and so it must know the decompressed size in advance.
28
29[tests]: https://github.com/facebook/zstd/blob/dev/tests/
30