Skip to content

Conversation

@pauldmccarthy
Copy link
Owner

@pauldmccarthy pauldmccarthy commented Aug 11, 2025

This PR fixes a rare bug which would occur when CRC validation is disabled (via the skip_crc_check flag in Python, or the ZRAN_SKIP_CRC_CHECK flag in C).

When CRC validation was disabled, the logic was not moving the buffer offsets forward by 8 bytes. So when the code was searching for the next GZIP stream (in the case of concatenated streams), if the previous 8 byte stream footer (comprising the CRC and size) contained bytes which looked like a new stream (0x1f8b) the code would incorrectly detect a new stream.

I've also updated the project to use setuptools-scm for automatic version number management.

@pauldmccarthy pauldmccarthy force-pushed the bf/intermittent-crc-error branch from eed9e43 to 6f1e439 Compare August 12, 2025 09:00
@pauldmccarthy pauldmccarthy force-pushed the bf/intermittent-crc-error branch from ffd9f8f to 1e9491b Compare August 12, 2025 09:33
@pauldmccarthy pauldmccarthy merged commit 3dcdf81 into main Aug 12, 2025
@pauldmccarthy pauldmccarthy deleted the bf/intermittent-crc-error branch August 12, 2025 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants