Skip to content

Feature Flags ​

zesven uses Cargo features to enable optional functionality.

Default Features ​

These features are enabled by default:

toml
[dependencies]
zesven = "3.2"  # Includes default features
FeatureDescription
lzmaLZMA compression
lzma2LZMA2 compression (includes lzma)
deflateDeflate/zlib compression
bzip2BZip2 compression
ppmdPPMd compression
aesAES-256 encryption
parallelMulti-threaded compression
sysinfoSizing the memory budget from the machine

Minimal Build ​

Disable defaults for a smaller binary:

toml
[dependencies]
zesven = { version = "3.2", default-features = false, features = ["lzma2"] }

All Features ​

Compression ​

FeatureDefaultDescription
lzmaYesLZMA compression via lzma-rust2
lzma2YesLZMA2 compression (includes lzma)
deflateYesDeflate via zlib-rs
bzip2YesBZip2 compression
ppmdYesPPMd compression
lz4NoLZ4 fast compression
zstdNoZstandard compression
brotliNoBrotli compression

Built-in codecs (always available, no feature flag required):

  • LZ5 - Pure Rust implementation
  • Lizard - Pure Rust implementation

Security ​

FeatureDefaultDescription
aesYesAES-256 encryption

Performance ​

FeatureDefaultDescription
parallelYesMulti-threaded with Rayon
sysinfoYesLets MemoryLimit::Auto ask the machine how much memory it has. Without it, Auto falls back to a fixed 512 MiB on an uncapped machine, which bounds a large one to a handful of encoders; a cgroup cap is honoured either way.

APIs ​

FeatureDefaultDescription
asyncNoTokio-based async API
regexNoRegex-based filtering
cliNoCommand-line interface

Platform ​

FeatureDefaultDescription
wasmNoWebAssembly support
wasm-defaultNoWASM with default codecs

Feature Dependencies ​

Some features depend on others:

lzma2 → lzma
aes → lzma2          (encrypted headers are stored compressed)
cli → aes            (the tool prompts for passwords and opens encrypted archives)
async → tokio, tokio-util
wasm → wasm-bindgen, wasm-bindgen-futures, js-sys, web-sys, getrandom/js
wasm-default → wasm, lzma, lzma2, deflate, bzip2, ppmd, aes

Example Configurations ​

Web Server ​

toml
[dependencies]
zesven = { version = "3.2", features = ["async"] }

CLI Tool ​

toml
[dependencies]
zesven = { version = "3.2", features = ["cli", "zstd", "lz4"] }

Embedded System ​

toml
[dependencies]
zesven = { version = "3.2", default-features = false, features = ["lzma2"] }

Browser (WASM) ​

toml
[dependencies]
zesven = { version = "3.2", default-features = false, features = ["wasm-default"] }

Maximum Compatibility ​

toml
[dependencies]
zesven = { version = "3.2", features = ["lz4", "zstd", "brotli"] }

Binary Size Impact ​

Approximate binary size impact (release build):

ConfigurationSize
Minimal (lzma2 only)~500 KB
Default features~1.5 MB
All features~3 MB

See Also ​

Released under MIT OR Apache-2.0 License