From 566007529516dddab991f4dfc54da664189dfd6d Mon Sep 17 00:00:00 2001 From: Grzegorz Martens Date: Sun, 1 Nov 2026 12:15:58 +0100 Subject: [PATCH] M8: the test of rows too wide for Group 4 says Group 4 refused them Flate coming out didn't show that: Group 4 could have been coded and lost on size. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01AmsdeUCdTaD72jkDw2pJKY --- crates/redact/src/tests.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/redact/src/tests.rs b/crates/redact/src/tests.rs index 9db24fff4e..c61e7e60f3 100644 --- a/crates/redact/src/tests.rs +++ b/crates/redact/src/tests.rs @@ -978,6 +978,7 @@ fn a_cleared_image_group_4_wouldnt_shrink_stays_flate() { let wide = pdfcraft_filters::MAX_G4_COLUMNS as usize + 1; for (w, h) in [(3usize, 2usize), (wide, 2)] { let stride = w.div_ceil(8); + assert_eq!(pdfcraft_filters::encode_g4(&vec![0xFF; stride * h], w as u32, h as u32).is_ok(), w != wide, "{w} × {h}"); let dict = format!("/Type /XObject /Subtype /Image /Width {w} /Height {h} /BitsPerComponent 1 /ColorSpace /DeviceGray /Filter /FlateDecode"); let mut doc = one_page( b"q 200 0 0 20 0 100 cm /Im Do Q",