Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zstd.go: Set ZSTD_LEGACY_SUPPORT=4 to decompress legacy payloads #105

Merged
merged 3 commits into from
Mar 23, 2022

Conversation

evanj
Copy link
Contributor

@evanj evanj commented Jul 7, 2021

The compressed output format was finalized with zstd version 0.8. To
support decompression of previous versions, set the macro
ZSTD_LEGACY_SUPPORT=4, which matches the documented default for the
zstd command line tool:

https://github.com/facebook/zstd/blob/dev/programs/README.md

This made the compiled library about 20 kiB larger, but will allow
this to be used with really old zstd payloads.

.circleci/config.yml: Do not test with different versions of this
macro, since the tests now include a check that it can decompress
old payloads.

The compressed output format was finalized with zstd version 0.8. To
support decompression of previous versions, set the macro
ZSTD_LEGACY_SUPPORT=4, which matches the documented default for the
zstd command line tool:

https://github.com/facebook/zstd/blob/dev/programs/README.md

This made the compiled library about 20 kiB larger, but will allow
this to be used with really old zstd payloads.

.circleci/config.yml: Do not test with different versions of this
macro, since the tests now include a check that it can decompress
old payloads.
@Viq111 Viq111 closed this Nov 24, 2021
@niamster niamster reopened this Mar 16, 2022
@niamster
Copy link
Contributor

By default ZSTD prefers to have legacy formats enabled, see discussion in upstream PR facebook/zstd#3079
Homebrew ZSTD maintainer also agreed to enabled it by default, see discussion in upstream PR Homebrew/homebrew-core#95735

Copy link
Collaborator

@Viq111 Viq111 left a comment

Choose a reason for hiding this comment

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

Thanks!

@niamster niamster merged commit 718c6ee into 1.x Mar 23, 2022
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.

3 participants