1
0
mirror of https://github.com/facebook/zstd.git synced 2025-03-06 16:56:49 +02:00
Yann Collet 6a9c525903 spec update : require minimum nb of literals for 4-streams mode
Reported by @shulib :
the specification for 4-streams mode
doesn't work when the amount of literals to compress is 5 bytes.
Extending it, it also doesn't work for sizes 1 or 2.

This patch updates the specification and the implementation
to require a minimum of 6 literals to trigger or accept the 4-streams mode.

The impact is expected to be a no-op :
the 4-streams mode is never triggered for such small quantity of literals anyway,
since it would be wasteful (it costs ~7.3 bytes more than single-stream mode).
An informal lower limit is set at ~256 bytes,
so the technical minimum is very far from this limit.

This is just meant for completeness of the specification.
2022-12-22 16:14:34 -08:00
..
2022-04-26 17:40:23 +08:00

Zstandard Documentation

This directory contains material defining the Zstandard format, as well as detailed instructions to use zstd library.

zstd_manual.html : Documentation of zstd.h API, in html format. Unfortunately, Github doesn't display html files in parsed format, just as source code. For a readable display of html API documentation of latest release, use this link: https://raw.githack.com/facebook/zstd/release/doc/zstd_manual.html .

zstd_compression_format.md : This document defines the Zstandard compression format. Compliant decoders must adhere to this document, and compliant encoders must generate data that follows it.

Should you look for resources to develop your own port of Zstandard algorithm, you may find the following resources useful :

educational_decoder : This directory contains an implementation of a Zstandard decoder, compliant with the Zstandard compression format. It can be used, for example, to better understand the format, or as the basis for a separate implementation of Zstandard decoder.

decode_corpus : This tool, stored in /tests directory, is able to generate random valid frames, which is useful if you wish to test your decoder and verify it fully supports the specification.