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

Remove thread local buffers #107

Open
rklaehn opened this issue Jul 7, 2021 · 0 comments
Open

Remove thread local buffers #107

rklaehn opened this issue Jul 7, 2021 · 0 comments

Comments

@rklaehn
Copy link
Contributor

rklaehn commented Jul 7, 2021

The thread local buffers are primarily for the case where you are decompressing something really small. For something larger, allocating is not an issue.

So just replace the entire stuff with this:

  • if the input data is sufficiently small, try to decompress to a stack allocated fixed size buffer
  • if not, or if this fails, just allocate the max size once and discard it again when done. Maybe there is some estimation of decompressed size in zstd_safe.
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

1 participant