[−][src]Crate zstd_safe
Minimal safe wrapper around zstd-sys.
This crates provides a minimal translation of the zstd-sys methods. For a more comfortable high-level library, see the zstd crate.
Most of the functions here map 1-for-1 to a function from the C zstd library mentionned in their descriptions. Check the source documentation for more information on their behaviour.
Features denoted as experimental in the C library are hidden behind an
experimental
feature.
Structs
CCtx | |
CDict | Compression dictionary. |
DCtx | A Decompression Context. |
DDict | |
InBuffer | Wrapper around an input buffer. |
OutBuffer | Wrapper around an output buffer. |
Enums
CParameter | A compression parameter. |
DParameter | A decompression parameter. |
FrameFormat | |
ResetDirective | Reset directive. |
Strategy | How to compress data. |
Constants
Functions
cctx_load_dictionary | Wraps the |
cctx_ref_cdict | Wraps the |
cctx_ref_prefix | Wraps the |
cctx_reset | Wraps the |
cctx_set_parameter | Wraps the |
cctx_set_pledged_src_size | Wraps the |
compress | Wraps the |
compress2 | Wraps the |
compress_block | Wraps the |
compress_bound | maximum compressed size in worst case single-pass scenario |
compress_cctx | Wraps the |
compress_stream | Wraps the |
compress_stream2 | Wraps the |
compress_using_cdict | Wraps the |
compress_using_dict | Wraps the |
create_cctx | |
create_cdict | Wraps the |
create_cdict_by_reference | Wraps the |
create_cstream | Allocates a new |
create_dctx | Prepares a new decompression context without dictionary. |
create_ddict | Wraps the |
create_ddict_by_reference | Wraps the |
create_dstream | |
cstream_in_size | Wraps |
cstream_out_size | Wraps |
dctx_load_dictionary | Wraps the |
dctx_ref_ddict | Wraps the |
dctx_ref_prefix | Wraps the |
dctx_reset | Wraps the |
dctx_set_parameter | Wraps the |
decompress | Wraps the |
decompress_block | Wraps the |
decompress_dctx | Wraps the |
decompress_stream | Wraps the |
decompress_using_ddict | Wraps the |
decompress_using_dict | Wraps the |
dstream_in_size | Wraps the |
dstream_out_size | Wraps the |
end_stream | Wraps the |
find_decompressed_size | Wraps the |
find_frame_compressed_size | Wraps the |
flush_stream | Wraps the |
get_block_size | Wraps the |
get_decompressed_size | Deprecated Wraps the |
get_dict_id | Wraps the |
get_dict_id_from_ddict | Wraps the |
get_dict_id_from_dict | Wraps the |
get_dict_id_from_frame | Wraps the |
get_error_name | |
get_frame_content_size | Wraps the |
init_cstream | Prepares an existing |
init_cstream_src_size | Wraps the |
init_cstream_using_cdict | Wraps the |
init_cstream_using_dict | Wraps the |
init_dstream | Wraps the |
init_dstream_using_ddict | Wraps the |
init_dstream_using_dict | Wraps the |
insert_block | Wraps the |
is_frame | Wraps the |
max_c_level | Returns the maximum (slowest) compression level supported. |
min_c_level | Returns the minimum (fastest) compression level supported. |
reset_cstream | Wraps the |
reset_dstream | Wraps the |
sizeof_cctx | Wraps the |
sizeof_cdict | Wraps the |
sizeof_cstream | Wraps the |
sizeof_dctx | Wraps the |
sizeof_ddict | Wraps the |
sizeof_dstream | Wraps the |
train_from_buffer | Wraps thge |
version_number | |
version_string |
Type Definitions
CStream | Compression stream. |
CompressionLevel | Represents the compression level used by zstd. |
DStream | A Decompression stream. |
ErrorCode | Represents a possible error from the zstd library. |
SafeResult | Wrapper result around most zstd functions. |