View Source ezstd (ezstd v1.1.0)
Zstd [1] binding for Erlang.
[1]:http://facebook.github.io/zstd
Link to this section Summary
Functions
Compresses the given binary.
Compresses the given binary with compression level.
Compress some data without closing out the compression frame. This is intended to be used by a streaming decompressor which receives the same data in the same order.
Create a streaming compression context, with a buffer of the given size.
Create a streaming decompression context, with a buffer of the given size.
Decompresses the given binary.
Compress some data without closing out the compression frame. This is intended to be used by a streaming decompressor which receives the same data in the same order.
Set a dictionary for the given streaming compression context. Must be called before beginning compression.
Set a dictionary for the given streaming decompression context. Must be called before beginning decompression.
Set a compression parameter on the given compression context. Valid values for flag are zstd_c_compression_level and zstd_c_window_log.
Set a decompression parameter on the given compression context. The only valid value for Flag is zstd_d_window_log_max.
Link to this section Types
-type zstd_compression_flag() ::
zstd_c_compression_level | zstd_c_window_log | zstd_c_hash_log | zstd_c_chain_log |
zstd_c_search_log | zstd_c_min_match | zstd_c_target_length | zstd_c_strategy.
-type zstd_decompression_flag() :: zstd_d_window_log_max.
Link to this section Functions
-spec compress(binary()) -> binary() | {error, any()}.
-spec compress(binary(), integer()) -> binary() | {error, any()}.
-spec compress_streaming(reference(), binary()) -> iolist() | {error, any()}.
-spec compress_streaming_end(reference(), binary()) -> iolist() | {error, any()}.
-spec compress_using_cdict(binary(), reference()) -> binary() | {error, any()}.
-spec create_cdict(binary(), integer()) -> reference() | {error, any()}.
-spec create_compression_context(pos_integer()) -> reference() | {error, any()}.
-spec create_ddict(binary()) -> reference() | {error, any()}.
-spec create_decompression_context(pos_integer()) -> reference() | {error, any()}.
-spec decompress(binary()) -> binary() | {error, any()}.
-spec decompress_streaming(reference(), binary()) -> iolist() | {error, any()}.
-spec decompress_using_ddict(binary(), reference()) -> binary() | {error, any()}.
-spec get_dict_id_from_cdict(reference()) -> integer().
-spec get_dict_id_from_ddict(reference()) -> integer().
-spec get_dict_id_from_frame(binary()) -> integer().
-spec select_cdict(reference(), reference()) -> ok | {error, any()}.
-spec select_ddict(reference(), reference()) -> ok | {error, any()}.
-spec set_compression_parameter(reference(), zstd_compression_flag(), integer()) -> ok | {error, any()}.
-spec set_decompression_parameter(reference(), zstd_decompression_flag(), integer()) -> ok | {error, any()}.