Skip to content

Conversation

@EdwardX29
Copy link
Contributor

Adds DecompressInto() to zstd_context to match the functionality previously implemented in the zstd file.

In some systems, compressed payloads are prefixed or tagged with the size of the original payload. This allows allocation of a perfectly-sized buffer to hold the decompressed payload. This method provides a way to decompress directly into a pre-allocated buffer.

DecompressInto accepts a destination buffer and requires that the decompressed payload fit into the buffer. If it does not, it returns the original error returned by zstd.

Relates to/Follows up on: #130

Adds DecompressInto() to zstd_context to match the functionality previously implemented in the zstd file.

In some systems, compressed payloads are prefixed or tagged with the size of the original payload. This allows allocation of a perfectly-sized buffer to hold the decompressed payload. This method provides a way to decompress directly into a pre-allocated buffer.

DecompressInto accepts a destination buffer and requires that the decompressed payload fit into the buffer. If it does not, it returns the original error returned by zstd.

Relates to/Follows up on: DataDog#130
@EdwardX29 EdwardX29 force-pushed the ctx-decompress-into branch from 03f2f79 to 9fc0c52 Compare March 19, 2025 18:29
@jbowens
Copy link
Contributor

jbowens commented Mar 19, 2025

@Viq111 tagging you since you reviewed #130. Is this something that we could upstream?

@miretskiy miretskiy requested a review from Viq111 March 28, 2025 18:11
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.

Sorry for the delay, this looks great! Thanks for your contribution!

@Viq111 Viq111 merged commit 815075c into DataDog:1.x Mar 28, 2025
8 checks passed
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