Zlib checksum verification #43

Open
opened 2025-08-29 08:51:37 +00:00 by mateli · 0 comments

DataElementReader.ReadCompressed ignores both the header and the trailer when reading and writing compressed datastream. This means that corrupted data may be red without informing the upper layer which is one of the big benefits with enabling zlib compression.

It should still be possible to read corrupt data so just throwing an exception is an insufficient solution. Marking the DataElement as corrupt is better, then the data can till be used but the upper layer knows that it may be unreliable.

Please also backport this fix to the stable version.

Potential solution here:
https://yal.cc/cs-deflatestream-zlib/

DataElementReader.ReadCompressed ignores both the header and the trailer when reading and writing compressed datastream. This means that corrupted data may be red without informing the upper layer which is one of the big benefits with enabling zlib compression. It should still be possible to read corrupt data so just throwing an exception is an insufficient solution. Marking the DataElement as corrupt is better, then the data can till be used but the upper layer knows that it may be unreliable. Please also backport this fix to the stable version. Potential solution here: https://yal.cc/cs-deflatestream-zlib/
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mahalex/MatFileHandler#43
No description provided.