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

Commits on Mar 17, 2023

  1. Fix zlib code examples.

    - 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
    ericonr committed Mar 17, 2023
    Configuration menu
    Copy the full SHA
    c52d810 View commit details
    Browse the repository at this point in the history