LibGfx/JBIG2Writer+Tests/LibGfx: Add support for files in random access organization #26407
+81
−7
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Files in random access organization first store all segment headers,
followed by all segment data. (In conctrast, the usual sequential
organization writes each segment's header and data in one piece.)
For that reason, files in random access organization must end
with an end_of_file segment, while it's optional for files in sequential
organization.
Almost all jbig2 decoders in existence can only read jbig2 data when
it's part of a PDF. JBIG2 data in a PDF is in the "embedded"
organization, which is like the sequential organization without the file
header. That means it's a bit difficult to test if random access files
are correct. Having said that,
jbig2decdecodes the files we'rewriting fine.