1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
//! JBIG2Decode implementation.
//!
//! JBIG2 (Joint Bi-level Image Experts Group 2) compression for monochrome
//! (bi-level) images. JBIG2 provides significantly better compression than
//! CCITT Fax for scanned documents and is optimized for text and halftones.
//!
//! ## Current Status
//!
//! This is a pass-through decoder for JBIG2 data. JBIG2 images are
//! binary image compression formats typically used for scanned documents.
//! For text extraction purposes, the data is kept in compressed format.
//!
//! ## Implementation Options
//!
//! Full JBIG2 decoding requires one of:
//! - **jbig2dec crate**: Rust bindings to C library (GPL-3.0 licensed)
//! - **pdfium-render**: BSD-licensed, but heavy dependency
//! - **Custom implementation**: Complex, no pure Rust MIT/Apache decoder exists
//!
//! For applications requiring actual JBIG2 image rendering:
//! - Enable the `rendering` feature which uses tiny-skia for rasterization
//! - Or use `pdfium-render` feature for full PDF rendering including JBIG2
//!
//! PDF Spec: ISO 32000-1:2008, Section 7.4.7 - JBIG2Decode Filter
use crateStreamDecoder;
use crateResult;
/// JBIG2Decode filter implementation.
///
/// Pass-through for JBIG2 data - no actual decoding performed.
/// JBIG2 images are kept in their compressed format for later extraction.
///
/// JBIG2 is a modern compression standard for bi-level (black and white)
/// images, offering much better compression ratios than older formats like
/// CCITT Fax. It's commonly used in PDF/A for archival documents.
;