- bump dependencies
Fuzz / Fuzz (decode_comprehensive) (push) Failing after 40s
Fuzz / Fuzz (decode_image) (push) Failing after 38s
Fuzz / Fuzz regression (push) Successful in 31s
Rust CI / build (1.88.0) (push) Failing after 51s
Rust CI / build (beta) (push) Canceled after 0s
Rust CI / build (nightly) (push) Canceled after 0s
Rust CI / build (stable) (push) Canceled after 0s
Rust CI / test-platforms (ubuntu-latest) (push) Successful in 41s
Rust CI / features () (push) Successful in 30s
Rust CI / features (default) (push) Successful in 38s
Rust CI / features (default,zstd) (push) Successful in 37s
Rust CI / features (deflate) (push) Successful in 38s
Rust CI / features (jpeg) (push) Successful in 38s
Rust CI / features (zstd) (push) Successful in 38s
Rust CI / other_archs (i686-unknown-linux-gnu) (push) Failing after 16s
Rust CI / features (lzw) (push) Successful in 37s
Rust CI / other_archs (powerpc-unknown-linux-gnu) (push) Failing after 8s
Rust CI / msrv (push) Successful in 59s
Rust CI / rustfmt (push) Successful in 26s
Rust CI / clippy (push) Successful in 34s
Rust CI / test-platforms (macos-26-intel) (push) Canceled after 0s
Rust CI / test-platforms (macos-latest) (push) Canceled after 0s
Rust CI / test-platforms (ubuntu-24.04-arm) (push) Canceled after 0s
Rust CI / test-platforms (windows-11-arm) (push) Canceled after 0s
Rust CI / test-platforms (windows-latest) (push) Canceled after 0s

This commit is contained in:
w.pomp committed 2026-10-27 14:43:16 +01:00
1 parent a6e8ed772d
commit 563b2b11d7
2 files changed
+22 -22

No files matched your search

+10 -10
View File
@@ -23,20 +23,20 @@ half = { version = "2.4.1" }
quick-error = "2.0.1" quick-error = "2.0.1"
# Rename to avoid confusion with the feature name. # Rename to avoid confusion with the feature name.
fax34 = { package = "fax", version = "0.2.6", optional = true } fax34 = { package = "fax", version = "0.3", optional = true }
flate2 = { version = "1.0.20", optional = true } flate2 = { version = "1", optional = true }
weezl = { version = "0.2.1", optional = true } weezl = { version = "0.2", optional = true }
zstd = { version = "0.14", optional = true } zstd = { version = "0.14", optional = true }
zrip-decode = { version = "0.8.2", features = ["paranoid"], optional = true } zrip-decode = { version = "0.8", features = ["paranoid"], optional = true }
zune-jpeg = { version = "0.5.1", optional = true } zune-jpeg = { version = "0.5", optional = true }
image-webp = {version = "0.2.4", optional = true } image-webp = {version = "0.2", optional = true }
[dev-dependencies] [dev-dependencies]
criterion = "0.3.1" criterion = "0.3"
# We may already depend on this via flate2 # We may already depend on this via flate2
crc32fast = "1.5" crc32fast = "1"
libtest-mimic = "0.8.1" libtest-mimic = "0.8"
walkdir = "2.5" walkdir = "2"
[features] [features]
default = ["deflate", "fax", "jpeg", "lzw"] default = ["deflate", "fax", "jpeg", "lzw"]
+12 -12
View File
@@ -294,7 +294,7 @@ pub struct Group4Reader<R: Read> {
decoder: fax34::decoder::Group4Decoder<FaxBytes<R>>, decoder: fax34::decoder::Group4Decoder<FaxBytes<R>>,
line_buf: io::Cursor<Vec<u8>>, line_buf: io::Cursor<Vec<u8>>,
height: u32, height: u32,
width: u16, width: u32,
y: u32, y: u32,
} }
@@ -306,7 +306,7 @@ impl<R: Read> Group4Reader<R> {
compressed_length: u64, compressed_length: u64,
fill_order: u16, fill_order: u16,
) -> crate::TiffResult<Self> { ) -> crate::TiffResult<Self> {
let width = u16::try_from(dimensions.0)?; let width = dimensions.0;
let height = dimensions.1; let height = dimensions.1;
Ok(Self { Ok(Self {
@@ -314,7 +314,7 @@ impl<R: Read> Group4Reader<R> {
fax_byte_iter(reader, compressed_length, fill_order), fax_byte_iter(reader, compressed_length, fill_order),
width, width,
)?, )?,
line_buf: io::Cursor::new(Vec::with_capacity(width.into())), line_buf: io::Cursor::new(Vec::with_capacity(width as usize)),
width, width,
height, height,
y: 0, y: 0,
@@ -344,7 +344,7 @@ impl<R: Read> Read for Group4Reader<R> {
let transitions = fax34::decoder::pels(self.decoder.transition(), self.width); let transitions = fax34::decoder::pels(self.decoder.transition(), self.width);
let buffer = self.line_buf.get_mut(); let buffer = self.line_buf.get_mut();
buffer.resize(usize::from(self.width).div_ceil(8), 0u8); buffer.resize((self.width as usize).div_ceil(8), 0u8);
let target = &mut buffer[..]; let target = &mut buffer[..];
@@ -409,7 +409,7 @@ pub struct Group3Reader {
reader: OwnedBitReader, reader: OwnedBitReader,
line_buf: io::Cursor<Vec<u8>>, line_buf: io::Cursor<Vec<u8>>,
height: u32, height: u32,
width: u16, width: u32,
y: u32, y: u32,
} }
@@ -421,7 +421,7 @@ impl Group3Reader {
compressed_length: u64, compressed_length: u64,
fill_order: u16, fill_order: u16,
) -> crate::TiffResult<Self> { ) -> crate::TiffResult<Self> {
let width = u16::try_from(dimensions.0)?; let width = dimensions.0;
let height = dimensions.1; let height = dimensions.1;
// Buffer all compressed data and apply FillOrder bit reversal // Buffer all compressed data and apply FillOrder bit reversal
@@ -442,7 +442,7 @@ impl Group3Reader {
Ok(Self { Ok(Self {
reader: bit_reader, reader: bit_reader,
line_buf: io::Cursor::new(Vec::with_capacity(width.into())), line_buf: io::Cursor::new(Vec::with_capacity(width as usize)),
width, width,
height, height,
y: 0, y: 0,
@@ -463,10 +463,10 @@ impl Group3Reader {
fn with_markup<R: fax34::BitReader>( fn with_markup<R: fax34::BitReader>(
decoder: fn(&mut R) -> Option<u16>, decoder: fn(&mut R) -> Option<u16>,
reader: &mut R, reader: &mut R,
) -> Option<u16> { ) -> Option<u32> {
let mut sum = 0u16; let mut sum = 0u32;
while let Some(n) = decoder(reader) { while let Some(n) = decoder(reader) {
sum = sum.checked_add(n)?; sum = sum.checked_add(n as u32)?;
if n < 64 { if n < 64 {
return Some(sum); return Some(sum);
} }
@@ -483,7 +483,7 @@ impl Read for Group3Reader {
{ {
// Decode one line of alternating white/black run-lengths // Decode one line of alternating white/black run-lengths
let mut transitions = Vec::new(); let mut transitions = Vec::new();
let mut a0 = 0u16; let mut a0 = 0u32;
let mut is_white = true; let mut is_white = true;
loop { loop {
let run = if is_white { let run = if is_white {
@@ -507,7 +507,7 @@ impl Read for Group3Reader {
self.y += 1; self.y += 1;
// Convert transitions to packed bilevel output // Convert transitions to packed bilevel output
let bytes_per_line = usize::from(self.width).div_ceil(8); let bytes_per_line = (self.width as usize).div_ceil(8);
let buffer = self.line_buf.get_mut(); let buffer = self.line_buf.get_mut();
buffer.clear(); buffer.clear();
buffer.resize(bytes_per_line, 0u8); buffer.resize(bytes_per_line, 0u8);