Skip to content

Inconsistent output when using ZlibEncoder vs. ZstdEncoder for PDF Compression #447

Answered by Byron
unkcpz asked this question in Q&A
Discussion options

You must be logged in to vote

Since the hash-writer is the outer writer, it sees the uncompressed stream and would be expected to produce the same hash if the input is the same.
However, in the write implementation of the hash-writer it unconditionally hashes all input even though the call to writer.write() returns n bytes written. That number must be respected.

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by unkcpz
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #446 on January 28, 2025 06:20.