Skip to content

Follow-ups to lz4 decompression bug #194

@embray

Description

@embray

PR #193 was done hastily so that @braingram could have it fixed for a demo tomorrow.

Should do some follow-ups on this though:

  • Clean up handling of the LZ4 block header read state; currently rather ad-hoc in asdf_compresser_lz4_read_block. Thankfully in the doc comments for the function asdf_compressor_lz4_read_header I wrote "reset the position to 0 to re-read from the current input position" which helped me find the bug quickly, because my own code forgot to do that. But this should be improved.
  • Add a regression test -- it seems that none of the test files for compression are large enough that there would be more than one LZ4 compression blocks.
  • I also found an unrelated bug (introduced by Add asdf dd command to the CLI #192) in asdf_ndarray_read_tile_ndim where a call to asdf_ndarray_data_raw wasn't updated to asdf_ndarray_data. Thought I had gotten all of them. But there should be a regression test for this as well (I don't think any of the tests call asdf_ndarray_read_tile_ndim on a compressed array).

Metadata

Metadata

Assignees

No one assigned

    Type

    No fields configured for Task.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions