Skip to content

fix: handle empty streams to avoid zlib EOF errors#63

Open
ajroetker wants to merge 1 commit intoledongthuc:masterfrom
ajroetker:fix/empty-stream-reader
Open

fix: handle empty streams to avoid zlib EOF errors#63
ajroetker wants to merge 1 commit intoledongthuc:masterfrom
ajroetker:fix/empty-stream-reader

Conversation

@ajroetker
Copy link

Summary

  • Return an empty reader for zero-length streams before applying filters
  • Prevents "unexpected EOF" errors from zlib when processing empty FlateDecode streams in PDFs

Test plan

  • Tested with PDFs containing empty streams

Return an empty reader for zero-length streams before applying filters.
This prevents "unexpected EOF" errors from zlib when processing empty
FlateDecode streams in PDFs.
@ajroetker ajroetker force-pushed the fix/empty-stream-reader branch from b417d03 to 8b3e35a Compare January 4, 2026 23:32
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