Skip to content

Conversation

@captainkirk99
Copy link

@captainkirk99 captainkirk99 commented Sep 12, 2025

Fixes for the LZ4 plugin. Fixes #200


Important

Fix and optimize LZ4 plugin by removing static keyword, initializing blockSize, using LZ4_compress_fast, and commenting out debug prints in H5Z_filter_lz4.

  • Function Changes:
    • Remove static keyword from H5Z_filter_lz4 declaration and definition in H5Zlz4.c.
    • Initialize blockSize to DEFAULT_BLOCK_SIZE in forward filter path.
    • Use LZ4_compress_fast instead of LZ4_compress_default in H5Z_filter_lz4.
  • Misc:
    • Comment out debug printf statements in H5Z_filter_lz4 for decompression size mismatch and block size information.

This description was created by Ellipsis for bcb40e0. You can customize this summary. It will automatically update as commits are pushed.

@captainkirk99 captainkirk99 changed the title fixed plugin fixed LZ4 plugin Sep 12, 2025
@captainkirk99 captainkirk99 marked this pull request as draft September 12, 2025 14:10
@captainkirk99
Copy link
Author

captainkirk99 commented Sep 12, 2025

I would like to get a CI running before submitting this PR (see #201).

@captainkirk99
Copy link
Author

OK, approve my workflow runs and we'll see how the CI likes these changes...

@byrnHDF byrnHDF added Filter - LZ4 Type - Bug Priority - 1. High 🔼 These are important issues that should be resolved in the next release labels Sep 19, 2025
@bmaranville
Copy link

I can verify that after this change, the lz4 plugin seems to write valid data, but is broken before this.

@ajelenak
Copy link
Contributor

@bmaranville Can you explain more in what way was this plugin broken before? And when was before? Until the changes in this PR?

@bmaranville
Copy link

Sorry - I was mistaken. The fix seems to be somewhere between version hdf5-1.14.6 and the current master. If I build the lz4 plugin with hdf5-1.14.6 I get this error when decompressing:

testing: lz4
decompressed size not the same: -16131, != 16135

@ajelenak
Copy link
Contributor

Thanks for checking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Filter - LZ4 Priority - 1. High 🔼 These are important issues that should be resolved in the next release Type - Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

LZ4 filter code is broken

5 participants