fix: correct total size in AGI bitfield compression header (closes #659)#663
Closed
botbikamordehai2-sketch wants to merge 1 commit into
Closed
Conversation
Member
|
Interesting, indeed. Look at the file As one can see, the numerical value in the header of the raw data block (30132) is the same as the pointer position at the end of reading of the different rows in the image. Thus the stored value should exclude the 4 bytes for the size. The current implementation is correct. **This is the second useless pull request you are opening, a third one and you will be banned from all our projects ** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The compress function in
agi_bitfield.pycomputed the data size header before writing the row_start table, causing the stored size to be smaller than the actual compressed data. This led to incorrect shape reconstruction when decompressing, resulting in errors like array shape mismatch (e.g., (1,2) vs (2,)) in tests liketest_get_data_edf.Fix
Moved the writing of the row_start table before capturing the total buffer size. Now
data_sizeincludes the row_start table, ensuring the header accurately reflects the full compressed data length.Closes #659