Skip to content

Take the JBIG2 decoder that reads the last seven streams - #29

Merged
tannevaled merged 1 commit into
mainfrom
gfx-v0.15.0
Aug 28, 2026
Merged

Take the JBIG2 decoder that reads the last seven streams#29
tannevaled merged 1 commit into
mainfrom
gfx-v0.15.0

Conversation

@tannevaled

Copy link
Copy Markdown
Contributor

go-gfx/gfx v0.15.0 takes its JBIG2 decoder from a fork carrying one fix, offered upstream as dkrisman/gobig2#2: the per-symbol pixel cap defaulted to 4 megapixels, below what real scanned documents contain, and a library could not raise it because the limits are process-global variables.

Of 403 JBIG2 streams taken from the /Mask and /SMask entries of public Internet Archive scans, 7 were refused at that default. With the fix all 403 decode, every one bit-exact with poppler's own decoder.

The dependency also stops being untagged.

100% statement coverage, go vet and -race clean, nine cross-compile targets.

go-gfx/gfx v0.15.0 takes its JBIG2 decoder from a fork carrying one fix,
offered upstream as dkrisman/gobig2#2: the per-symbol pixel cap defaulted to 4
megapixels, below what real scanned documents contain, and a library could not
raise it because the limits are process-global variables.

Of 403 JBIG2 streams taken from the /Mask and /SMask entries of public
Internet Archive scans, 7 were refused at that default. With the fix all 403
decode, every one bit-exact with poppler's own decoder.

The dependency also stops being untagged.
@tannevaled
tannevaled merged commit 07de9a5 into main Aug 28, 2026
1 check passed
@tannevaled
tannevaled deleted the gfx-v0.15.0 branch August 28, 2026 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant