Chunked read for ZLibBaseStream might give error results #470

Open
opened 2026-01-29 22:12:35 +00:00 by claunia · 0 comments
Owner

Originally created by @amosonn on GitHub (Sep 14, 2021).

When using DeflateStream (which wraps ZLibBaseStream), if the size of the read is unfortunate, we might not get all of the compressed data. When the read from the DeflateStream on which the last piece of input data is read is not large enough to read all of the deflated data, the rest will get lost, since we already set the "nomoredata" flag. See PR #616 for example test which fails and for fix.

Originally created by @amosonn on GitHub (Sep 14, 2021). When using `DeflateStream` (which wraps ZLibBaseStream), if the size of the read is unfortunate, we might not get all of the compressed data. When the read from the `DeflateStream` on which the last piece of input data is read is not large enough to read all of the deflated data, the rest will get lost, since we already set the "`nomoredata`" flag. See PR #616 for example test which fails and for fix.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/sharpcompress#470