Rename safe-rust-zstd to zstd-safe-rust

This commit is contained in:
Sergey "Shnatsel" Davidoff committed 2026-03-06 09:36:09 +00:00
1 parent 61dbcc1392
commit 19caae4f53
3 files changed
+4 -4

No files matched your search

+2 -2
View File
@@ -47,8 +47,8 @@ lzw = ["dep:weezl"]
webp = ["dep:image-webp"] webp = ["dep:image-webp"]
zstd = ["dep:zstd"] zstd = ["dep:zstd"]
# Fully safe Rust but much slower Zstd decoding. # Fully safe Rust but much slower Zstd decoding.
# When both zstd and safe-rust-zstd are enabled, zstd takes precedence. # When both zstd and zstd-safe-rust are enabled, zstd takes precedence.
safe-rust-zstd = ["dep:ruzstd"] zstd-safe-rust = ["dep:ruzstd"]
[[bench]] [[bench]]
name = "lzw" name = "lzw"
+1 -1
View File
@@ -659,7 +659,7 @@ impl Image {
)), )),
#[cfg(feature = "zstd")] #[cfg(feature = "zstd")]
CompressionMethod::ZSTD => Box::new(zstd::Decoder::new(reader)?), CompressionMethod::ZSTD => Box::new(zstd::Decoder::new(reader)?),
#[cfg(all(not(feature = "zstd"), feature = "safe-rust-zstd"))] #[cfg(all(not(feature = "zstd"), feature = "zstd-safe-rust"))]
CompressionMethod::ZSTD => Box::new( CompressionMethod::ZSTD => Box::new(
ruzstd::decoding::StreamingDecoder::new(reader) ruzstd::decoding::StreamingDecoder::new(reader)
.map_err(|e| std::io::Error::other(e))?, .map_err(|e| std::io::Error::other(e))?,
+1 -1
View File
@@ -569,7 +569,7 @@ fn test_predictor_3_gray_f32() {
} }
#[test] #[test]
#[cfg(any(feature = "zstd", feature = "safe-rust-zstd"))] #[cfg(any(feature = "zstd", feature = "zstd-safe-rust"))]
fn test_zstd_compression() { fn test_zstd_compression() {
// gdal_translate -co COMPRESS=ZSTD -co ZSTD_LEVEL=20 int16.tif int16_zstd.tif // gdal_translate -co COMPRESS=ZSTD -co ZSTD_LEVEL=20 int16.tif int16_zstd.tif
test_image_sum_i16("int16_zstd.tif", ColorType::Gray(16), 354396); test_image_sum_i16("int16_zstd.tif", ColorType::Gray(16), 354396);