mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-11-09 12:32:52 +00:00
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>
hayro-jbig2
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
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.