Skip to content

Fixed SDgetcompinfo incorrect behavior#868

Draft
bmribler wants to merge 1 commit intoHDFGroup:hdf_4_3_1from
bmribler:fix_szip_availability
Draft

Fixed SDgetcompinfo incorrect behavior#868
bmribler wants to merge 1 commit intoHDFGroup:hdf_4_3_1from
bmribler:fix_szip_availability

Conversation

@bmribler
Copy link
Copy Markdown
Collaborator

@bmribler bmribler commented Mar 25, 2026

When SZIP library is not available, SDgetcompinfo() fails even though it only needs to retrieve compression metadata, not actually compress/decompress data. The function should succeed in returning compression information regardless of whether the SZIP library is present.

This PR removes check from HCIinit_coder() to allow metadata queries without the szip library.
Fixes #867

Known issue: Reading szip-compressed data from files opened with DFACC_RDWR when only decoder is available may fail. This is a pre-existing architectural issue where file open mode is conflated with operation type. This issue turned out to be too complicated to include in this PR, it will be addressed in a future fix.

When SZIP library is not available, SDgetcompinfo() fails even though it only needs to retrieve compression metadata, not actually compress/decompress data. The function should succeed in returning compression information regardless of whether the SZIP library is present.

This PR removes check from HCIinit_coder() to allow metadata queries without the szip
library.

Known issue: Reading szip-compressed data from files opened with DFACC_RDWR when only decoder is available may fail. This is a pre-existing architectural issue where file open mode is conflated with operation type. This issue turned out to be too complicated to include in this PR, it will be addressed in a future fix.
Ref. = 6
Compression method = SZIP
Compression information is unavailable (no SZIP library)
Option mask = H4_SZ_EC_OPTION_MASK|H4_SZ_RAW_OPTION_MASK (132)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice fix!

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

Labels

Component - C Library Core C library issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants