Available on crate feature
zstd only.Expand description
zstd compression and decompression using state that is reused per thread.
Creating a zstd context allocates and initializes its internal state, which can cost more than compressing or decompressing a small buffer.
Functionsยง
- compress
- Compresses
srcinto a single zstd frame appended todst. - decompress
- Decompresses the zstd frames in
src, appending them todst, and returns the number of bytes appended. Fails if they do not fit in the spare capacity ofdst. - decompress_
prefix - Decompresses the zstd frames in
src, appending the firstlendecompressed bytes todst. Fails if they decompress to fewer bytes.