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

[python] Use BrotliDecompress() #36

Merged
merged 1 commit into from
Mar 16, 2015
Merged

[python] Use BrotliDecompress() #36

merged 1 commit into from
Mar 16, 2015

Conversation

khaledhosny
Copy link
Contributor

So that we can use a callback to dynamically allocate the decompression
buffer, getting rid of the optional bufsize argument to
decompress.decompress().

So that we can use a callback to dynamically allocate the decompression
buffer, getting rid of the optional bufsize argument to
decompress.decompress().
int output_callback(void* data, const uint8_t* buf, size_t count) {
std::vector<uint8_t> *output = (std::vector<uint8_t> *)data;
output->insert(output->end(), buf, buf + count);
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

As anthrotype@ pointed out, please add a return statement.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed already.

szabadka added a commit that referenced this pull request Mar 16, 2015
@szabadka szabadka merged commit b5ba646 into google:master Mar 16, 2015
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