Chunked read for ZLibBaseStream might give error results #473

Closed
opened 2026-01-29 22:12:37 +00:00 by claunia · 1 comment
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.
Author
Owner

@adamhathcock commented on GitHub (Oct 2, 2021):

Released here https://www.nuget.org/packages/SharpCompress/0.30.0

@adamhathcock commented on GitHub (Oct 2, 2021): Released here https://www.nuget.org/packages/SharpCompress/0.30.0
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/sharpcompress#473