refactor: Rename _deflate-non-zopfli to _deflate-flate2

This commit is contained in:
Chris Hennick 2024-05-20 12:02:05 -07:00
parent 6071dc13b0
commit 870f915bc5
No known key found for this signature in database
GPG key ID: DA47AABA4961C509
2 changed files with 8 additions and 8 deletions

View file

@ -67,15 +67,15 @@ tempdir = "0.3.7"
aes-crypto = ["aes", "constant_time_eq", "hmac", "pbkdf2", "sha1", "rand", "zeroize"]
chrono = ["chrono/default"]
_deflate-any = []
_deflate-non-zopfli = ["_deflate-any"]
_deflate-flate2 = ["_deflate-any"]
_all-features = [] # Detect when --all-features is used
deflate = ["flate2/rust_backend", "_deflate-non-zopfli"]
deflate = ["flate2/rust_backend", "_deflate-flate2"]
# DEPRECATED: previously enabled `flate2/miniz_oxide` which is equivalent to `flate2/rust_backend`
deflate-miniz = ["deflate", "_deflate-non-zopfli"]
deflate-miniz = ["deflate", "_deflate-flate2"]
deflate-zlib = ["flate2/zlib", "_deflate-non-zopfli"]
deflate-zlib-ng = ["flate2/zlib-ng", "_deflate-non-zopfli"]
deflate-zlib = ["flate2/zlib", "_deflate-flate2"]
deflate-zlib-ng = ["flate2/zlib-ng", "_deflate-flate2"]
deflate-zopfli = ["zopfli", "_deflate-any"]
lzma = ["lzma-rs/stream"]
unreserved = []

View file

@ -1516,7 +1516,7 @@ impl<W: Write + Seek> GenericZipWriter<W> {
}
#[cfg(feature = "_deflate-any")]
CompressionMethod::Deflated => {
let default = if cfg!(all(feature = "deflate-zopfli", not(feature = "_deflate-non-zopfli"))) {
let default = if cfg!(all(feature = "deflate-zopfli", not(feature = "_deflate-flate2"))) {
24
} else {
Compression::default().level() as i64
@ -1694,9 +1694,9 @@ impl<W: Write + Seek> GenericZipWriter<W> {
#[cfg(feature = "_deflate-any")]
fn deflate_compression_level_range() -> std::ops::RangeInclusive<i64> {
let min = if cfg!(feature = "_deflate-non-zopfli")
let min = if cfg!(feature = "_deflate-flate2")
{
Compression::none().level() as i64
Compression::fast().level() as i64
} else {
Compression::best().level() as i64 + 1
};