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

Fix zlib code examples. #3113

Open
wants to merge 1 commit into
base: develop2
Choose a base branch
from
Open

Conversation

ericonr
Copy link

@ericonr ericonr commented Mar 17, 2023

  • buffer_out will receive a binary stream, it should be unsigned char
  • strlen shouldn't be used on a binary stream; the actual compression result is in z_stream.total_out [1]
  • strlen() returns a size_t, so we should use "%zu" format specifier

[1] https://stackoverflow.com/questions/12840933/compressed-file-size-after-deflate

- buffer_out will receive a binary stream, it should be unsigned char
- strlen shouldn't be used on a binary stream; the actual compression
  result is in z_stream.total_out [1]
- strlen() returns a size_t, so we should use "%zu" format specifier

[1] https://stackoverflow.com/questions/12840933/compressed-file-size-after-deflate
@CLAassistant
Copy link

CLAassistant commented Mar 17, 2023

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link
Member

@memsharded memsharded left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution.
Supporting code for the docs, as described in those documentation pages is in this repo: https://github.com/conan-io/examples2

The first PR needs to target that repo, and only when it has been merged, update the documentation

@memsharded
Copy link
Member

Hi @ericonr

Do you think you could submit the PR to https://github.com/conan-io/examples2/pulls to support this one?

@ericonr
Copy link
Author

ericonr commented May 17, 2023

For sure!
Just haven't had the time for it. Will try to get to it ASAP

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.

None yet

3 participants