mzstd 0.2.2

Zstandard (RFC 8878) compression and decompression in safe Rust; single-threaded encoding is byte-identical to zstd 1.5.7
Documentation
[package]
name = "mzstd"
version = "0.2.2"
edition = "2024"
rust-version = "1.89"
license = "MIT OR Apache-2.0"
description = "Zstandard (RFC 8878) compression and decompression in safe Rust; single-threaded encoding is byte-identical to zstd 1.5.7"
repository = "https://github.com/M-Compressors/mzstd"
homepage = "https://github.com/M-Compressors/mzstd"
documentation = "https://docs.rs/mzstd"
readme = "README.md"
keywords = ["zstd", "zstandard", "compression", "encoder", "decoder"]
categories = ["compression", "algorithms", "no-std"]
exclude = [
    ".github/**",
    "architecture/**",
    "benchmarks/**",
    "docs/**",
    "fuzz/**",
    "mzstd-ffi/**",
    "specifications/**",
    "target/**",
    "testdata/**",
    "zstd-ffi/**",
]

[dependencies.thiserror]
version = "2"
optional = true
default-features = false

[dependencies.fearless_simd]
version = "1"
optional = true
default-features = false

# `#[simd]` enters a token's feature context with each argument passed
# separately, where `Simd::vectorize` moves them into one closure struct.
[dependencies.fearless_simd_macros]
version = "0.1"
optional = true

# Safe cache prefetch hints for the match finders (`prefetch_read_data`).
[dependencies.branches]
version = "0.5"
optional = true
default-features = false
features = ["prefetch"]

# Profiling instrumentation only; every anchor in `src/` is written as
# `#[cfg_attr(all(feature = "hotpath", not(feature = "no_std")), hotpath::measure)]`.
# Safe bookkeeping for uninitialized session output: the encoder writes
# into a zeroed-ahead prefix instead of a temporary buffer.
[dependencies.borrowed-buf]
version = "0.1.1"
optional = true
default-features = false

[dependencies.hotpath]
version = "0.28"
optional = true

[dev-dependencies]
rayon = "1.12"

# Retain the independent scalar oracle only for development builds.
[dev-dependencies.fearless_simd]
version = "1"
default-features = false
features = ["force_support_fallback", "std"]

[dev-dependencies.criterion]
version = "0.8"

[dev-dependencies.zstd-ffi]
path = "zstd-ffi"

[[bench]]
name = "compress"
harness = false
required-features = ["compression"]

[[bench]]
name = "parallel"
harness = false
required-features = ["compression"]

[[bench]]
name = "decompress"
harness = false
required-features = ["decompression"]

[features]
default = ["std", "compression", "decompression"]
# Independently selectable public codecs and their private implementations.
compression = [
    "dep:borrowed-buf",
    "dep:branches",
    "dep:fearless_simd",
    "dep:fearless_simd_macros",
    "dep:thiserror",
]
decompression = ["dep:fearless_simd", "dep:fearless_simd_macros", "dep:thiserror"]
# Standard library support: `std::io` adapters, `std::error::Error` and
# runtime SIMD detection.
std = ["branches?/std", "fearless_simd?/std", "thiserror?/std"]
# Opt-in alloc-backed support; overrides std-only APIs and instrumentation.
no_std = ["fearless_simd?/libm"]


hotpath = ["dep:hotpath", "hotpath/hotpath"]
hotpath-cpu = ["hotpath", "hotpath/hotpath-cpu"]
hotpath-alloc = ["hotpath", "hotpath/hotpath-alloc"]

[workspace]
members = ["zstd-ffi", "mzstd-ffi"]
# The fuzz package pulls in AFL's instrumentation runtime; keeping it out of
# the workspace leaves `cargo test` and `cargo clippy` unaffected by it.
exclude = ["benchmarks/comparison", "fuzz/afl"]
resolver = "3"