Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix extra byte in DWA compressed data #846

Merged

Conversation

peterhillman
Copy link
Contributor

The size of DWA compressed data is declared to be one byte larger than it needs to be, causing an extra byte to be written at the end of each block. Since the memory is not zero-allocated, this byte is undefined, causing file differences. This should solve the same issue as #750 but without the overhead of zero-allocation, as well as save a few bytes.

This change does not break backwards compatibility, but does mean the file size on disk will differ depending which library version wrote the file. As @alexeyvo points out in #750, the file content used to differ anyway. A safer fix could have been to zero the last extraneous byte and continue writing it, but that would be wasteful.

Signed-off-by: Peter Hillman peterh@wetafx.co.nz

Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
@peterhillman peterhillman added the Needs Discussion To be discussed in the technical steering committee label Oct 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Discussion To be discussed in the technical steering committee v3.0.0-beta
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants