Cargo Features
[dependencies]
zstd-safe = { version = "7.2.1", default-features = false, features = ["bindgen", "debug", "experimental", "legacy", "pkg-config", "std", "zstdmt", "thin", "arrays", "no_asm", "zdict_builder", "doc-cfg", "fat-lto", "thin-lto"] }
- default = arrays, legacy, zdict_builder
-
These default features are set whenever
zstd-safe
is added without
somewhere in the dependency tree.default-features = false - bindgen
- debug
-
zstd-sys:
Enable zstd debug logs
- experimental
-
Enables experimental of zstd-sys
zstd-sys:
Expose experimental ZSTD API
Affects
zstd-safe::find_decompressed_size
,zstd-safe::is_frame
,zstd-safe::FrameFormat
,zstd-safe::DictAttachPref
,zstd-safe::ParamSwitch
,zstd-safe::get_block_size
,zstd-safe::decompress_bound
,zstd-safe::sequence_bound
,zstd-safe::decompression_margin
,zstd-safe::ThreadPool
… - legacy default
-
zstd-sys:
Enable legacy ZSTD support (for versions < zstd-0.8)
- pkg-config
-
Enables pkg-config of zstd-sys
zstd-sys:
Use pkg-config to build the zstd C library.
- std
-
Implements WriteBuf for std types like Cursor and Vec.
- zstdmt
-
zstd-sys:
Enable multi-thread support (with pthread)
Affects
zstd-safe::ThreadPool
… - thin
-
zstd-sys:
Optimize binary by size
- arrays default
- no_asm
-
zstd-sys:
Disable ASM files (only on amd64 for decompression)
- zdict_builder default
-
Enables zdict_builder of zstd-sys
zstd-sys:
Enable dictionary building (dictionary _using_ is always supported).
Affects
zstd-safe::train_from_buffer
,zstd-safe::get_dict_id
… - doc-cfg
- fat-lto
-
These two are for cross-language LTO. Will only work if
clang
is used to build the C library. - thin-lto
-
zstd-sys:
Enable thin-lto, will fallback to fat-lto if not supported