Expand description
Zstd leaf (encoding id 11), the optional general-purpose stage for cold string segments where ratio matters more than decode speed. Everything else in the cascade is a lightweight encoding; this is the one deliberate exception, and it is a leaf: nothing cascades below it.
The zstd feature links libzstd for compression and fast decode.
Builds without it stay pure Rust and still read every file through
ruzstd, so the default build can open a database written by a
feature-full one; only encode needs the feature. decode_fallback
is the ruzstd path under its own name so tests and fuzzing can pin
it even when libzstd is linked.
Layout: raw_len: u32 LE, then one zstd frame.
Functionsยง
- decode
- Decodes an encoded buffer, appending at most
max_lenbytes toout. With thezstdfeature this is libzstd; without it, ruzstd. A rejected payload leavesoutuntouched. - decode_
fallback - The pure Rust read path, always available regardless of features.