Files
pdfcraft/vendor/hayro-jbig2
8717a085ff M2: a JBIG2 refinement reads a reference right of it from its first column (#6048)
A refinement whose reference is offset right of it (GRREFERENCEDX above
0, which a refined text instance has from a wider bitmap, ISO/IEC 14492
Table 12, and a refined symbol from an RDX above 0, Table 18) read the
reference's first 32 columns as 0. hayro-jbig2 emptied its buffers of
the reference left of it and, at its first column, didn't load them
again, so the refinement decoded to other pixels than were coded, or
failed and lost the page.

Vendored patch 15 (13 is #5999, 14 #6016): left of the reference the
buffers keep the words of its first column each row starts with. With
an offset of 0 or less nothing changes.


Claude-Session: https://claude.ai/code/session_01AmsdeUCdTaD72jkDw2pJKY

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
2026-11-04 13:51:47 +01:00
..

hayro-jbig2

Crates.io Documentation

A memory-safe, pure-Rust JBIG2 decoder.

hayro-jbig2 decodes JBIG2 images as specified in ITU-T T.88 (also known as ISO/IEC 14492). JBIG2 is a bi-level image compression standard commonly used in PDF documents for compressing scanned text documents.

Status

This crate is currently under development.

Safety

By default, the crate has the simd feature enabled, which uses the fearless_simd crate to accelerate decoding of JBIG2 images with halftoning. If you want to eliminate any usage of unsafe in this crate as well as its dependencies, you can simply disable this feature and still get very good performance in the vast majority of cases. Unsafe code is forbidden via a crate-level attribute.

License

Licensed under either of

at your option.