Skip to content

Conversation

@klauspost
Copy link
Owner

WithDecodeAllCapLimit will limit DecodeAll to decoding cap(dst)-len(dst) bytes, or any size set in WithDecoderMaxMemory.

This can be used to limit decoding to a specific maximum output size.

Disabled by default.

Fixes #647

WithDecodeAllCapLimit will limit DecodeAll to decoding cap(dst)-len(dst) bytes, or any size set in WithDecoderMaxMemory.

This can be used to limit decoding to a specific maximum output size.

Disabled by default.

Fixes #647
Copy link
Contributor

@dsnet dsnet left a comment

Choose a reason for hiding this comment

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

Thanks! I only did a high-level look through and it generally looks sensible. I'll report if there are any bugs with it.

@klauspost
Copy link
Owner Author

@dsnet I will merge it, so it is easier for you to test. I will however not release, since I am mostly AFK for the next few weeks, just FYI.

@klauspost klauspost merged commit 5a3a4a9 into master Jul 29, 2022
@klauspost klauspost deleted the add-DecodeAllCapLimit branch July 29, 2022 10:14
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.

proposal: zstd: add DecodedSize function

3 participants