[package]
name = "async-compression"
version = "0.4.21"
authors = ["Wim Looman <wim@nemo157.com>", "Allen Bui <fairingrey@gmail.com>"]
edition = "2018"
resolver = "2"
license = "MIT OR Apache-2.0"
keywords = ["compression", "gzip", "zstd", "brotli", "async"]
categories = ["compression", "asynchronous"]
repository = "https://github.com/Nullus157/async-compression"
description = """
Adaptors between compression crates and Rust's modern asynchronous IO types.
"""

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]

[features]
# groups
all = ["all-implementations", "all-algorithms"]
all-implementations = ["futures-io", "tokio"]
all-algorithms = ["brotli", "bzip2", "deflate", "gzip", "lzma", "xz", "zlib", "zstd", "deflate64"]

# algorithms
deflate = ["flate2"]
gzip = ["flate2"]
lzma = ["dep:liblzma"]
xz = ["lzma"]
xz2 = ["xz"]
zlib = ["flate2"]
zstd = ["libzstd", "zstd-safe"]
zstdmt = ["zstd", "zstd-safe/zstdmt"]
deflate64 = ["dep:deflate64"]

[dependencies]
brotli = { version = "7.0", optional = true }
bzip2 = { version = "0.5.0", optional = true }
flate2 = { version = "1.0.13", optional = true }
futures-core = { version = "0.3", default-features = false }
futures-io = { version = "0.3", default-features = false, features = ["std"], optional = true }
libzstd = { package = "zstd", version = "0.13.1", optional = true, default-features = false }
memchr = "2"
pin-project-lite = "0.2"
tokio = { version = "1.24.2", optional = true, default-features = false }
liblzma = { version = "0.3.6", optional = true }
zstd-safe = { version = "7", optional = true, default-features = false }
deflate64 = { version = "0.1.5", optional = true }

[dev-dependencies]
bytes = "1"
futures = "0.3.5"
futures-test = "0.3.5"
ntest = "0.9"
proptest = "1"
proptest-derive = "0.5"
rand = "0.9.0"
tokio = { version = "1.24.2", default-features = false, features = ["io-util", "macros", "rt-multi-thread", "io-std"] }
tokio-util = { version = "0.7", default-features = false, features = ["io"] }

[[test]]
name = "brotli"
required-features = ["brotli"]

[[test]]
name = "bzip2"
required-features = ["bzip2"]

[[test]]
name = "deflate"
required-features = ["deflate"]

[[test]]
name = "gzip"
required-features = ["gzip"]

[[test]]
name = "lzma"
required-features = ["lzma"]

[[test]]
name = "xz"
required-features = ["xz"]

[[test]]
name = "zlib"
required-features = ["zlib"]

[[test]]
name = "zstd"
required-features = ["zstd"]

[[test]]
name = "zstd-dict"
required-features = ["zstd", "tokio"]

[[test]]
name = "zstd-window-size"
required-features = ["zstd", "tokio"]

[[example]]
name = "zlib_tokio_write"
required-features = ["zlib", "tokio"]

[[example]]
name = "zstd_gzip"
required-features = ["zstd", "gzip", "tokio"]
