From 20fa9edd14c8f53a56888523646ada42d7437f2c Mon Sep 17 00:00:00 2001 From: Chris Hennick <4961925+Pr0methean@users.noreply.github.com> Date: Mon, 20 May 2024 18:11:09 -0700 Subject: [PATCH] refactor: Make `deflate` enable both default implementations --- Cargo.toml | 4 ++-- README.md | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 7b707fe80..29a4b9ecf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -68,7 +68,7 @@ aes-crypto = ["aes", "constant_time_eq", "hmac", "pbkdf2", "sha1", "rand", "zero chrono = ["chrono/default"] _deflate-any = [] _all-features = [] # Detect when --all-features is used -deflate = ["flate2/rust_backend", "deflate-flate2"] +deflate = ["flate2/rust_backend", "deflate-zopfli", "deflate-flate2"] deflate-flate2 = ["flate2/any_impl", "_deflate-any"] # DEPRECATED: previously enabled `flate2/miniz_oxide` which is equivalent to `flate2/rust_backend` deflate-miniz = ["deflate", "deflate-flate2"] @@ -81,7 +81,7 @@ default = [ "aes-crypto", "bzip2", "deflate64", - "deflate-zlib-ng", + "deflate", "lzma", "time", "zstd", diff --git a/README.md b/README.md index 475d97870..db8d5600c 100644 --- a/README.md +++ b/README.md @@ -32,12 +32,12 @@ Features The features available are: * `aes-crypto`: Enables decryption of files which were encrypted with AES. Supports AE-1 and AE-2 methods. -* `deflate`: Enables decompressing the deflate compression algorithm, which is the default for zip files. -* `deflate-zlib`: Enables deflating files with the `zlib` library (used when compression quality is 0..=9). -* `deflate-zlib-ng`: Enables deflating files with the `zlib-ng` library (used when compression quality is 0..=9). - This is the fastest `deflate` implementation available. +* `deflate`: Enables compressing and decompressing an unspecified implementation (that may change in future versions) of + the deflate compression algorithm, which is the default for zip files. Supports compression quality 1..=264. +* `deflate-flate2`: Combine this with any `flate2` feature flag that enables a back-end, to support deflate compression + at quality 1..=9. * `deflate-zopfli`: Enables deflating files with the `zopfli` library (used when compression quality is 10..=264). This - is the most effective `deflate` implementation available. + is the most effective `deflate` implementation available, but also among the slowest. * `deflate64`: Enables the deflate64 compression algorithm. Only decompression is supported. * `lzma`: Enables the LZMA compression algorithm. Only decompression is supported. * `bzip2`: Enables the BZip2 compression algorithm.