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

Higher zstd compression levels for debug info #1290

Open
ishitatsuyuki opened this issue Jun 24, 2024 · 1 comment
Open

Higher zstd compression levels for debug info #1290

ishitatsuyuki opened this issue Jun 24, 2024 · 1 comment

Comments

@ishitatsuyuki
Copy link
Contributor

facebook/zstd#2832 (comment) mentions that:

Starting v1.5.6, zstd at high compression levels features a better compression ratio on 32-bit structures. The .debug_str_offsets section is a pretty good example of this.

Note that compression at level 19 is very slow, and the mentioned optimization only applies to sections where there are lots of 32-bit integers. It will likely not yield benefits for ULEB128-dominated sections. We should test ratio for each section and build a list of sections where zstd-19 is beneficial.

I propose that we introduce new options for --compress-debug-sections:

  • zstd-3 - Level 3, would be equivalent to current behavior of zstd
  • zstd- Level 19 for 32-bit integer sections, level 3 for the rest
  • zstd-19 - Level 19 for everything, in case one is seeking the best ratio
@rui314
Copy link
Owner

rui314 commented Jun 25, 2024

It feels a bit odd to me that we need to manually optimize compression levels. Ideally, zstd should (and I believe could) detect that the data being compressed contains lots of 32-bit integers and compress accordingly. Did you know why they can't do that?

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

No branches or pull requests

2 participants