Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Allow shorter compression output buffer lengths #60

Merged
merged 1 commit into from
Feb 12, 2023
Merged

Conversation

brantburnett
Copy link
Owner

Motivation

The current implementation requires that the compression output buffer have enough room for the maximum possible compressed block size, which is very unlikely to be required.

Modifications

Check the remaining output buffer size before outputting each fragment to the buffer.

Add a benchmark for block compression.

Results

An exception is only thrown if the output buffer is insufficient for the actual compressed size.

Motivation
----------
The current implementation requires that the compression output buffer
have enough room for the maximum possible compressed block size, which
is very unlikely to be required.

Modifications
-------------
Check the remaining output buffer size before outputting each fragment
to the buffer.

Add a benchmark for block compression.

Results
-------
An exception is only thrown if the output buffer is insufficient for the
actual compressed size.
@brantburnett brantburnett merged commit 9b51b68 into main Feb 12, 2023
@brantburnett brantburnett deleted the output-length branch February 12, 2023 13:05
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant