stdlib/zstdView source ↗
zstd
39 items · generated by scribe fromstdlib/zstd.fd· synced 2026-11-15
Contents
- ZstdResult (struct)
- zstd_xxh64 (function)
- zstd_decode_limit (function)
- zstd_decode (function)
- zstd_decompress (function)
- zstd_decompress_limit (function)
- zstd_ok (function)
- zstd_error (function)
- zstd_decompress_str (function)
ZstdResult
The outcome of decoding a Zstandard stream. ok is false on malformed input; bytes is then empty and error says what was wrong. A valid stream whose content is empty gives ok == true and empty bytes.
pub struct ZstdResult {Fields:
| Name | Type |
|---|---|
ok | bool |
bytes | Vec<i64> |
error | str |
Defined at line 46
zstd_xxh64
XXH64 of a whole byte Vec with seed (see zstd_xxh64_range).
pub fn zstd_xxh64(bytes: Vec<i64>, seed: i64) -> i64 {Parameters:
bytes:Vec<i64>seed:i64
Returns: i64
Defined at line 1148
zstd_decode_limit
Decode a Zstandard stream (one or more frames, skippable frames skipped) into at most max_out bytes. On malformed input, or output over max_out, the result has ok == false, empty bytes and a message.
pub fn zstd_decode_limit(data: Vec<i64>, max_out: i64) -> ZstdResult {Parameters:
data:Vec<i64>max_out:i64
Returns: ZstdResult
Defined at line 1366
zstd_decode
Decode a Zstandard stream (output capped at 256 MB). See ZstdResult.
pub fn zstd_decode(data: Vec<i64>) -> ZstdResult {Parameters:
data:Vec<i64>
Returns: ZstdResult
Defined at line 1425
zstd_decompress
Decompress a Zstandard stream. Returns the decoded bytes, or an empty Vec on malformed input; use zstd_ok or zstd_decode to tell an error from a stream whose content is empty.
pub fn zstd_decompress(data: Vec<i64>) -> Vec<i64> {Parameters:
data:Vec<i64>
Returns: Vec<i64>
Defined at line 1432
zstd_decompress_limit
Decompress with the output capped at max_out bytes (a decompression-bomb guard). Empty Vec on error or over the cap.
pub fn zstd_decompress_limit(data: Vec<i64>, max_out: i64) -> Vec<i64> {Parameters:
data:Vec<i64>max_out:i64
Returns: Vec<i64>
Defined at line 1439
zstd_ok
Whether data is a valid Zstandard stream (it is decoded in full to find out; to keep the bytes as well, call zstd_decode once).
pub fn zstd_ok(data: Vec<i64>) -> bool {Parameters:
data:Vec<i64>
Returns: bool
Defined at line 1446
zstd_error
Why data does not decode, or "" when it does.
pub fn zstd_error(data: Vec<i64>) -> str {Parameters:
data:Vec<i64>
Returns: str
Defined at line 1452
zstd_decompress_str
Decompress and interpret the result as a string ("" on error). The string ends at the first NUL byte, as every Fides str does.
pub fn zstd_decompress_str(data: Vec<i64>) -> str {Parameters:
data:Vec<i64>
Returns: str
Defined at line 1459
Generated by scribe, the Fides documentation generator