Skip to content

Do not reuse ZstdFrameDecompressor in ZstdDecompressor#139

Closed
wendigo wants to merge 1 commit intoairlift:masterfrom
wendigo:serafin/do-not-reuse-zstd-frame-compressor
Closed

Do not reuse ZstdFrameDecompressor in ZstdDecompressor#139
wendigo wants to merge 1 commit intoairlift:masterfrom
wendigo:serafin/do-not-reuse-zstd-frame-compressor

Conversation

@wendigo
Copy link
Contributor

@wendigo wendigo commented Feb 28, 2022

ZstdFrameDecompressor is not thread safe.

ZstdFrameDecompressor is not thread safe.
@martint
Copy link
Member

martint commented Feb 28, 2022

That's intentional. ZstdDecompressor is not thread safe, but instances can be used multiple times. ZstdFrameDecompressor has internal buffers that should be reused to avoid unnecessary allocations when ZstdDecompressor.decompress() gets called multiple times.

@wendigo wendigo closed this Feb 28, 2022
@wendigo wendigo deleted the serafin/do-not-reuse-zstd-frame-compressor branch February 28, 2022 22:25
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