Showing preview only (2,747K chars total). Download the full file or copy to clipboard to get everything.
Repository: madler/zlib
Branch: develop
Commit: 09a1572aa624
Files: 257
Total size: 2.6 MB
Directory structure:
gitextract_rftpr6jl/
├── .cmake-format.yaml
├── .github/
│ └── workflows/
│ ├── c-std.yml
│ ├── cmake.yml
│ ├── configure.yml
│ ├── contribs.yml
│ ├── fuzz.yml
│ ├── msys-cygwin.yml
│ └── others.yml
├── .gitignore
├── BUILD.bazel
├── CMakeLists.txt
├── ChangeLog
├── FAQ
├── INDEX
├── LICENSE
├── MODULE.bazel
├── Makefile.in
├── README
├── README-cmake.md
├── adler32.c
├── amiga/
│ ├── Makefile.pup
│ └── Makefile.sas
├── compress.c
├── configure
├── contrib/
│ ├── CMakeLists.txt
│ ├── README.contrib
│ ├── ada/
│ │ ├── CMakeLists.txt
│ │ ├── buffer_demo.adb
│ │ ├── cmake/
│ │ │ ├── Modules/
│ │ │ │ ├── CMakeADACompiler.cmake.in
│ │ │ │ ├── CMakeADAInformation.cmake
│ │ │ │ ├── CMakeDetermineADACompiler.cmake
│ │ │ │ └── CMakeTestADACompiler.cmake
│ │ │ ├── binder_helper.cmake
│ │ │ ├── compile_helper.cmake
│ │ │ ├── exe_link_helper.cmake
│ │ │ ├── shared_link_helper.cmake
│ │ │ └── static_link_helper.cmake
│ │ ├── mtest.adb
│ │ ├── read.adb
│ │ ├── readme.txt
│ │ ├── test.adb
│ │ ├── zlib-streams.adb
│ │ ├── zlib-streams.ads
│ │ ├── zlib-thin.adb
│ │ ├── zlib-thin.ads
│ │ ├── zlib.adb
│ │ ├── zlib.ads
│ │ └── zlib.gpr
│ ├── blast/
│ │ ├── CMakeLists.txt
│ │ ├── Makefile
│ │ ├── README
│ │ ├── blast-test.c
│ │ ├── blast.c
│ │ ├── blast.h
│ │ ├── blastConfig.cmake.in
│ │ ├── test/
│ │ │ ├── CMakeLists.txt
│ │ │ ├── add_subdirectory_exclude_test.cmake.in
│ │ │ ├── add_subdirectory_test.cmake.in
│ │ │ ├── find_package_no_components_test.cmake.in
│ │ │ ├── find_package_test.cmake.in
│ │ │ └── find_package_wrong_components_test.cmake.in
│ │ ├── test.pk
│ │ ├── test.txt
│ │ └── tester.cmake
│ ├── crc32vx/
│ │ ├── CMakeLists.txt
│ │ ├── README
│ │ ├── crc32_vx.c
│ │ └── crc32_vx_hooks.h
│ ├── delphi/
│ │ ├── ZLib.pas
│ │ ├── ZLibConst.pas
│ │ ├── readme.txt
│ │ └── zlibd32.mak
│ ├── dotzlib/
│ │ ├── DotZLib/
│ │ │ ├── AssemblyInfo.cs
│ │ │ ├── ChecksumImpl.cs
│ │ │ ├── CircularBuffer.cs
│ │ │ ├── CodecBase.cs
│ │ │ ├── Deflater.cs
│ │ │ ├── DotZLib.cs
│ │ │ ├── DotZLib.csproj
│ │ │ ├── GZipStream.cs
│ │ │ ├── Inflater.cs
│ │ │ └── UnitTests.cs
│ │ ├── DotZLib.build
│ │ ├── DotZLib.chm
│ │ ├── DotZLib.sln
│ │ ├── LICENSE_1_0.txt
│ │ └── readme.txt
│ ├── gcc_gvmat64/
│ │ ├── CMakeLists.txt
│ │ └── gvmat64.S
│ ├── infback9/
│ │ ├── CMakeLists.txt
│ │ ├── README
│ │ ├── infback9.c
│ │ ├── infback9.h
│ │ ├── inffix9.h
│ │ ├── inflate9.h
│ │ ├── inftree9.c
│ │ └── inftree9.h
│ ├── iostream/
│ │ ├── test.cpp
│ │ ├── zfstream.cpp
│ │ └── zfstream.h
│ ├── iostream2/
│ │ ├── zstream.h
│ │ └── zstream_test.cpp
│ ├── iostream3/
│ │ ├── CMakeLists.txt
│ │ ├── README
│ │ ├── TODO
│ │ ├── iostream3Config.cmake.in
│ │ ├── test/
│ │ │ ├── CMakeLists.txt
│ │ │ ├── add_subdirectory_exclude_test.cmake.in
│ │ │ ├── add_subdirectory_test.cmake.in
│ │ │ ├── find_package_no_components_test.cmake.in
│ │ │ ├── find_package_test.cmake.in
│ │ │ └── find_package_wrong_components_test.cmake.in
│ │ ├── test.cc
│ │ ├── zfstream.cc
│ │ └── zfstream.h
│ ├── minizip/
│ │ ├── CMakeLists.txt
│ │ ├── LICENSE.Info-Zip
│ │ ├── Makefile
│ │ ├── Makefile.am
│ │ ├── MiniZip64_Changes.txt
│ │ ├── MiniZip64_info.txt
│ │ ├── configure.ac
│ │ ├── crypt.h
│ │ ├── ints.h
│ │ ├── ioapi.c
│ │ ├── ioapi.h
│ │ ├── iowin32.c
│ │ ├── iowin32.h
│ │ ├── make_vms.com
│ │ ├── miniunz.c
│ │ ├── miniunzip.1
│ │ ├── minizip.1
│ │ ├── minizip.c
│ │ ├── minizip.pc.in
│ │ ├── minizip.pc.txt
│ │ ├── minizipConfig.cmake.in
│ │ ├── mztools.c
│ │ ├── mztools.h
│ │ ├── skipset.h
│ │ ├── test/
│ │ │ ├── CMakeLists.txt
│ │ │ ├── add_subdirectory_exclude_test.cmake.in
│ │ │ ├── add_subdirectory_test.cmake.in
│ │ │ ├── find_package_no_components_test.cmake.in
│ │ │ ├── find_package_test.cmake.in
│ │ │ ├── find_package_wrong_components_test.cmake.in
│ │ │ └── test_helper.cm
│ │ ├── unzip.c
│ │ ├── unzip.h
│ │ ├── zip.c
│ │ └── zip.h
│ ├── nuget/
│ │ ├── nuget.csproj
│ │ └── nuget.sln
│ ├── pascal/
│ │ ├── example.pas
│ │ ├── readme.txt
│ │ ├── zlibd32.mak
│ │ └── zlibpas.pas
│ ├── puff/
│ │ ├── CMakeLists.txt
│ │ ├── Makefile
│ │ ├── README
│ │ ├── bin-writer.c
│ │ ├── puff.c
│ │ ├── puff.h
│ │ ├── puffConfig.cmake.in
│ │ ├── pufftest.c
│ │ ├── test/
│ │ │ ├── CMakeLists.txt
│ │ │ ├── add_subdirectory_exclude_test.cmake.in
│ │ │ ├── add_subdirectory_test.cmake.in
│ │ │ ├── find_package_no_components_test.cmake.in
│ │ │ ├── find_package_test.cmake.in
│ │ │ ├── find_package_wrong_components_test.cmake.in
│ │ │ ├── tester-cov.cmake
│ │ │ └── tester.cmake
│ │ └── zeros.raw
│ ├── testzlib/
│ │ ├── CMakeLists.txt
│ │ ├── testzlib.c
│ │ └── testzlib.txt
│ ├── vstudio/
│ │ └── readme.txt
│ └── zlib1-dll/
│ ├── CMakeLists.txt
│ └── readme.txt
├── crc32.c
├── crc32.h
├── deflate.c
├── deflate.h
├── doc/
│ ├── algorithm.txt
│ ├── rfc1950.txt
│ ├── rfc1951.txt
│ ├── rfc1952.txt
│ └── txtvsbin.txt
├── examples/
│ ├── README.examples
│ ├── enough.c
│ ├── fitblk.c
│ ├── gun.c
│ ├── gzappend.c
│ ├── gzjoin.c
│ ├── gzlog.c
│ ├── gzlog.h
│ ├── gznorm.c
│ ├── zlib_how.html
│ ├── zpipe.c
│ ├── zran.c
│ └── zran.h
├── gzclose.c
├── gzguts.h
├── gzlib.c
├── gzread.c
├── gzwrite.c
├── infback.c
├── inffast.c
├── inffast.h
├── inffixed.h
├── inflate.c
├── inflate.h
├── inftrees.c
├── inftrees.h
├── make_vms.com
├── msdos/
│ ├── Makefile.bor
│ ├── Makefile.dj2
│ ├── Makefile.emx
│ ├── Makefile.msc
│ └── Makefile.tc
├── os400/
│ ├── README400
│ ├── bndsrc
│ ├── make.sh
│ ├── zlibfixed.rpgle
│ └── zlibfree.rpgle
├── qnx/
│ └── package.qpg
├── test/
│ ├── CMakeLists.txt
│ ├── add_subdirectory_exclude_test.cmake.in
│ ├── add_subdirectory_test.cmake.in
│ ├── example.c
│ ├── find_package_no_components_test.cmake.in
│ ├── find_package_test.cmake.in
│ ├── find_package_wrong_components_test.cmake.in
│ ├── infcover.c
│ └── minigzip.c
├── treebuild.xml
├── trees.c
├── trees.h
├── uncompr.c
├── watcom/
│ ├── watcom_f.mak
│ └── watcom_l.mak
├── win32/
│ ├── DLL_FAQ.txt
│ ├── Makefile.bor
│ ├── Makefile.gcc
│ ├── Makefile.msc
│ ├── README-WIN32.txt
│ ├── VisualC.txt
│ ├── zlib.def
│ └── zlib1.rc
├── zconf.h.in
├── zlib.3
├── zlib.h
├── zlib.pc.cmakein
├── zlib.pc.in
├── zlibConfig.cmake.in
├── zutil.c
└── zutil.h
================================================
FILE CONTENTS
================================================
================================================
FILE: .cmake-format.yaml
================================================
_help_parse: Options affecting listfile parsing
parse:
_help_additional_commands:
- Specify structure for custom cmake functions
additional_commands:
foo:
flags:
- BAR
- BAZ
kwargs:
HEADERS: '*'
SOURCES: '*'
DEPENDS: '*'
_help_override_spec:
- Override configurations per-command where available
override_spec: {}
_help_vartags:
- Specify variable tags.
vartags: []
_help_proptags:
- Specify property tags.
proptags: []
_help_format: Options affecting formatting.
format:
_help_disable:
- Disable formatting entirely, making cmake-format a no-op
disable: false
_help_line_width:
- How wide to allow formatted cmake files
line_width: 80
_help_tab_size:
- How many spaces to tab for indent
tab_size: 4
_help_use_tabchars:
- If true, lines are indented using tab characters (utf-8
- 0x09) instead of <tab_size> space characters (utf-8 0x20).
- In cases where the layout would require a fractional tab
- character, the behavior of the fractional indentation is
- governed by <fractional_tab_policy>
use_tabchars: false
_help_fractional_tab_policy:
- If <use_tabchars> is True, then the value of this variable
- indicates how fractional indentions are handled during
- whitespace replacement. If set to 'use-space', fractional
- indentation is left as spaces (utf-8 0x20). If set to
- '`round-up` fractional indentation is replaced with a single'
- tab character (utf-8 0x09) effectively shifting the column
- to the next tabstop
fractional_tab_policy: use-space
_help_max_subgroups_hwrap:
- If an argument group contains more than this many sub-groups
- (parg or kwarg groups) then force it to a vertical layout.
max_subgroups_hwrap: 2
_help_max_pargs_hwrap:
- If a positional argument group contains more than this many
- arguments, then force it to a vertical layout.
max_pargs_hwrap: 6
_help_max_rows_cmdline:
- If a cmdline positional group consumes more than this many
- lines without nesting, then invalidate the layout (and nest)
max_rows_cmdline: 2
_help_separate_ctrl_name_with_space:
- If true, separate flow control names from their parentheses
- with a space
separate_ctrl_name_with_space: false
_help_separate_fn_name_with_space:
- If true, separate function names from parentheses with a
- space
separate_fn_name_with_space: false
_help_dangle_parens:
- If a statement is wrapped to more than one line, than dangle
- the closing parenthesis on its own line.
dangle_parens: false
_help_dangle_align:
- If the trailing parenthesis must be 'dangled' on its on
- 'line, then align it to this reference: `prefix`: the start'
- 'of the statement, `prefix-indent`: the start of the'
- 'statement, plus one indentation level, `child`: align to'
- the column of the arguments
dangle_align: prefix
_help_min_prefix_chars:
- If the statement spelling length (including space and
- parenthesis) is smaller than this amount, then force reject
- nested layouts.
min_prefix_chars: 4
_help_max_prefix_chars:
- If the statement spelling length (including space and
- parenthesis) is larger than the tab width by more than this
- amount, then force reject un-nested layouts.
max_prefix_chars: 10
_help_max_lines_hwrap:
- If a candidate layout is wrapped horizontally but it exceeds
- this many lines, then reject the layout.
max_lines_hwrap: 2
_help_line_ending:
- What style line endings to use in the output.
line_ending: unix
_help_command_case:
- Format command names consistently as 'lower' or 'upper' case
command_case: canonical
_help_keyword_case:
- Format keywords consistently as 'lower' or 'upper' case
keyword_case: unchanged
_help_always_wrap:
- A list of command names which should always be wrapped
always_wrap: []
_help_enable_sort:
- If true, the argument lists which are known to be sortable
- will be sorted lexicographicall
enable_sort: true
_help_autosort:
- If true, the parsers may infer whether or not an argument
- list is sortable (without annotation).
autosort: false
_help_require_valid_layout:
- By default, if cmake-format cannot successfully fit
- everything into the desired linewidth it will apply the
- last, most aggressive attempt that it made. If this flag is
- True, however, cmake-format will print error, exit with non-
- zero status code, and write-out nothing
require_valid_layout: false
_help_layout_passes:
- A dictionary mapping layout nodes to a list of wrap
- decisions. See the documentation for more information.
layout_passes: {}
_help_markup: Options affecting comment reflow and formatting.
markup:
_help_bullet_char:
- What character to use for bulleted lists
bullet_char: '*'
_help_enum_char:
- What character to use as punctuation after numerals in an
- enumerated list
enum_char: .
_help_first_comment_is_literal:
- If comment markup is enabled, don't reflow the first comment
- block in each listfile. Use this to preserve formatting of
- your copyright/license statements.
first_comment_is_literal: false
_help_literal_comment_pattern:
- If comment markup is enabled, don't reflow any comment block
- which matches this (regex) pattern. Default is `None`
- (disabled).
literal_comment_pattern: null
_help_fence_pattern:
- Regular expression to match preformat fences in comments
- default= ``r'^\s*([`~]{3}[`~]*)(.*)$'``
fence_pattern: ^\s*([`~]{3}[`~]*)(.*)$
_help_ruler_pattern:
- Regular expression to match rulers in comments default=
- '``r''^\s*[^\w\s]{3}.*[^\w\s]{3}$''``'
ruler_pattern: ^\s*[^\w\s]{3}.*[^\w\s]{3}$
_help_explicit_trailing_pattern:
- If a comment line matches starts with this pattern then it
- is explicitly a trailing comment for the preceding argument.
- Default is '#<'
explicit_trailing_pattern: '#<'
_help_hashruler_min_length:
- If a comment line starts with at least this many consecutive
- hash characters, then don't lstrip() them off. This allows
- for lazy hash rulers where the first hash char is not
- separated by space
hashruler_min_length: 10
_help_canonicalize_hashrulers:
- If true, then insert a space between the first hash char and
- remaining hash chars in a hash ruler, and normalize its
- length to fill the column
canonicalize_hashrulers: true
_help_enable_markup:
- enable comment markup parsing and reflow
enable_markup: true
_help_lint: Options affecting the linter
lint:
_help_disabled_codes:
- a list of lint codes to disable
disabled_codes: []
_help_function_pattern:
- regular expression pattern describing valid function names
function_pattern: '[0-9a-z_]+'
_help_macro_pattern:
- regular expression pattern describing valid macro names
macro_pattern: '[0-9A-Z_]+'
_help_global_var_pattern:
- regular expression pattern describing valid names for
- variables with global (cache) scope
global_var_pattern: '[A-Z][0-9A-Z_]+'
_help_internal_var_pattern:
- regular expression pattern describing valid names for
- variables with global scope (but internal semantic)
internal_var_pattern: _[A-Z][0-9A-Z_]+
_help_local_var_pattern:
- regular expression pattern describing valid names for
- variables with local scope
local_var_pattern: '[a-z][a-z0-9_]+'
_help_private_var_pattern:
- regular expression pattern describing valid names for
- privatedirectory variables
private_var_pattern: _[0-9a-z_]+
_help_public_var_pattern:
- regular expression pattern describing valid names for public
- directory variables
public_var_pattern: '[A-Z][0-9A-Z_]+'
_help_argument_var_pattern:
- regular expression pattern describing valid names for
- function/macro arguments and loop variables.
argument_var_pattern: '[a-z][a-z0-9_]+'
_help_keyword_pattern:
- regular expression pattern describing valid names for
- keywords used in functions or macros
keyword_pattern: '[A-Z][0-9A-Z_]+'
_help_max_conditionals_custom_parser:
- In the heuristic for C0201, how many conditionals to match
- within a loop in before considering the loop a parser.
max_conditionals_custom_parser: 2
_help_min_statement_spacing:
- Require at least this many newlines between statements
min_statement_spacing: 1
_help_max_statement_spacing:
- Require no more than this many newlines between statements
max_statement_spacing: 2
max_returns: 6
max_branches: 12
max_arguments: 5
max_localvars: 15
max_statements: 50
_help_encode: Options affecting file encoding
encode:
_help_emit_byteorder_mark:
- If true, emit the unicode byte-order mark (BOM) at the start
- of the file
emit_byteorder_mark: false
_help_input_encoding:
- Specify the encoding of the input file. Defaults to utf-8
input_encoding: utf-8
_help_output_encoding:
- Specify the encoding of the output file. Defaults to utf-8.
- Note that cmake only claims to support utf-8 so be careful
- when using anything else
output_encoding: utf-8
_help_misc: Miscellaneous configurations options.
misc:
_help_per_command:
- A dictionary containing any per-command configuration
- overrides. Currently only `command_case` is supported.
per_command: {}
================================================
FILE: .github/workflows/c-std.yml
================================================
name: C Standard
# Compile with as many C standards as possible.
# The worflow is setup to fail on any compilation warnings.
on:
workflow_dispatch:
push:
pull_request:
jobs:
main:
name: ${{ matrix.os.name }} ${{ matrix.compiler }} ${{ matrix.arch.name }} ${{ matrix.std.name }} ${{ matrix.builder }}
runs-on: ${{ matrix.os.value }}
strategy:
fail-fast: false
matrix:
os:
- name: Linux
value: ubuntu-latest
- name: MacOS
value: macos-latest
- name: Windows
value: windows-latest
cmake-opt: -G Ninja
- name: Windows ARM64
value: windows-11-arm
cmake-opt: -G Ninja
compiler:
- gcc
- clang
arch:
- name: 64-bit
tag: amd64
compiler-opt: -m64
cmake-opt: -A x64
- name: 32-bit
tag: i386
compiler-opt: -m32
cmake-opt: -A Win32
builder:
- configure
- cmake
std:
- name: c89
value: c89
compiler-opt: -DZLIB_INSECURE
- name: gnu89
value: gnu89
compiler-opt: -DZLIB_INSECURE
- name: c94
value: iso9899:199409
compiler-opt: -DZLIB_INSECURE
- name: c99
value: c99
- name: gnu99
value: gnu99
- name: c11
value: c11
- name: gnu11
value: gnu11
- name: c17
value: c17
- name: gnu17
value: gnu17
- name: c2x
value: c2x
- name: gnu2x
value: gnu2x
exclude:
# Don't run 32-bit on MacOS
- { os: { name: MacOS },
arch: { tag: i386 } }
# Don't run configure on Windows
- { os: { name: Windows },
builder: configure }
# Don't run configure on Windows ARM64
- { os: { name: Windows ARM64 },
builder: configure }
# Don't run gcc 32-bit on Windows
- { os: { name: Windows },
arch: { tag: i386 } }
# Don't run 32 bit on Windows ARM64
- { os: { name: Windows ARM64 },
arch: { tag: i386 } }
# Don't run gcc on Windows ARM64
- { os: { name: Windows ARM64 },
compiler: gcc }
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
show-progress: 'false'
- name: Install packages (Linux)
if: runner.os == 'Linux' && matrix.arch.tag == 'i386'
run: |
sudo apt-get update
sudo apt install gcc-multilib libc6-dev-i386-cross
- name: Install packages (Windows)
if: runner.os == 'Windows'
run: |
choco install --no-progress ninja
- name: Generate project files (configure)
if: matrix.builder == 'configure'
run: |
./configure
env:
CC: ${{ matrix.compiler }}
CFLAGS: -std=${{ matrix.std.value }} ${{ matrix.std.compiler-opt }} ${{ matrix.arch.compiler-opt }} -Werror -Wall -Wextra
- name: Compile source code (configure)
if: matrix.builder == 'configure'
run: make -j2
- name: Run test cases (configure)
if: matrix.builder == 'configure'
run: |
make test
# make cover
- name: Generate project files (cmake)
if: matrix.builder == 'cmake'
run: |
cmake -S . -B ./build1 -D CMAKE_BUILD_TYPE=Release ${{ matrix.os.cmake-opt }} -DZLIB_BUILD_TESTING=OFF
env:
CC: ${{ matrix.compiler }}
CFLAGS: -std=${{ matrix.std.value }} ${{ matrix.std.compiler-opt }} ${{ matrix.arch.compiler-opt }} -Werror -Wall -Wextra
- name: Generate project files with tests (cmake)
if: matrix.builder == 'cmake'
run: |
cmake -S . -B ./build2 -D CMAKE_BUILD_TYPE=Release ${{ matrix.os.cmake-opt }} -DZLIB_BUILD_MINIZIP=ON -DMINIZIP_ENABLE_BZIP2=OFF
env:
CC: ${{ matrix.compiler }}
CFLAGS: -std=${{ matrix.std.value }} ${{ matrix.std.compiler-opt }} ${{ matrix.arch.compiler-opt }} -Wall -Wextra
- name: Compile source code (cmake)
if: matrix.builder == 'cmake'
run: cmake --build ./build1 --config Release
- name: Compile source code with tests (cmake)
if: matrix.builder == 'cmake'
run: cmake --build ./build2 --config Release
- name: Run test cases (cmake)
if: matrix.builder == 'cmake'
run: ctest ./build2 -C Release --output-on-failure --max-width 120
msvc:
name: ${{ matrix.os.name }} ${{ matrix.compiler }} ${{ matrix.arch.name }} ${{ matrix.std.name }} ${{ matrix.builder }}
runs-on: ${{ matrix.os.value }}
strategy:
fail-fast: false
matrix:
os:
- name: Windows
value: windows-latest
- name: Windows ARM64
value: windows-11-arm
compiler:
- cl
arch:
- name: 32-bit
value: -A Win32
- name: 64-bit
value: -A x64
- name: ARM64
value: -A ARM64
builder:
- cmake
std:
- name: default
value: ""
- name: C11
value: /std:c11
- name: C17
value: /std:c17
# not available on the runner yet
# - name: C20
# value: /std:c20
- name: latest
value: /std:clatest
exclude:
# Don't run 32-bit on Windows ARM64
- { os: { name: Windows ARM64 },
arch: { name: 32-bit } }
# Don't run x64 on Windows ARM64
- { os: { name: Windows ARM64 },
arch: { name: 64-bit } }
# Don't run ARM64 on regular Windows
- { os: { name: Windows },
arch: { name: ARM64 } }
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
show-progress: 'false'
- name: Generate project files (cmake)
run: |
cmake -S . -B ./build1 ${{ matrix.arch.value }} -D CMAKE_BUILD_TYPE=Release -DZLIB_BUILD_TESTING=OFF
env:
CC: ${{ matrix.compiler }}
CFLAGS: /WX ${{ matrix.std.value }}
- name: Generate project files with tests (cmake)
run: |
cmake -S . -B ./build2 ${{ matrix.arch.value }} -D CMAKE_BUILD_TYPE=Release -DZLIB_BUILD_MINIZIP=ON -DMINIZIP_ENABLE_BZIP2=OFF
env:
CC: ${{ matrix.compiler }}
CFLAGS: ${{ matrix.std.value }}
- name: Compile source code (cmake)
run: cmake --build ./build1 --config Release -v
- name: Compile source code with tests(cmake)
run: cmake --build ./build2 --config Release -v
- name: Run test cases (cmake)
run: ctest ./build2 -C Release --output-on-failure --max-width 120
================================================
FILE: .github/workflows/cmake.yml
================================================
name: CMake
on: [push, pull_request]
jobs:
ci-cmake:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- name: Ubuntu GCC
os: ubuntu-latest
compiler: gcc
cflags: -Wall -Wextra
pkgtgt: package package_source
cmake-args: -DMINIZIP_ENABLE_BZIP2=ON
- name: Ubuntu GCC no shared
os: ubuntu-latest
compiler: gcc
cflags: -Wall -Wextra
pkgtgt: package package_source
cmake-args: -DZLIB_BUILD_SHARED=OFF -DMINIZIP_ENABLE_BZIP2=ON
- name: Ubuntu GCC no static
os: ubuntu-latest
compiler: gcc
cflags: -Wall -Wextra
pkgtgt: package package_source
cmake-args: -DZLIB_BUILD_STATIC=OFF -DMINIZIP_ENABLE_BZIP2=ON
- name: Ubuntu GCC -O3
os: ubuntu-latest
compiler: gcc
cflags: -O3 -Wall -Wextra
pkgtgt: package package_source
cmake-args: -DMINIZIP_ENABLE_BZIP2=ON
- name: Ubuntu Clang
os: ubuntu-latest
compiler: clang
cflags: -Wall -Wextra
pkgtgt: package package_source
cmake-args: -DMINIZIP_ENABLE_BZIP2=ON
- name: Ubuntu Clang Debug
os: ubuntu-latest
compiler: clang
cflags: -Wall -Wextra
build-config: Debug
pkgtgt: package package_source
cmake-args: -DMINIZIP_ENABLE_BZIP2=ON
- name: Windows MSVC Win32
os: windows-latest
compiler: cl
cflags: /W3
cmake-args: -A Win32
pkgtgt: PACKAGE
- name: Windows MSVC Win64
os: windows-latest
compiler: cl
cflags: /W3
cmake-args: -A x64 -DMINIZIP_ENABLE_BZIP2=OFF
pkgtgt: PACKAGE
- name: Windows MSVC ARM64
os: windows-11-arm
compiler: cl
cflags: /W3
cmake-args: -A ARM64 -DMINIZIP_ENABLE_BZIP2=OFF
pkgtgt: PACKAGE
- name: Windows GCC
os: windows-latest
compiler: gcc
cflags: -Wall -Wextra
cmake-args: -G Ninja -DMINIZIP_ENABLE_BZIP2=OFF
pkgtgt: package
- name: macOS Clang
os: macos-latest
compiler: clang
cflags: -Wall -Wextra
pkgtgt: package
cmake-args: -DMINIZIP_ENABLE_BZIP2=ON
- name: macOS GCC 13
os: macos-latest
compiler: gcc-13
cflags: -Wall -Wextra
pkgtgt: package
cmake-args: -DMINIZIP_ENABLE_BZIP2=ON
- name: macOS GCC 14
os: macos-latest
compiler: gcc-14
cflags: -Wall -Wextra
pkgtgt: package
cmake-args: -DMINIZIP_ENABLE_BZIP2=ON
- name: macOS GCC 15
os: macos-latest
compiler: gcc-15
cflags: -Wall -Wextra
pkgtgt: package
cmake-args: -DMINIZIP_ENABLE_BZIP2=ON
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Install packages (Windows)
if: runner.os == 'Windows'
run: |
choco install --no-progress nsis
- name: Install packages (Linux)
if: runner.os == 'Linux'
run: |
sudo apt install libbz2-dev
- name: Generate project files
run: cmake -S . -B ../build ${{ matrix.cmake-args }} -D CMAKE_BUILD_TYPE=${{ matrix.build-config || 'Release' }} -DZLIB_BUILD_MINIZIP=ON
env:
CC: ${{ matrix.compiler }}
CFLAGS: ${{ matrix.cflags }}
- name: Compile source code
run: cmake --build ../build --config ${{ matrix.build-config || 'Release' }}
- name: Run test cases
run: ctest -C Release --output-on-failure --max-width 120
working-directory: ../build
- name: create packages
run: cmake --build ../build --config ${{ matrix.build-config || 'Release' }} -t ${{ matrix.pkgtgt }}
- name: Upload build errors
uses: actions/upload-artifact@v6
if: failure()
with:
name: ${{ matrix.name }} (cmake)
path: |
../build/CMakeFiles/CMakeOutput.log
../build/CMakeFiles/CMakeError.log
retention-days: 7
================================================
FILE: .github/workflows/configure.yml
================================================
name: Configure
on: [push, pull_request]
jobs:
ci-configure:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- name: Ubuntu GCC
os: ubuntu-latest
compiler: gcc
configure-args: --warn
# Test out of source builds
- name: Ubuntu GCC OSB
os: ubuntu-latest
compiler: gcc
configure-args: --warn
build-dir: ../build
src-dir: ../zlib
- name: Ubuntu GCC ARM SF
os: ubuntu-latest
compiler: arm-linux-gnueabi-gcc
configure-args: --warn
chost: arm-linux-gnueabi
packages: qemu-system qemu-user gcc-arm-linux-gnueabi libc-dev-armel-cross
qemu-run: qemu-arm -L /usr/arm-linux-gnueabi
- name: Ubuntu GCC ARM HF
os: ubuntu-latest
compiler: arm-linux-gnueabihf-gcc
configure-args: --warn
chost: arm-linux-gnueabihf
packages: qemu-system qemu-user gcc-arm-linux-gnueabihf libc-dev-armhf-cross
qemu-run: qemu-arm -L /usr/arm-linux-gnueabihf
- name: Ubuntu GCC AARCH64
os: ubuntu-latest
compiler: aarch64-linux-gnu-gcc
configure-args: --warn
chost: aarch64-linux-gnu
packages: qemu-system qemu-user gcc-aarch64-linux-gnu libc-dev-arm64-cross
qemu-run: qemu-aarch64 -L /usr/aarch64-linux-gnu
- name: Ubuntu GCC PPC
os: ubuntu-latest
compiler: powerpc-linux-gnu-gcc
configure-args: --warn --static
chost: powerpc-linux-gnu
packages: qemu-system qemu-user gcc-powerpc-linux-gnu libc-dev-powerpc-cross
qemu-run: qemu-ppc -L /usr/powerpc-linux-gnu
cflags: -static
ldflags: -static
- name: Ubuntu GCC PPC64
os: ubuntu-latest
compiler: powerpc64-linux-gnu-gcc
configure-args: --warn --static
chost: powerpc-linux-gnu
packages: qemu-system qemu-user gcc-powerpc64-linux-gnu libc-dev-ppc64-cross
qemu-run: qemu-ppc64 -L /usr/powerpc64-linux-gnu
cflags: -static
ldflags: -static
- name: Ubuntu GCC PPC64LE
os: ubuntu-latest
compiler: powerpc64le-linux-gnu-gcc
configure-args: --warn
chost: powerpc64le-linux-gnu
packages: qemu-system qemu-user gcc-powerpc64le-linux-gnu libc-dev-ppc64el-cross
qemu-run: qemu-ppc64le -L /usr/powerpc64le-linux-gnu
- name: Ubuntu GCC S390X
os: ubuntu-latest
compiler: s390x-linux-gnu-gcc
configure-args: --warn --static
chost: s390x-linux-gnu
packages: qemu-system qemu-user gcc-s390x-linux-gnu libc-dev-s390x-cross
qemu-run: qemu-s390x -L /usr/s390x-linux-gnu
cflags: -static
ldflags: -static
- name: macOS GCC 13
os: macos-latest
compiler: gcc-13
configure-args: --warn
- name: macOS GCC 14
os: macos-latest
compiler: gcc-14
configure-args: --warn
- name: macOS GCC 15
os: macos-latest
compiler: gcc-15
configure-args: --warn
- name: macOS Clang
os: macos-latest
compiler: clang
configure-args: --warn
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Install packages (Ubuntu)
if: runner.os == 'Linux' && matrix.packages
run: |
sudo apt-get update
sudo apt-get install -y ${{ matrix.packages }}
- name: Generate project files
run: |
[ -d ${{ matrix.build-dir || '.' }} ] || mkdir ${{ matrix.build-dir || '.' }}
cd ${{ matrix.build-dir || '.' }}
${{ matrix.src-dir || '.' }}/configure ${{ matrix.configure-args }}
env:
CC: ${{ matrix.compiler }}
CFLAGS: ${{ matrix.cflags }}
LDFLAGS: ${{ matrix.ldflags }}
CHOST: ${{ matrix.chost }}
- name: Compile source code
run: make -j2
working-directory: ${{ matrix.build-dir }}
- name: Run test cases
run: |
make test
# make cover
working-directory: ${{ matrix.build-dir }}
env:
QEMU_RUN: ${{ matrix.qemu-run }}
- name: Upload build errors
uses: actions/upload-artifact@v6
if: failure()
with:
name: ${{ matrix.name }} (configure)
path: |
${{ matrix.build-dir || '.' }}/configure.log
retention-days: 7
================================================
FILE: .github/workflows/contribs.yml
================================================
name: contribs
on: [push, pull_request]
jobs:
ci-cmake:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- name: Ubuntu all contribs
os: ubuntu-latest
cmake-args: -DZLIB_BUILD_ADA=ON -DZLIB_BUILD_BLAST=ON -DZLIB_BUILD_IOSTREAM3=ON -DZLIB_BUILD_MINIZIP=ON -DZLIB_BUILD_PUFF=ON -DZLIB_WITH_INFBACK9=ON -DZLIB_WITH_CRC32VX=ON -DZLIB_WITH_GVMAT64=ON
src_dir: .
- name: Ubuntu ADA
os: ubuntu-latest
src_dir: contrib/ada
install_zlib: yes
- name: Ubuntu BLAST
os: ubuntu-latest
src_dir: contrib/blast
install_zlib: yes
- name: Ubuntu IOSTREAM
os: ubuntu-latest
src_dir: contrib/iostream3
install_zlib: yes
- name: Ubuntu MINIZIP
os: ubuntu-latest
src_dir: contrib/minizip
install_zlib: yes
- name: Ubuntu PUFF
os: ubuntu-latest
src_dir: contrib/puff
install_zlib: yes
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install packages
run: |
sudo apt install gnat libbz2-dev
- name: Install zlib
if: ${{ matrix.install_zlib == 'yes' }}
run: |
cmake -S . -B ../build-zlib -DCMAKE_BUILD_TYPE=Release
cmake --build ../build-zlib --config Release
sudo cmake --install ../build-zlib
- name: Generate project files
run: cmake -S ${{ matrix.src_dir }} -B ../build ${{ matrix.cmake-args }} -DCMAKE_BUILD_TYPE=Release
- name: Compile source code
run: cmake --build ../build --config Release
- name: Run test cases
run: ctest -C Release --output-on-failure --max-width 120
working-directory: ../build
================================================
FILE: .github/workflows/fuzz.yml
================================================
name: OSS-Fuzz
on: [pull_request]
jobs:
Fuzzing:
runs-on: ubuntu-latest
steps:
- name: Build Fuzzers
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
with:
oss-fuzz-project-name: 'zlib'
dry-run: false
- name: Run Fuzzers
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
with:
oss-fuzz-project-name: 'zlib'
fuzz-seconds: 300
dry-run: false
- name: Upload Crash
uses: actions/upload-artifact@v6
if: failure()
with:
name: artifacts
path: ./out/artifacts
================================================
FILE: .github/workflows/msys-cygwin.yml
================================================
name: mingw/cygwin
on: [push, pull_request]
jobs:
MSys:
runs-on: ${{ matrix.os || 'windows-latest' }}
strategy:
fail-fast: false
matrix:
sys: [mingw32, mingw64, ucrt64, clang64, clangarm64]
include:
- sys: clangarm64
os: windows-11-arm
name: MSys - ${{ matrix.sys }}
defaults:
run:
shell: msys2 {0}
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Setup MSYS2
uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.sys }}
update: true
install: >-
make
pacboy: >-
toolchain:p
cmake:p
- name: Configure
if: matrix.sys != 'clang64'
run: |
cmake -G"Unix Makefiles" \
-S . \
-B build \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DCMAKE_BUILD_TYPE=Release \
-DZLIB_BUILD_MINIZIP=ON \
-DMINIZIP_ENABLE_BZIP2=ON
- name: Configure clang64
if: matrix.sys == 'clang64'
run: |
CC=clang cmake -G"Unix Makefiles" \
-S . \
-B build \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DCMAKE_BUILD_TYPE=Release \
-DZLIB_BUILD_MINIZIP=ON \
-DMINIZIP_ENABLE_BZIP2=ON
- name: Build
run: cmake --build build --config Release
- name: Run tests
run: ctest --output-on-failure --test-dir build -C Release
cygwin:
strategy:
fail-fast: false
runs-on: windows-latest
defaults:
run:
shell: C:\cygwin\bin\bash.exe --login -o igncr '{0}'
name: Cygwin
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Setup cygwin
uses: cygwin/cygwin-install-action@master
with:
packages: >-
cmake
cygwin-devel
gcc-core
gcc-g++
ninja
- name: Configure
run: |
cmake /cygdrive/d/a/zlib/zlib \
-B build \
-DCMAKE_BUILD_TYPE=Release \
-DZLIB_BUILD_MINIZIP=ON \
-DMINIZIP_ENABLE_BZIP2=OFF \
-G Ninja
- name: Build
run: cmake --build build --config Release -v -j1
- name: Run tests
run: ctest --output-on-failure --test-dir build -C Release
================================================
FILE: .github/workflows/others.yml
================================================
name: anyVM-OSes
on: [push, pull_request]
jobs:
dragonflybsd:
runs-on: ubuntu-latest
name: DragonflyBSD
steps:
- uses: actions/checkout@v6
- name: DragonflyBSD
uses: vmactions/dragonflybsd-vm@v1
with:
copyback: false
prepare: |
pkg install -y cmake gcc14 bzip2
run: |
cmake . -B build -DZLIB_BUILD_MINIZIP=ON -DMINIZIP_ENABLE_BZIP2=ON
cmake --build build/
ctest --test-dir build --output-on-failure
freebsd:
runs-on: ubuntu-latest
name: FreeBSD - ${{ matrix.name }}
strategy:
fail-fast: false
matrix:
include:
- name: aarch64
- name: x86_64
steps:
- uses: actions/checkout@v6
- name: FreeBSD - ${{ matrix.name }}
uses: vmactions/freebsd-vm@v1
with:
arch: ${{ matrix.name }}
copyback: false
release: "15.0"
prepare: |
pkg install -y cmake gcc14 bzip2
run: |
cmake . -B build -DZLIB_BUILD_MINIZIP=ON -DMINIZIP_ENABLE_BZIP2=ON
cmake --build build/
ctest --test-dir build --output-on-failure -E .*summary
netbsd:
runs-on: ubuntu-latest
name: NetBSD - ${{ matrix.name }}
strategy:
fail-fast: false
matrix:
include:
- name: aarch64
- name: x86_64
steps:
- uses: actions/checkout@v6
- name: NetBSD - ${{ matrix.name }}
uses: vmactions/netbsd-vm@v1
with:
copyback: false
prepare: |
export PATH="/usr/pkg/sbin:/usr/pkg/bin:$PATH"
export PKG_PATH="https://cdn.NetBSD.org/pub/pkgsrc/packages"
export PKG_PATH="$PKG_PATH/$(uname -s)/$(uname -m)/$(uname -r|cut -f '1 2' -d.)/All"
/usr/sbin/pkg_add cmake
/usr/sbin/pkg_add bzip2
run: |
cmake . -B build -DZLIB_BUILD_MINIZIP=ON -DMINIZIP_ENABLE_BZIP2=ON
cmake --build build/
ctest --test-dir build --output-on-failure
omni-os:
runs-on: ubuntu-latest
name: OmniOS
steps:
- uses: actions/checkout@v6
- name: OmniOS
uses: vmactions/omnios-vm@v1
with:
copyback: false
prepare: |
pkg install cmake gcc14 make bzip2
run: |
cmake . -B build -DZLIB_BUILD_MINIZIP=ON -DMINIZIP_ENABLE_BZIP2=ON
cmake --build build/
ctest --test-dir build --output-on-failure
openbsd:
runs-on: ubuntu-latest
name: OpenBSD - ${{ matrix.name }}
strategy:
fail-fast: false
matrix:
include:
- name: aarch64
- name: x86_64
- name: riscv64
steps:
- uses: actions/checkout@v6
- name: OpenBSD - ${{ matrix.name }}
uses: vmactions/openbsd-vm@v1
with:
arch: ${{ matrix.name }}
copyback: false
prepare: |
pkg_add cmake
bzip2
run: |
cmake . -B build -DZLIB_BUILD_MINIZIP=ON -DMINIZIP_ENABLE_BZIP2=ON
cmake --build build/
ctest --test-dir build
# openindiana:
# runs-on: ubuntu-latest
# name: OpenIndiana
# steps:
# - uses: actions/checkout@v6
# - name: OpenIndiana
# uses: vmactions/openindiana-vm@v0
# with:
# copyback: false
# prepare: |
# pkg install cmake gcc-14 make bzip2
# run: |
# cmake . -B build -DZLIB_BUILD_MINIZIP=ON -DMINIZIP_ENABLE_BZIP2=ON
# cmake --build build/
# ctest --test-dir build --output-on-failure
solaris:
runs-on: ubuntu-latest
name: Solaris
steps:
- uses: actions/checkout@v6
- name: Solaris
uses: vmactions/solaris-vm@v1
with:
copyback: false
release: "11.4-gcc"
prepare: |
pkgutil -U
pkgutil -y -i cmake bzip2
run: |
cmake . -B build -DZLIB_BUILD_MINIZIP=ON -DMINIZIP_ENABLE_BZIP2=ON
cmake --build build/
ctest --test-dir build --output-on-failure
================================================
FILE: .gitignore
================================================
*.diff
*.patch
*.orig
*.rej
*~
*.a
*.lo
*.o
*.dylib
*.gcda
*.gcno
*.gcov
/zconf.h
/Makefile
/example
/example64
/examplesh
**/libz.so*
/minigzip
/minigzip64
/minigzipsh
/zlib.pc
/configure.log
/build
.DS_Store
.vs
*.user
*.nupkg
contrib/vstudio/vc143/x86
contrib/vstudio/vc143/x64
contrib/vstudio/vc143/arm
contrib/vstudio/vc143/arm64
contrib/nuget/bin
contrib/nuget/obj
*.included
# Bazel directories
/bazel-*
/bazel-bin
/bazel-genfiles
/bazel-out
/bazel-testlogs
user.bazelrc
# MODULE.bazel.lock is ignored for now as per this recommendation:
# https://github.com/bazelbuild/bazel/issues/20369
MODULE.bazel.lock
================================================
FILE: BUILD.bazel
================================================
# Copied from https://github.com/bazelbuild/bazel-central-registry/tree/main/modules/zlib/1.3.1.bcr.4/patches
# Adapted from https://github.com/protocolbuffers/protobuf/blob/master/third_party/zlib.BUILD
# Copyright 2008 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following disclaimer
# in the documentation and/or other materials provided with the
# distribution.
# * Neither the name of Google Inc. nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# Code generated by the Protocol Buffer compiler is owned by the owner
# of the input file used when generating it. This code is not
# standalone and requires a support library to be linked with it. This
# support library is itself covered by the above license.
load("@rules_cc//cc:defs.bzl", "cc_library")
load("@rules_license//rules:license.bzl", "license")
package(
default_applicable_licenses = [":license"],
)
license(
name = "license",
license_kinds = ["@rules_license//licenses/spdx:Zlib"],
license_text = "LICENSE",
)
exports_files([
"LICENSE",
])
_ZLIB_HEADERS = [
"crc32.h",
"deflate.h",
"gzguts.h",
"inffast.h",
"inffixed.h",
"inflate.h",
"inftrees.h",
"trees.h",
"zconf.h",
"zlib.h",
"zutil.h",
]
_ZLIB_PREFIXED_HEADERS = ["zlib/include/" + hdr for hdr in _ZLIB_HEADERS]
# In order to limit the damage from the `includes` propagation
# via `:zlib`, copy the public headers to a subdirectory and
# expose those.
genrule(
name = "copy_public_headers",
srcs = _ZLIB_HEADERS,
outs = _ZLIB_PREFIXED_HEADERS,
cmd_bash = "cp $(SRCS) $(@D)/zlib/include/",
cmd_bat = " && ".join(
["@copy /Y \"$(location %s)\" \"$(@D)\\zlib\\include\\\" >NUL" %
s for s in _ZLIB_HEADERS],
),
)
config_setting(
name = "mingw_gcc_compiler",
flag_values = {
"@bazel_tools//tools/cpp:compiler": "mingw-gcc",
},
visibility = [":__subpackages__"],
)
cc_library(
name = "z",
srcs = [
"adler32.c",
"compress.c",
"crc32.c",
"deflate.c",
"gzclose.c",
"gzlib.c",
"gzread.c",
"gzwrite.c",
"infback.c",
"inffast.c",
"inflate.c",
"inftrees.c",
"trees.c",
"uncompr.c",
"zutil.c",
# Include the un-prefixed headers in srcs to work
# around the fact that zlib isn't consistent in its
# choice of <> or "" delimiter when including itself.
] + _ZLIB_HEADERS,
hdrs = _ZLIB_PREFIXED_HEADERS,
copts = select({
":mingw_gcc_compiler": [
"-fpermissive",
],
"@platforms//os:windows": [],
"//conditions:default": [
"-Wno-deprecated-non-prototype",
"-Wno-unused-variable",
"-Wno-implicit-function-declaration",
],
}),
includes = ["zlib/include/"],
visibility = ["//visibility:public"],
)
alias(
name = "zlib",
actual = ":z",
visibility = ["//visibility:public"],
)
================================================
FILE: CMakeLists.txt
================================================
cmake_minimum_required(VERSION 3.12...3.31)
project(
zlib
LANGUAGES C
VERSION 1.3.2.1
HOMEPAGE_URL "https://zlib.net/"
DESCRIPTION "a general-purpose lossless data-compression library")
# ============================================================================
# CPack
# ============================================================================
set(CPACK_PACKAGE_VENDOR "zlib-Project")
set(CPACK_PACKAGE_DESCRIPTION_FILE ${zlib_SOURCE_DIR}/README)
set(CPACK_RESOURCE_FILE_LICENSE ${zlib_SOURCE_DIR}/LICENSE)
set(CPACK_RESOURCE_FILE_README ${zlib_SOURCE_DIR}/README)
# ============================================================================
# configuration
# ============================================================================
option(ZLIB_BUILD_TESTING "Enable Zlib Examples as tests" ON)
option(ZLIB_BUILD_SHARED "Enable building zlib shared library" ON)
option(ZLIB_BUILD_STATIC "Enable building zlib static library" ON)
option(ZLIB_INSTALL "Enable installation of zlib" ON)
option(ZLIB_PREFIX "prefix for all types and library functions, see zconf.h.in"
OFF)
mark_as_advanced(ZLIB_PREFIX)
get_property(IS_MULTI GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
if(NOT DEFINED CMAKE_BUILD_TYPE AND NOT IS_MULTI)
message(STATUS "No CMAKE_BUILD_TYPE set -- using Release")
set(CMAKE_BUILD_TYPE Release)
endif(NOT DEFINED CMAKE_BUILD_TYPE AND NOT IS_MULTI)
include(CheckCSourceCompiles)
include(CheckFunctionExists)
include(CheckIncludeFile)
include(CMakePackageConfigHelpers)
include(CheckTypeSize)
include(CPack)
include(GNUInstallDirs)
set(CPACK_INCLUDED TRUE)
if(NOT ZLIB_CONF_WRITTEN)
set(Z_PREFIX ${ZLIB_PREFIX})
set(CONF_OUT_FILE ${zlib_BINARY_DIR}/zconf.h.cmakein)
file(READ ${zlib_SOURCE_DIR}/zconf.h ZCONF_CONTENT LIMIT 245)
file(WRITE ${CONF_OUT_FILE} ${ZCONF_CONTENT})
file(APPEND ${CONF_OUT_FILE} "#cmakedefine Z_PREFIX 1\n")
file(APPEND ${CONF_OUT_FILE} "#cmakedefine HAVE_STDARG_H 1\n")
file(APPEND ${CONF_OUT_FILE} "#cmakedefine HAVE_UNISTD_H 1\n")
file(READ ${zlib_SOURCE_DIR}/zconf.h ZCONF_CONTENT OFFSET 244)
set(FIRST_ITEM TRUE)
foreach(item IN LISTS ZCONF_CONTENT)
if(FIRST_ITEM)
string(APPEND OUT_CONTENT ${item})
set(FIRST_ITEM FALSE)
else(FIRST_ITEM)
string(APPEND OUT_CONTENT "\;" ${item})
endif(FIRST_ITEM)
endforeach(item IN LISTS ${ZCONF_CONTENT})
file(APPEND ${CONF_OUT_FILE} ${OUT_CONTENT})
set(ZLIB_CONF_WRITTEN
TRUE
CACHE BOOL "zconf.h.cmakein was created")
mark_as_advanced(ZLIB_CONF_WRITTEN)
endif(NOT ZLIB_CONF_WRITTEN)
#
# Check to see if we have large file support
#
set(CMAKE_REQUIRED_DEFINITIONS -D_LARGEFILE64_SOURCE=1)
check_type_size(off64_t OFF64_T)
unset(CMAKE_REQUIRED_DEFINITIONS) # clear variable
#
# Check for fseeko
#
check_function_exists(fseeko HAVE_FSEEKO)
#
# Check for stdarg.h
#
check_include_file(stdarg.h HAVE_STDARG_H)
#
# Check for unistd.h
#
check_include_file(unistd.h HAVE_UNISTD_H)
#
# Check visibility attribute is supported
#
if(MSVC)
set(CMAKE_REQUIRED_FLAGS "-WX")
else(MSVC)
set(CMAKE_REQUIRED_FLAGS "-Werror")
endif(MSVC)
check_c_source_compiles(
"
#include <stdlib.h>
static void f(void) __attribute__ ((visibility(\"hidden\")));
int main(void) {return 0;}
"
HAVE___ATTR__VIS_HIDDEN)
unset(CMAKE_COMPILE_FLAGS)
set(ZLIB_PC ${zlib_BINARY_DIR}/zlib.pc)
configure_file(${zlib_SOURCE_DIR}/zlib.pc.cmakein ${ZLIB_PC} @ONLY)
configure_file(${zlib_BINARY_DIR}/zconf.h.cmakein ${zlib_BINARY_DIR}/zconf.h)
# ============================================================================
# zlib
# ============================================================================
set(ZLIB_PUBLIC_HDRS ${zlib_BINARY_DIR}/zconf.h zlib.h)
set(ZLIB_PRIVATE_HDRS
crc32.h
deflate.h
gzguts.h
inffast.h
inffixed.h
inflate.h
inftrees.h
trees.h
zutil.h)
set(ZLIB_SRCS
adler32.c
compress.c
crc32.c
deflate.c
gzclose.c
gzlib.c
gzread.c
gzwrite.c
inflate.c
infback.c
inftrees.c
inffast.c
trees.c
uncompr.c
zutil.c)
if(WIN32)
set(zlib_static_suffix "s")
set(CMAKE_DEBUG_POSTFIX "d")
endif(WIN32)
if(ZLIB_BUILD_SHARED)
add_library(
zlib SHARED ${ZLIB_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}
$<$<OR:$<BOOL:${WIN32}>,$<BOOL:${CYGWIN}>>:win32/zlib1.rc>)
add_library(ZLIB::ZLIB ALIAS zlib)
target_include_directories(
zlib
PUBLIC $<BUILD_INTERFACE:${zlib_BINARY_DIR}>
$<BUILD_INTERFACE:${zlib_SOURCE_DIR}>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
target_compile_definitions(
zlib
PRIVATE ZLIB_BUILD
$<$<BOOL:NOT:${HAVE_FSEEKO}>:NO_FSEEKO>
$<$<BOOL:${HAVE___ATTR__VIS_HIDDEN}>:HAVE_HIDDEN>
$<$<BOOL:${MSVC}>:_CRT_SECURE_NO_DEPRECATE>
$<$<BOOL:${MSVC}>:_CRT_NONSTDC_NO_DEPRECATE>
PUBLIC $<$<BOOL:${HAVE_OFF64_T}>:_LARGEFILE64_SOURCE=1>)
set(INSTALL_VERSION ${zlib_VERSION})
if(NOT CYGWIN)
set_target_properties(zlib PROPERTIES SOVERSION ${zlib_VERSION_MAJOR}
VERSION ${INSTALL_VERSION})
endif(NOT CYGWIN)
set_target_properties(
zlib
PROPERTIES DEFINE_SYMBOL ZLIB_DLL
EXPORT_NAME ZLIB
OUTPUT_NAME z)
if(UNIX
AND NOT APPLE
AND NOT (CMAKE_SYSTEM_NAME STREQUAL AIX)
AND NOT (CMAKE_SYSTEM_NAME STREQUAL SunOS))
# On unix-like platforms the library is almost always called libz
set_target_properties(
zlib
PROPERTIES LINK_FLAGS
"-Wl,--version-script,\"${zlib_SOURCE_DIR}/zlib.map\"")
endif(
UNIX
AND NOT APPLE
AND NOT (CMAKE_SYSTEM_NAME STREQUAL AIX)
AND NOT (CMAKE_SYSTEM_NAME STREQUAL SunOS))
endif(ZLIB_BUILD_SHARED)
if(ZLIB_BUILD_STATIC)
add_library(zlibstatic STATIC ${ZLIB_SRCS} ${ZLIB_PUBLIC_HDRS}
${ZLIB_PRIVATE_HDRS})
add_library(ZLIB::ZLIBSTATIC ALIAS zlibstatic)
target_include_directories(
zlibstatic
PUBLIC $<BUILD_INTERFACE:${zlib_BINARY_DIR}>
$<BUILD_INTERFACE:${zlib_SOURCE_DIR}>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
target_compile_definitions(
zlibstatic
PRIVATE ZLIB_BUILD
$<$<BOOL:NOT:${HAVE_FSEEKO}>:NO_FSEEKO>
$<$<BOOL:${HAVE___ATTR__VIS_HIDDEN}>:HAVE_HIDDEN>
$<$<BOOL:${MSVC}>:_CRT_SECURE_NO_DEPRECATE>
$<$<BOOL:${MSVC}>:_CRT_NONSTDC_NO_DEPRECATE>
PUBLIC $<$<BOOL:${HAVE_OFF64_T}>:_LARGEFILE64_SOURCE=1>)
set_target_properties(
zlibstatic PROPERTIES EXPORT_NAME ZLIBSTATIC OUTPUT_NAME
z${zlib_static_suffix})
endif(ZLIB_BUILD_STATIC)
if(ZLIB_INSTALL)
if(ZLIB_BUILD_SHARED)
install(
TARGETS zlib
COMPONENT Runtime
EXPORT zlibSharedExport
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}")
install(
EXPORT zlibSharedExport
FILE ZLIB-shared.cmake
NAMESPACE ZLIB::
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/zlib)
if(MSVC)
install(
FILES $<TARGET_PDB_FILE:zlib>
COMPONENT Runtime
DESTINATION ${CMAKE_INSTALL_BINDIR}
CONFIGURATIONS Debug OR RelWithDebInfo
OPTIONAL)
endif(MSVC)
endif(ZLIB_BUILD_SHARED)
if(ZLIB_BUILD_STATIC)
install(
TARGETS zlibstatic
COMPONENT Development
EXPORT zlibStaticExport
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}")
install(
EXPORT zlibStaticExport
FILE ZLIB-static.cmake
NAMESPACE ZLIB::
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/zlib)
endif(ZLIB_BUILD_STATIC)
configure_package_config_file(
${zlib_SOURCE_DIR}/zlibConfig.cmake.in
${zlib_BINARY_DIR}/ZLIBConfig.cmake
INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/zlib)
write_basic_package_version_file(
"${zlib_BINARY_DIR}/ZLIBConfigVersion.cmake"
VERSION "${zlib_VERSION}"
COMPATIBILITY AnyNewerVersion)
install(FILES ${zlib_BINARY_DIR}/ZLIBConfig.cmake
${zlib_BINARY_DIR}/ZLIBConfigVersion.cmake
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/zlib)
install(
FILES ${ZLIB_PUBLIC_HDRS}
COMPONENT Development
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
install(
FILES zlib.3
COMPONENT Docs
DESTINATION "${CMAKE_INSTALL_MANDIR}/man3")
install(
FILES LICENSE
doc/algorithm.txt
doc/crc-doc.1.0.pdf
doc/rfc1950.txt
doc/rfc1951.txt
doc/rfc1952.txt
doc/txtvsbin.txt
COMPONENT Docs
DESTINATION "${CMAKE_INSTALL_DOCDIR}/zlib")
install(
FILES ${ZLIB_PC}
COMPONENT Development
DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
endif(ZLIB_INSTALL)
# ============================================================================
# Tests
# ============================================================================
if(ZLIB_BUILD_TESTING)
enable_testing()
add_subdirectory(test)
endif(ZLIB_BUILD_TESTING)
add_subdirectory(contrib)
================================================
FILE: ChangeLog
================================================
ChangeLog file for zlib
Changes in 1.3.2.1 (xx Feb 2026)
-
Changes in 1.3.2 (17 Feb 2026)
- Continued rewrite of CMake build [Vollstrecker]
- Various portability improvements
- Various github workflow additions and improvements
- Check for negative lengths in crc32_combine functions
- Copy only the initialized window contents in inflateCopy
- Prevent the use of insecure functions without an explicit request
- Add compressBound_z and deflateBound_z functions for large values
- Use atomics to build inflate fixed tables once
- Add definition of ZLIB_INSECURE to build tests with c89 and c94
- Add --undefined option to ./configure for UBSan checker
- Copy only the initialized deflate state in deflateCopy
- Zero inflate state on allocation
- Remove untgz from contrib
- Add _z versions of the compress and uncompress functions
- Vectorize the CRC-32 calculation on the s390x
- Set bit 11 of the zip header flags in minizip if UTF-8
- Update OS/400 support
- Add a test to configure to check for a working compiler
- Check for invalid NULL pointer inputs to zlib operations
- Add --mandir to ./configure to specify manual directory
- Add LICENSE.Info-Zip to contrib/minizip
- Remove vstudio projects in lieu of cmake-generated projects
- Replace strcpy() with memcpy() in contrib/minizip
Changes in 1.3.1.2 (8 Dec 2025)
- Improve portability to RISC OS
- Permit compiling contrib/minizip/unzip.c with decryption
- Enable build of shared library on AIX
- Make deflateBound() more conservative and handle Z_STREAM_END
- Add zipAlreadyThere() to minizip zip.c to help avoid duplicates
- Make z_off_t 64 bits by default
- Add deflateUsed() function to get the used bits in the last byte
- Avoid out-of-bounds pointer arithmetic in inflateCopy()
- Add Haiku to configure for proper LDSHARED settings
- Add Bazel targets
- Complete rewrite of CMake build [Vollstrecker]
- Clarify the use of errnum in gzerror()
- Note that gzseek() requests are deferred until the next operation
- Note the use of gzungetc() to run a deferred seek while reading
- Fix bug in inflatePrime() for 16-bit ints
- Add a "G" option to force gzip, disabling transparency in gzread()
- Improve the discrimination between trailing garbage and bad gzip
- Allow gzflush() to write empty gzip members
- Remove redundant frees of point list on error in examples/zran.c
- Clarify the use of inflateGetHeader()
- Update links to the RFCs
- Return all available uncompressed data on error in gzread.c
- Support non-blocking devices in the gz* routines
- Various other small improvements
Changes in 1.3.1 (22 Jan 2024)
- Reject overflows of zip header fields in minizip
- Fix bug in inflateSync() for data held in bit buffer
- Add LIT_MEM define to use more memory for a small deflate speedup
- Fix decision on the emission of Zip64 end records in minizip
- Add bounds checking to ERR_MSG() macro, used by zError()
- Neutralize zip file traversal attacks in miniunz
- Fix a bug in ZLIB_DEBUG compiles in check_match()
- Various portability and appearance improvements
Changes in 1.3 (18 Aug 2023)
- Remove K&R function definitions and zlib2ansi
- Fix bug in deflateBound() for level 0 and memLevel 9
- Fix bug when gzungetc() is used immediately after gzopen()
- Fix bug when using gzflush() with a very small buffer
- Fix crash when gzsetparams() attempted for transparent write
- Fix test/example.c to work with FORCE_STORED
- Rewrite of zran in examples (see zran.c version history)
- Fix minizip to allow it to open an empty zip file
- Fix reading disk number start on zip64 files in minizip
- Fix logic error in minizip argument processing
- Add minizip testing to Makefile
- Read multiple bytes instead of byte-by-byte in minizip unzip.c
- Add memory sanitizer to configure (--memory)
- Various portability improvements
- Various documentation improvements
- Various spelling and typo corrections
Changes in 1.2.13 (13 Oct 2022)
- Fix configure issue that discarded provided CC definition
- Correct incorrect inputs provided to the CRC functions
- Repair prototypes and exporting of new CRC functions
- Fix inflateBack to detect invalid input with distances too far
- Have infback() deliver all of the available output up to any error
- Fix a bug when getting a gzip header extra field with inflate()
- Fix bug in block type selection when Z_FIXED used
- Tighten deflateBound bounds
- Remove deleted assembler code references
- Various portability and appearance improvements
Changes in 1.2.12 (27 Mar 2022)
- Cygwin does not have _wopen(), so do not create gzopen_w() there
- Permit a deflateParams() parameter change as soon as possible
- Limit hash table inserts after switch from stored deflate
- Fix bug when window full in deflate_stored()
- Fix CLEAR_HASH macro to be usable as a single statement
- Avoid a conversion error in gzseek when off_t type too small
- Have Makefile return non-zero error code on test failure
- Avoid some conversion warnings in gzread.c and gzwrite.c
- Update use of errno for newer Windows CE versions
- Small speedup to inflate [psumbera]
- Return an error if the gzputs string length can't fit in an int
- Add address checking in clang to -w option of configure
- Don't compute check value for raw inflate if asked to validate
- Handle case where inflateSync used when header never processed
- Avoid the use of ptrdiff_t
- Avoid an undefined behavior of memcpy() in gzappend()
- Avoid undefined behaviors of memcpy() in gz*printf()
- Avoid an undefined behavior of memcpy() in _tr_stored_block()
- Make the names in functions declarations identical to definitions
- Remove old assembler code in which bugs have manifested
- Fix deflateEnd() to not report an error at start of raw deflate
- Add legal disclaimer to README
- Emphasize the need to continue decompressing gzip members
- Correct the initialization requirements for deflateInit2()
- Fix a bug that can crash deflate on some input when using Z_FIXED
- Assure that the number of bits for deflatePrime() is valid
- Use a structure to make globals in enough.c evident
- Use a macro for the printf format of big_t in enough.c
- Clean up code style in enough.c, update version
- Use inline function instead of macro for index in enough.c
- Clarify that prefix codes are counted in enough.c
- Show all the codes for the maximum tables size in enough.c
- Add gznorm.c example, which normalizes gzip files
- Fix the zran.c example to work on a multiple-member gzip file
- Add tables for crc32_combine(), to speed it up by a factor of 200
- Add crc32_combine_gen() and crc32_combine_op() for fast combines
- Speed up software CRC-32 computation by a factor of 1.5 to 3
- Use atomic test and set, if available, for dynamic CRC tables
- Don't bother computing check value after successful inflateSync()
- Correct comment in crc32.c
- Add use of the ARMv8 crc32 instructions when requested
- Use ARM crc32 instructions if the ARM architecture has them
- Explicitly note that the 32-bit check values are 32 bits
- Avoid adding empty gzip member after gzflush with Z_FINISH
- Fix memory leak on error in gzlog.c
- Fix error in comment on the polynomial representation of a byte
- Clarify gz* function interfaces, referring to parameter names
- Change macro name in inflate.c to avoid collision in VxWorks
- Correct typo in blast.c
- Improve portability of contrib/minizip
- Fix indentation in minizip's zip.c
- Replace black/white with allow/block. (theresa-m)
- minizip warning fix if MAXU32 already defined. (gvollant)
- Fix unztell64() in minizip to work past 4GB. (Daniël Hörchner)
- Clean up minizip to reduce warnings for testing
- Add fallthrough comments for gcc
- Eliminate use of ULL constants
- Separate out address sanitizing from warnings in configure
- Remove destructive aspects of make distclean
- Check for cc masquerading as gcc or clang in configure
- Fix crc32.c to compile local functions only if used
Changes in 1.2.11 (15 Jan 2017)
- Fix deflate stored bug when pulling last block from window
- Permit immediate deflateParams changes before any deflate input
Changes in 1.2.10 (2 Jan 2017)
- Avoid warnings on snprintf() return value
- Fix bug in deflate_stored() for zero-length input
- Fix bug in gzwrite.c that produced corrupt gzip files
- Remove files to be installed before copying them in Makefile.in
- Add warnings when compiling with assembler code
Changes in 1.2.9 (31 Dec 2016)
- Fix contrib/minizip to permit unzipping with desktop API [Zouzou]
- Improve contrib/blast to return unused bytes
- Assure that gzoffset() is correct when appending
- Improve compress() and uncompress() to support large lengths
- Fix bug in test/example.c where error code not saved
- Remedy Coverity warning [Randers-Pehrson]
- Improve speed of gzprintf() in transparent mode
- Fix inflateInit2() bug when windowBits is 16 or 32
- Change DEBUG macro to ZLIB_DEBUG
- Avoid uninitialized access by gzclose_w()
- Allow building zlib outside of the source directory
- Fix bug that accepted invalid zlib header when windowBits is zero
- Fix gzseek() problem on MinGW due to buggy _lseeki64 there
- Loop on write() calls in gzwrite.c in case of non-blocking I/O
- Add --warn (-w) option to ./configure for more compiler warnings
- Reject a window size of 256 bytes if not using the zlib wrapper
- Fix bug when level 0 used with Z_HUFFMAN or Z_RLE
- Add --debug (-d) option to ./configure to define ZLIB_DEBUG
- Fix bugs in creating a very large gzip header
- Add uncompress2() function, which returns the input size used
- Assure that deflateParams() will not switch functions mid-block
- Dramatically speed up deflation for level 0 (storing)
- Add gzfread(), duplicating the interface of fread()
- Add gzfwrite(), duplicating the interface of fwrite()
- Add deflateGetDictionary() function
- Use snprintf() for later versions of Microsoft C
- Fix *Init macros to use z_ prefix when requested
- Replace as400 with os400 for OS/400 support [Monnerat]
- Add crc32_z() and adler32_z() functions with size_t lengths
- Update Visual Studio project files [AraHaan]
Changes in 1.2.8 (28 Apr 2013)
- Update contrib/minizip/iowin32.c for Windows RT [Vollant]
- Do not force Z_CONST for C++
- Clean up contrib/vstudio [Roß]
- Correct spelling error in zlib.h
- Fix mixed line endings in contrib/vstudio
Changes in 1.2.7.3 (13 Apr 2013)
- Fix version numbers and DLL names in contrib/vstudio/*/zlib.rc
Changes in 1.2.7.2 (13 Apr 2013)
- Change check for a four-byte type back to hexadecimal
- Fix typo in win32/Makefile.msc
- Add casts in gzwrite.c for pointer differences
Changes in 1.2.7.1 (24 Mar 2013)
- Replace use of unsafe string functions with snprintf if available
- Avoid including stddef.h on Windows for Z_SOLO compile [Niessink]
- Fix gzgetc undefine when Z_PREFIX set [Turk]
- Eliminate use of mktemp in Makefile (not always available)
- Fix bug in 'F' mode for gzopen()
- Add inflateGetDictionary() function
- Correct comment in deflate.h
- Use _snprintf for snprintf in Microsoft C
- On Darwin, only use /usr/bin/libtool if libtool is not Apple
- Delete "--version" file if created by "ar --version" [Richard G.]
- Fix configure check for veracity of compiler error return codes
- Fix CMake compilation of static lib for MSVC2010 x64
- Remove unused variable in infback9.c
- Fix argument checks in gzlog_compress() and gzlog_write()
- Clean up the usage of z_const and respect const usage within zlib
- Clean up examples/gzlog.[ch] comparisons of different types
- Avoid shift equal to bits in type (caused endless loop)
- Fix uninitialized value bug in gzputc() introduced by const patches
- Fix memory allocation error in examples/zran.c [Nor]
- Fix bug where gzopen(), gzclose() would write an empty file
- Fix bug in gzclose() when gzwrite() runs out of memory
- Check for input buffer malloc failure in examples/gzappend.c
- Add note to contrib/blast to use binary mode in stdio
- Fix comparisons of differently signed integers in contrib/blast
- Check for invalid code length codes in contrib/puff
- Fix serious but very rare decompression bug in inftrees.c
- Update inflateBack() comments, since inflate() can be faster
- Use underscored I/O function names for WINAPI_FAMILY
- Add _tr_flush_bits to the external symbols prefixed by --zprefix
- Add contrib/vstudio/vc10 pre-build step for static only
- Quote --version-script argument in CMakeLists.txt
- Don't specify --version-script on Apple platforms in CMakeLists.txt
- Fix casting error in contrib/testzlib/testzlib.c
- Fix types in contrib/minizip to match result of get_crc_table()
- Simplify contrib/vstudio/vc10 with 'd' suffix
- Add TOP support to win32/Makefile.msc
- Support i686 and amd64 assembler builds in CMakeLists.txt
- Fix typos in the use of _LARGEFILE64_SOURCE in zconf.h
- Add vc11 and vc12 build files to contrib/vstudio
- Add gzvprintf() as an undocumented function in zlib
- Fix configure for Sun shell
- Remove runtime check in configure for four-byte integer type
- Add casts and consts to ease user conversion to C++
- Add man pages for minizip and miniunzip
- In Makefile uninstall, don't rm if preceding cd fails
- Do not return Z_BUF_ERROR if deflateParam() has nothing to write
Changes in 1.2.7 (2 May 2012)
- Replace use of memmove() with a simple copy for portability
- Test for existence of strerror
- Restore gzgetc_ for backward compatibility with 1.2.6
- Fix build with non-GNU make on Solaris
- Require gcc 4.0 or later on Mac OS X to use the hidden attribute
- Include unistd.h for Watcom C
- Use __WATCOMC__ instead of __WATCOM__
- Do not use the visibility attribute if NO_VIZ defined
- Improve the detection of no hidden visibility attribute
- Avoid using __int64 for gcc or solo compilation
- Cast to char * in gzprintf to avoid warnings [Zinser]
- Fix make_vms.com for VAX [Zinser]
- Don't use library or built-in byte swaps
- Simplify test and use of gcc hidden attribute
- Fix bug in gzclose_w() when gzwrite() fails to allocate memory
- Add "x" (O_EXCL) and "e" (O_CLOEXEC) modes support to gzopen()
- Fix bug in test/minigzip.c for configure --solo
- Fix contrib/vstudio project link errors [Mohanathas]
- Add ability to choose the builder in make_vms.com [Schweda]
- Add DESTDIR support to mingw32 win32/Makefile.gcc
- Fix comments in win32/Makefile.gcc for proper usage
- Allow overriding the default install locations for cmake
- Generate and install the pkg-config file with cmake
- Build both a static and a shared version of zlib with cmake
- Include version symbols for cmake builds
- If using cmake with MSVC, add the source directory to the includes
- Remove unneeded EXTRA_CFLAGS from win32/Makefile.gcc [Truta]
- Move obsolete emx makefile to old [Truta]
- Allow the use of -Wundef when compiling or using zlib
- Avoid the use of the -u option with mktemp
- Improve inflate() documentation on the use of Z_FINISH
- Recognize clang as gcc
- Add gzopen_w() in Windows for wide character path names
- Rename zconf.h in CMakeLists.txt to move it out of the way
- Add source directory in CMakeLists.txt for building examples
- Look in build directory for zlib.pc in CMakeLists.txt
- Remove gzflags from zlibvc.def in vc9 and vc10
- Fix contrib/minizip compilation in the MinGW environment
- Update ./configure for Solaris, support --64 [Mooney]
- Remove -R. from Solaris shared build (possible security issue)
- Avoid race condition for parallel make (-j) running example
- Fix type mismatch between get_crc_table() and crc_table
- Fix parsing of version with "-" in CMakeLists.txt [Snider, Ziegler]
- Fix the path to zlib.map in CMakeLists.txt
- Force the native libtool in Mac OS X to avoid GNU libtool [Beebe]
- Add instructions to win32/Makefile.gcc for shared install [Torri]
Changes in 1.2.6.1 (12 Feb 2012)
- Avoid the use of the Objective-C reserved name "id"
- Include io.h in gzguts.h for Microsoft compilers
- Fix problem with ./configure --prefix and gzgetc macro
- Include gz_header definition when compiling zlib solo
- Put gzflags() functionality back in zutil.c
- Avoid library header include in crc32.c for Z_SOLO
- Use name in GCC_CLASSIC as C compiler for coverage testing, if set
- Minor cleanup in contrib/minizip/zip.c [Vollant]
- Update make_vms.com [Zinser]
- Remove unnecessary gzgetc_ function
- Use optimized byte swap operations for Microsoft and GNU [Snyder]
- Fix minor typo in zlib.h comments [Rzesniowiecki]
Changes in 1.2.6 (29 Jan 2012)
- Update the Pascal interface in contrib/pascal
- Fix function numbers for gzgetc_ in zlibvc.def files
- Fix configure.ac for contrib/minizip [Schiffer]
- Fix large-entry detection in minizip on 64-bit systems [Schiffer]
- Have ./configure use the compiler return code for error indication
- Fix CMakeLists.txt for cross compilation [McClure]
- Fix contrib/minizip/zip.c for 64-bit architectures [Dalsnes]
- Fix compilation of contrib/minizip on FreeBSD [Marquez]
- Correct suggested usages in win32/Makefile.msc [Shachar, Horvath]
- Include io.h for Turbo C / Borland C on all platforms [Truta]
- Make version explicit in contrib/minizip/configure.ac [Bosmans]
- Avoid warning for no encryption in contrib/minizip/zip.c [Vollant]
- Minor cleanup up contrib/minizip/unzip.c [Vollant]
- Fix bug when compiling minizip with C++ [Vollant]
- Protect for long name and extra fields in contrib/minizip [Vollant]
- Avoid some warnings in contrib/minizip [Vollant]
- Add -I../.. -L../.. to CFLAGS for minizip and miniunzip
- Add missing libs to minizip linker command
- Add support for VPATH builds in contrib/minizip
- Add an --enable-demos option to contrib/minizip/configure
- Add the generation of configure.log by ./configure
- Exit when required parameters not provided to win32/Makefile.gcc
- Have gzputc return the character written instead of the argument
- Use the -m option on ldconfig for BSD systems [Tobias]
- Correct in zlib.map when deflateResetKeep was added
Changes in 1.2.5.3 (15 Jan 2012)
- Restore gzgetc function for binary compatibility
- Do not use _lseeki64 under Borland C++ [Truta]
- Update win32/Makefile.msc to build test/*.c [Truta]
- Remove old/visualc6 given CMakefile and other alternatives
- Update AS400 build files and documentation [Monnerat]
- Update win32/Makefile.gcc to build test/*.c [Truta]
- Permit stronger flushes after Z_BLOCK flushes
- Avoid extraneous empty blocks when doing empty flushes
- Permit Z_NULL arguments to deflatePending
- Allow deflatePrime() to insert bits in the middle of a stream
- Remove second empty static block for Z_PARTIAL_FLUSH
- Write out all of the available bits when using Z_BLOCK
- Insert the first two strings in the hash table after a flush
Changes in 1.2.5.2 (17 Dec 2011)
- fix ld error: unable to find version dependency 'ZLIB_1.2.5'
- use relative symlinks for shared libs
- Avoid searching past window for Z_RLE strategy
- Assure that high-water mark initialization is always applied in deflate
- Add assertions to fill_window() in deflate.c to match comments
- Update python link in README
- Correct spelling error in gzread.c
- Fix bug in gzgets() for a concatenated empty gzip stream
- Correct error in comment for gz_make()
- Change gzread() and related to ignore junk after gzip streams
- Allow gzread() and related to continue after gzclearerr()
- Allow gzrewind() and gzseek() after a premature end-of-file
- Simplify gzseek() now that raw after gzip is ignored
- Change gzgetc() to a macro for speed (~40% speedup in testing)
- Fix gzclose() to return the actual error last encountered
- Always add large file support for windows
- Include zconf.h for windows large file support
- Include zconf.h.cmakein for windows large file support
- Update zconf.h.cmakein on make distclean
- Merge vestigial vsnprintf determination from zutil.h to gzguts.h
- Clarify how gzopen() appends in zlib.h comments
- Correct documentation of gzdirect() since junk at end now ignored
- Add a transparent write mode to gzopen() when 'T' is in the mode
- Update python link in zlib man page
- Get inffixed.h and MAKEFIXED result to match
- Add a ./config --solo option to make zlib subset with no library use
- Add undocumented inflateResetKeep() function for CAB file decoding
- Add --cover option to ./configure for gcc coverage testing
- Add #define ZLIB_CONST option to use const in the z_stream interface
- Add comment to gzdopen() in zlib.h to use dup() when using fileno()
- Note behavior of uncompress() to provide as much data as it can
- Add files in contrib/minizip to aid in building libminizip
- Split off AR options in Makefile.in and configure
- Change ON macro to Z_ARG to avoid application conflicts
- Facilitate compilation with Borland C++ for pragmas and vsnprintf
- Include io.h for Turbo C / Borland C++
- Move example.c and minigzip.c to test/
- Simplify incomplete code table filling in inflate_table()
- Remove code from inflate.c and infback.c that is impossible to execute
- Test the inflate code with full coverage
- Allow deflateSetDictionary, inflateSetDictionary at any time (in raw)
- Add deflateResetKeep and fix inflateResetKeep to retain dictionary
- Fix gzwrite.c to accommodate reduced memory zlib compilation
- Have inflate() with Z_FINISH avoid the allocation of a window
- Do not set strm->adler when doing raw inflate
- Fix gzeof() to behave just like feof() when read is not past end of file
- Fix bug in gzread.c when end-of-file is reached
- Avoid use of Z_BUF_ERROR in gz* functions except for premature EOF
- Document gzread() capability to read concurrently written files
- Remove hard-coding of resource compiler in CMakeLists.txt [Blammo]
Changes in 1.2.5.1 (10 Sep 2011)
- Update FAQ entry on shared builds (#13)
- Avoid symbolic argument to chmod in Makefile.in
- Fix bug and add consts in contrib/puff [Oberhumer]
- Update contrib/puff/zeros.raw test file to have all block types
- Add full coverage test for puff in contrib/puff/Makefile
- Fix static-only-build install in Makefile.in
- Fix bug in unzGetCurrentFileInfo() in contrib/minizip [Kuno]
- Add libz.a dependency to shared in Makefile.in for parallel builds
- Spell out "number" (instead of "nb") in zlib.h for total_in, total_out
- Replace $(...) with `...` in configure for non-bash sh [Bowler]
- Add darwin* to Darwin* and solaris* to SunOS\ 5* in configure [Groffen]
- Add solaris* to Linux* in configure to allow gcc use [Groffen]
- Add *bsd* to Linux* case in configure [Bar-Lev]
- Add inffast.obj to dependencies in win32/Makefile.msc
- Correct spelling error in deflate.h [Kohler]
- Change libzdll.a again to libz.dll.a (!) in win32/Makefile.gcc
- Add test to configure for GNU C looking for gcc in output of $cc -v
- Add zlib.pc generation to win32/Makefile.gcc [Weigelt]
- Fix bug in zlib.h for _FILE_OFFSET_BITS set and _LARGEFILE64_SOURCE not
- Add comment in zlib.h that adler32_combine with len2 < 0 makes no sense
- Make NO_DIVIDE option in adler32.c much faster (thanks to John Reiser)
- Make stronger test in zconf.h to include unistd.h for LFS
- Apply Darwin patches for 64-bit file offsets to contrib/minizip [Slack]
- Fix zlib.h LFS support when Z_PREFIX used
- Add updated as400 support (removed from old) [Monnerat]
- Avoid deflate sensitivity to volatile input data
- Avoid division in adler32_combine for NO_DIVIDE
- Clarify the use of Z_FINISH with deflateBound() amount of space
- Set binary for output file in puff.c
- Use u4 type for crc_table to avoid conversion warnings
- Apply casts in zlib.h to avoid conversion warnings
- Add OF to prototypes for adler32_combine_ and crc32_combine_ [Miller]
- Improve inflateSync() documentation to note indeterminacy
- Add deflatePending() function to return the amount of pending output
- Correct the spelling of "specification" in FAQ [Randers-Pehrson]
- Add a check in configure for stdarg.h, use for gzprintf()
- Check that pointers fit in ints when gzprint() compiled old style
- Add dummy name before $(SHAREDLIBV) in Makefile [Bar-Lev, Bowler]
- Delete line in configure that adds -L. libz.a to LDFLAGS [Weigelt]
- Add debug records in assembler code [Londer]
- Update RFC references to use http://tools.ietf.org/html/... [Li]
- Add --archs option, use of libtool to configure for Mac OS X [Borstel]
Changes in 1.2.5 (19 Apr 2010)
- Disable visibility attribute in win32/Makefile.gcc [Bar-Lev]
- Default to libdir as sharedlibdir in configure [Nieder]
- Update copyright dates on modified source files
- Update trees.c to be able to generate modified trees.h
- Exit configure for MinGW, suggesting win32/Makefile.gcc
- Check for NULL path in gz_open [Homurlu]
Changes in 1.2.4.5 (18 Apr 2010)
- Set sharedlibdir in configure [Torok]
- Set LDFLAGS in Makefile.in [Bar-Lev]
- Avoid mkdir objs race condition in Makefile.in [Bowler]
- Add ZLIB_INTERNAL in front of internal inter-module functions and arrays
- Define ZLIB_INTERNAL to hide internal functions and arrays for GNU C
- Don't use hidden attribute when it is a warning generator (e.g. Solaris)
Changes in 1.2.4.4 (18 Apr 2010)
- Fix CROSS_PREFIX executable testing, CHOST extract, mingw* [Torok]
- Undefine _LARGEFILE64_SOURCE in zconf.h if it is zero, but not if empty
- Try to use bash or ksh regardless of functionality of /bin/sh
- Fix configure incompatibility with NetBSD sh
- Remove attempt to run under bash or ksh since have better NetBSD fix
- Fix win32/Makefile.gcc for MinGW [Bar-Lev]
- Add diagnostic messages when using CROSS_PREFIX in configure
- Added --sharedlibdir option to configure [Weigelt]
- Use hidden visibility attribute when available [Frysinger]
Changes in 1.2.4.3 (10 Apr 2010)
- Only use CROSS_PREFIX in configure for ar and ranlib if they exist
- Use CROSS_PREFIX for nm [Bar-Lev]
- Assume _LARGEFILE64_SOURCE defined is equivalent to true
- Avoid use of undefined symbols in #if with && and ||
- Make *64 prototypes in gzguts.h consistent with functions
- Add -shared load option for MinGW in configure [Bowler]
- Move z_off64_t to public interface, use instead of off64_t
- Remove ! from shell test in configure (not portable to Solaris)
- Change +0 macro tests to -0 for possibly increased portability
Changes in 1.2.4.2 (9 Apr 2010)
- Add consistent carriage returns to readme.txt's in masmx86 and masmx64
- Really provide prototypes for *64 functions when building without LFS
- Only define unlink() in minigzip.c if unistd.h not included
- Update README to point to contrib/vstudio project files
- Move projects/vc6 to old/ and remove projects/
- Include stdlib.h in minigzip.c for setmode() definition under WinCE
- Clean up assembler builds in win32/Makefile.msc [Rowe]
- Include sys/types.h for Microsoft for off_t definition
- Fix memory leak on error in gz_open()
- Symbolize nm as $NM in configure [Weigelt]
- Use TEST_LDSHARED instead of LDSHARED to link test programs [Weigelt]
- Add +0 to _FILE_OFFSET_BITS and _LFS64_LARGEFILE in case not defined
- Fix bug in gzeof() to take into account unused input data
- Avoid initialization of structures with variables in puff.c
- Updated win32/README-WIN32.txt [Rowe]
Changes in 1.2.4.1 (28 Mar 2010)
- Remove the use of [a-z] constructs for sed in configure [gentoo 310225]
- Remove $(SHAREDLIB) from LIBS in Makefile.in [Creech]
- Restore "for debugging" comment on sprintf() in gzlib.c
- Remove fdopen for MVS from gzguts.h
- Put new README-WIN32.txt in win32 [Rowe]
- Add check for shell to configure and invoke another shell if needed
- Fix big fat stinking bug in gzseek() on uncompressed files
- Remove vestigial F_OPEN64 define in zutil.h
- Set and check the value of _LARGEFILE_SOURCE and _LARGEFILE64_SOURCE
- Avoid errors on non-LFS systems when applications define LFS macros
- Set EXE to ".exe" in configure for MINGW [Kahle]
- Match crc32() in crc32.c exactly to the prototype in zlib.h [Sherrill]
- Add prefix for cross-compilation in win32/makefile.gcc [Bar-Lev]
- Add DLL install in win32/makefile.gcc [Bar-Lev]
- Allow Linux* or linux* from uname in configure [Bar-Lev]
- Allow ldconfig to be redefined in configure and Makefile.in [Bar-Lev]
- Add cross-compilation prefixes to configure [Bar-Lev]
- Match type exactly in gz_load() invocation in gzread.c
- Match type exactly of zcalloc() in zutil.c to zlib.h alloc_func
- Provide prototypes for *64 functions when building zlib without LFS
- Don't use -lc when linking shared library on MinGW
- Remove errno.h check in configure and vestigial errno code in zutil.h
Changes in 1.2.4 (14 Mar 2010)
- Fix VER3 extraction in configure for no fourth subversion
- Update zlib.3, add docs to Makefile.in to make .pdf out of it
- Add zlib.3.pdf to distribution
- Don't set error code in gzerror() if passed pointer is NULL
- Apply destination directory fixes to CMakeLists.txt [Lowman]
- Move #cmakedefine's to a new zconf.in.cmakein
- Restore zconf.h for builds that don't use configure or cmake
- Add distclean to dummy Makefile for convenience
- Update and improve INDEX, README, and FAQ
- Update CMakeLists.txt for the return of zconf.h [Lowman]
- Update contrib/vstudio/vc9 and vc10 [Vollant]
- Change libz.dll.a back to libzdll.a in win32/Makefile.gcc
- Apply license and readme changes to contrib/asm686 [Raiter]
- Check file name lengths and add -c option in minigzip.c [Li]
- Update contrib/amd64 and contrib/masmx86/ [Vollant]
- Avoid use of "eof" parameter in trees.c to not shadow library variable
- Update make_vms.com for removal of zlibdefs.h [Zinser]
- Update assembler code and vstudio projects in contrib [Vollant]
- Remove outdated assembler code contrib/masm686 and contrib/asm586
- Remove old vc7 and vc8 from contrib/vstudio
- Update win32/Makefile.msc, add ZLIB_VER_SUBREVISION [Rowe]
- Fix memory leaks in gzclose_r() and gzclose_w(), file leak in gz_open()
- Add contrib/gcc_gvmat64 for longest_match and inflate_fast [Vollant]
- Remove *64 functions from win32/zlib.def (they're not 64-bit yet)
- Fix bug in void-returning vsprintf() case in gzwrite.c
- Fix name change from inflate.h in contrib/inflate86/inffas86.c
- Check if temporary file exists before removing in make_vms.com [Zinser]
- Fix make install and uninstall for --static option
- Fix usage of _MSC_VER in gzguts.h and zutil.h [Truta]
- Update readme.txt in contrib/masmx64 and masmx86 to assemble
Changes in 1.2.3.9 (21 Feb 2010)
- Expunge gzio.c
- Move as400 build information to old
- Fix updates in contrib/minizip and contrib/vstudio
- Add const to vsnprintf test in configure to avoid warnings [Weigelt]
- Delete zconf.h (made by configure) [Weigelt]
- Change zconf.in.h to zconf.h.in per convention [Weigelt]
- Check for NULL buf in gzgets()
- Return empty string for gzgets() with len == 1 (like fgets())
- Fix description of gzgets() in zlib.h for end-of-file, NULL return
- Update minizip to 1.1 [Vollant]
- Avoid MSVC loss of data warnings in gzread.c, gzwrite.c
- Note in zlib.h that gzerror() should be used to distinguish from EOF
- Remove use of snprintf() from gzlib.c
- Fix bug in gzseek()
- Update contrib/vstudio, adding vc9 and vc10 [Kuno, Vollant]
- Fix zconf.h generation in CMakeLists.txt [Lowman]
- Improve comments in zconf.h where modified by configure
Changes in 1.2.3.8 (13 Feb 2010)
- Clean up text files (tabs, trailing whitespace, etc.) [Oberhumer]
- Use z_off64_t in gz_zero() and gz_skip() to match state->skip
- Avoid comparison problem when sizeof(int) == sizeof(z_off64_t)
- Revert to Makefile.in from 1.2.3.6 (live with the clutter)
- Fix missing error return in gzflush(), add zlib.h note
- Add *64 functions to zlib.map [Levin]
- Fix signed/unsigned comparison in gz_comp()
- Use SFLAGS when testing shared linking in configure
- Add --64 option to ./configure to use -m64 with gcc
- Fix ./configure --help to correctly name options
- Have make fail if a test fails [Levin]
- Avoid buffer overrun in contrib/masmx64/gvmat64.asm [Simpson]
- Remove assembler object files from contrib
Changes in 1.2.3.7 (24 Jan 2010)
- Always gzopen() with O_LARGEFILE if available
- Fix gzdirect() to work immediately after gzopen() or gzdopen()
- Make gzdirect() more precise when the state changes while reading
- Improve zlib.h documentation in many places
- Catch memory allocation failure in gz_open()
- Complete close operation if seek forward in gzclose_w() fails
- Return Z_ERRNO from gzclose_r() if close() fails
- Return Z_STREAM_ERROR instead of EOF for gzclose() being passed NULL
- Return zero for gzwrite() errors to match zlib.h description
- Return -1 on gzputs() error to match zlib.h description
- Add zconf.in.h to allow recovery from configure modification [Weigelt]
- Fix static library permissions in Makefile.in [Weigelt]
- Avoid warnings in configure tests that hide functionality [Weigelt]
- Add *BSD and DragonFly to Linux case in configure [gentoo 123571]
- Change libzdll.a to libz.dll.a in win32/Makefile.gcc [gentoo 288212]
- Avoid access of uninitialized data for first inflateReset2 call [Gomes]
- Keep object files in subdirectories to reduce the clutter somewhat
- Remove default Makefile and zlibdefs.h, add dummy Makefile
- Add new external functions to Z_PREFIX, remove duplicates, z_z_ -> z_
- Remove zlibdefs.h completely -- modify zconf.h instead
Changes in 1.2.3.6 (17 Jan 2010)
- Avoid void * arithmetic in gzread.c and gzwrite.c
- Make compilers happier with const char * for gz_error message
- Avoid unused parameter warning in inflate.c
- Avoid signed-unsigned comparison warning in inflate.c
- Indent #pragma's for traditional C
- Fix usage of strwinerror() in glib.c, change to gz_strwinerror()
- Correct email address in configure for system options
- Update make_vms.com and add make_vms.com to contrib/minizip [Zinser]
- Update zlib.map [Brown]
- Fix Makefile.in for Solaris 10 make of example64 and minizip64 [Torok]
- Apply various fixes to CMakeLists.txt [Lowman]
- Add checks on len in gzread() and gzwrite()
- Add error message for no more room for gzungetc()
- Remove zlib version check in gzwrite()
- Defer compression of gzprintf() result until need to
- Use snprintf() in gzdopen() if available
- Remove USE_MMAP configuration determination (only used by minigzip)
- Remove examples/pigz.c (available separately)
- Update examples/gun.c to 1.6
Changes in 1.2.3.5 (8 Jan 2010)
- Add space after #if in zutil.h for some compilers
- Fix relatively harmless bug in deflate_fast() [Exarevsky]
- Fix same problem in deflate_slow()
- Add $(SHAREDLIBV) to LIBS in Makefile.in [Brown]
- Add deflate_rle() for faster Z_RLE strategy run-length encoding
- Add deflate_huff() for faster Z_HUFFMAN_ONLY encoding
- Change name of "write" variable in inffast.c to avoid library collisions
- Fix premature EOF from gzread() in gzio.c [Brown]
- Use zlib header window size if windowBits is 0 in inflateInit2()
- Remove compressBound() call in deflate.c to avoid linking compress.o
- Replace use of errno in gz* with functions, support WinCE [Alves]
- Provide alternative to perror() in minigzip.c for WinCE [Alves]
- Don't use _vsnprintf on later versions of MSVC [Lowman]
- Add CMake build script and input file [Lowman]
- Update contrib/minizip to 1.1 [Svensson, Vollant]
- Moved nintendods directory from contrib to root
- Replace gzio.c with a new set of routines with the same functionality
- Add gzbuffer(), gzoffset(), gzclose_r(), gzclose_w() as part of above
- Update contrib/minizip to 1.1b
- Change gzeof() to return 0 on error instead of -1 to agree with zlib.h
Changes in 1.2.3.4 (21 Dec 2009)
- Use old school .SUFFIXES in Makefile.in for FreeBSD compatibility
- Update comments in configure and Makefile.in for default --shared
- Fix test -z's in configure [Marquess]
- Build examplesh and minigzipsh when not testing
- Change NULL's to Z_NULL's in deflate.c and in comments in zlib.h
- Import LDFLAGS from the environment in configure
- Fix configure to populate SFLAGS with discovered CFLAGS options
- Adapt make_vms.com to the new Makefile.in [Zinser]
- Add zlib2ansi script for C++ compilation [Marquess]
- Add _FILE_OFFSET_BITS=64 test to make test (when applicable)
- Add AMD64 assembler code for longest match to contrib [Teterin]
- Include options from $SFLAGS when doing $LDSHARED
- Simplify 64-bit file support by introducing z_off64_t type
- Make shared object files in objs directory to work around old Sun cc
- Use only three-part version number for Darwin shared compiles
- Add rc option to ar in Makefile.in for when ./configure not run
- Add -WI,-rpath,. to LDFLAGS for OSF 1 V4*
- Set LD_LIBRARYN32_PATH for SGI IRIX shared compile
- Protect against _FILE_OFFSET_BITS being defined when compiling zlib
- Rename Makefile.in targets allstatic to static and allshared to shared
- Fix static and shared Makefile.in targets to be independent
- Correct error return bug in gz_open() by setting state [Brown]
- Put spaces before ;;'s in configure for better sh compatibility
- Add pigz.c (parallel implementation of gzip) to examples/
- Correct constant in crc32.c to UL [Leventhal]
- Reject negative lengths in crc32_combine()
- Add inflateReset2() function to work like inflateEnd()/inflateInit2()
- Include sys/types.h for _LARGEFILE64_SOURCE [Brown]
- Correct typo in doc/algorithm.txt [Janik]
- Fix bug in adler32_combine() [Zhu]
- Catch missing-end-of-block-code error in all inflates and in puff
Assures that random input to inflate eventually results in an error
- Added enough.c (calculation of ENOUGH for inftrees.h) to examples/
- Update ENOUGH and its usage to reflect discovered bounds
- Fix gzerror() error report on empty input file [Brown]
- Add ush casts in trees.c to avoid pedantic runtime errors
- Fix typo in zlib.h uncompress() description [Reiss]
- Correct inflate() comments with regard to automatic header detection
- Remove deprecation comment on Z_PARTIAL_FLUSH (it stays)
- Put new version of gzlog (2.0) in examples with interruption recovery
- Add puff compile option to permit invalid distance-too-far streams
- Add puff TEST command options, ability to read piped input
- Prototype the *64 functions in zlib.h when _FILE_OFFSET_BITS == 64, but
_LARGEFILE64_SOURCE not defined
- Fix Z_FULL_FLUSH to truly erase the past by resetting s->strstart
- Fix deflateSetDictionary() to use all 32K for output consistency
- Remove extraneous #define MIN_LOOKAHEAD in deflate.c (in deflate.h)
- Clear bytes after deflate lookahead to avoid use of uninitialized data
- Change a limit in inftrees.c to be more transparent to Coverity Prevent
- Update win32/zlib.def with exported symbols from zlib.h
- Correct spelling errors in zlib.h [Willem, Sobrado]
- Allow Z_BLOCK for deflate() to force a new block
- Allow negative bits in inflatePrime() to delete existing bit buffer
- Add Z_TREES flush option to inflate() to return at end of trees
- Add inflateMark() to return current state information for random access
- Add Makefile for NintendoDS to contrib [Costa]
- Add -w in configure compile tests to avoid spurious warnings [Beucler]
- Fix typos in zlib.h comments for deflateSetDictionary()
- Fix EOF detection in transparent gzread() [Maier]
Changes in 1.2.3.3 (2 October 2006)
- Make --shared the default for configure, add a --static option
- Add compile option to permit invalid distance-too-far streams
- Add inflateUndermine() function which is required to enable above
- Remove use of "this" variable name for C++ compatibility [Marquess]
- Add testing of shared library in make test, if shared library built
- Use ftello() and fseeko() if available instead of ftell() and fseek()
- Provide two versions of all functions that use the z_off_t type for
binary compatibility -- a normal version and a 64-bit offset version,
per the Large File Support Extension when _LARGEFILE64_SOURCE is
defined; use the 64-bit versions by default when _FILE_OFFSET_BITS
is defined to be 64
- Add a --uname= option to configure to perhaps help with cross-compiling
Changes in 1.2.3.2 (3 September 2006)
- Turn off silly Borland warnings [Hay]
- Use off64_t and define _LARGEFILE64_SOURCE when present
- Fix missing dependency on inffixed.h in Makefile.in
- Rig configure --shared to build both shared and static [Teredesai, Truta]
- Remove zconf.in.h and instead create a new zlibdefs.h file
- Fix contrib/minizip/unzip.c non-encrypted after encrypted [Vollant]
- Add treebuild.xml (see http://treebuild.metux.de/) [Weigelt]
Changes in 1.2.3.1 (16 August 2006)
- Add watcom directory with OpenWatcom make files [Daniel]
- Remove #undef of FAR in zconf.in.h for MVS [Fedtke]
- Update make_vms.com [Zinser]
- Use -fPIC for shared build in configure [Teredesai, Nicholson]
- Use only major version number for libz.so on IRIX and OSF1 [Reinholdtsen]
- Use fdopen() (not _fdopen()) for Interix in zutil.h [Bäck]
- Add some FAQ entries about the contrib directory
- Update the MVS question in the FAQ
- Avoid extraneous reads after EOF in gzio.c [Brown]
- Correct spelling of "successfully" in gzio.c [Randers-Pehrson]
- Add comments to zlib.h about gzerror() usage [Brown]
- Set extra flags in gzip header in gzopen() like deflate() does
- Make configure options more compatible with double-dash conventions
[Weigelt]
- Clean up compilation under Solaris SunStudio cc [Rowe, Reinholdtsen]
- Fix uninstall target in Makefile.in [Truta]
- Add pkgconfig support [Weigelt]
- Use $(DESTDIR) macro in Makefile.in [Reinholdtsen, Weigelt]
- Replace set_data_type() with a more accurate detect_data_type() in
trees.c, according to the txtvsbin.txt document [Truta]
- Swap the order of #include <stdio.h> and #include "zlib.h" in
gzio.c, example.c and minigzip.c [Truta]
- Shut up annoying VS2005 warnings about standard C deprecation [Rowe,
Truta] (where?)
- Fix target "clean" from win32/Makefile.bor [Truta]
- Create .pdb and .manifest files in win32/makefile.msc [Ziegler, Rowe]
- Update zlib www home address in win32/DLL_FAQ.txt [Truta]
- Update contrib/masmx86/inffas32.asm for VS2005 [Vollant, Van Wassenhove]
- Enable browse info in the "Debug" and "ASM Debug" configurations in
the Visual C++ 6 project, and set (non-ASM) "Debug" as default [Truta]
- Add pkgconfig support [Weigelt]
- Add ZLIB_VER_MAJOR, ZLIB_VER_MINOR and ZLIB_VER_REVISION in zlib.h,
for use in win32/zlib1.rc [Polushin, Rowe, Truta]
- Add a document that explains the new text detection scheme to
doc/txtvsbin.txt [Truta]
- Add rfc1950.txt, rfc1951.txt and rfc1952.txt to doc/ [Truta]
- Move algorithm.txt into doc/ [Truta]
- Synchronize FAQ with website
- Fix compressBound(), was low for some pathological cases [Fearnley]
- Take into account wrapper variations in deflateBound()
- Set examples/zpipe.c input and output to binary mode for Windows
- Update examples/zlib_how.html with new zpipe.c (also web site)
- Fix some warnings in examples/gzlog.c and examples/zran.c (it seems
that gcc became pickier in 4.0)
- Add zlib.map for Linux: "All symbols from zlib-1.1.4 remain
un-versioned, the patch adds versioning only for symbols introduced in
zlib-1.2.0 or later. It also declares as local those symbols which are
not designed to be exported." [Levin]
- Update Z_PREFIX list in zconf.in.h, add --zprefix option to configure
- Do not initialize global static by default in trees.c, add a response
NO_INIT_GLOBAL_POINTERS to initialize them if needed [Marquess]
- Don't use strerror() in gzio.c under WinCE [Yakimov]
- Don't use errno.h in zutil.h under WinCE [Yakimov]
- Move arguments for AR to its usage to allow replacing ar [Marot]
- Add HAVE_VISIBILITY_PRAGMA in zconf.in.h for Mozilla [Randers-Pehrson]
- Improve inflateInit() and inflateInit2() documentation
- Fix structure size comment in inflate.h
- Change configure help option from --h* to --help [Santos]
Changes in 1.2.3 (18 July 2005)
- Apply security vulnerability fixes to contrib/infback9 as well
- Clean up some text files (carriage returns, trailing space)
- Update testzlib, vstudio, masmx64, and masmx86 in contrib [Vollant]
Changes in 1.2.2.4 (11 July 2005)
- Add inflatePrime() function for starting inflation at bit boundary
- Avoid some Visual C warnings in deflate.c
- Avoid more silly Visual C warnings in inflate.c and inftrees.c for 64-bit
compile
- Fix some spelling errors in comments [Betts]
- Correct inflateInit2() error return documentation in zlib.h
- Add zran.c example of compressed data random access to examples
directory, shows use of inflatePrime()
- Fix cast for assignments to strm->state in inflate.c and infback.c
- Fix zlibCompileFlags() in zutil.c to use 1L for long shifts [Oberhumer]
- Move declarations of gf2 functions to right place in crc32.c [Oberhumer]
- Add cast in trees.c t avoid a warning [Oberhumer]
- Avoid some warnings in fitblk.c, gun.c, gzjoin.c in examples [Oberhumer]
- Update make_vms.com [Zinser]
- Initialize state->write in inflateReset() since copied in inflate_fast()
- Be more strict on incomplete code sets in inflate_table() and increase
ENOUGH and MAXD -- this repairs a possible security vulnerability for
invalid inflate input. Thanks to Tavis Ormandy and Markus Oberhumer for
discovering the vulnerability and providing test cases
- Add ia64 support to configure for HP-UX [Smith]
- Add error return to gzread() for format or i/o error [Levin]
- Use malloc.h for OS/2 [Necasek]
Changes in 1.2.2.3 (27 May 2005)
- Replace 1U constants in inflate.c and inftrees.c for 64-bit compile
- Typecast fread() return values in gzio.c [Vollant]
- Remove trailing space in minigzip.c outmode (VC++ can't deal with it)
- Fix crc check bug in gzread() after gzungetc() [Heiner]
- Add the deflateTune() function to adjust internal compression parameters
- Add a fast gzip decompressor, gun.c, to examples (use of inflateBack)
- Remove an incorrect assertion in examples/zpipe.c
- Add C++ wrapper in infback9.h [Donais]
- Fix bug in inflateCopy() when decoding fixed codes
- Note in zlib.h how much deflateSetDictionary() actually uses
- Remove USE_DICT_HEAD in deflate.c (would mess up inflate if used)
- Add _WIN32_WCE to define WIN32 in zconf.in.h [Spencer]
- Don't include stderr.h or errno.h for _WIN32_WCE in zutil.h [Spencer]
- Add gzdirect() function to indicate transparent reads
- Update contrib/minizip [Vollant]
- Fix compilation of deflate.c when both ASMV and FASTEST [Oberhumer]
- Add casts in crc32.c to avoid warnings [Oberhumer]
- Add contrib/masmx64 [Vollant]
- Update contrib/asm586, asm686, masmx86, testzlib, vstudio [Vollant]
Changes in 1.2.2.2 (30 December 2004)
- Replace structure assignments in deflate.c and inflate.c with zmemcpy to
avoid implicit memcpy calls (portability for no-library compilation)
- Increase sprintf() buffer size in gzdopen() to allow for large numbers
- Add INFLATE_STRICT to check distances against zlib header
- Improve WinCE errno handling and comments [Chang]
- Remove comment about no gzip header processing in FAQ
- Add Z_FIXED strategy option to deflateInit2() to force fixed trees
- Add updated make_vms.com [Coghlan], update README
- Create a new "examples" directory, move gzappend.c there, add zpipe.c,
fitblk.c, gzlog.[ch], gzjoin.c, and zlib_how.html
- Add FAQ entry and comments in deflate.c on uninitialized memory access
- Add Solaris 9 make options in configure [Gilbert]
- Allow strerror() usage in gzio.c for STDC
- Fix DecompressBuf in contrib/delphi/ZLib.pas [ManChesTer]
- Update contrib/masmx86/inffas32.asm and gvmat32.asm [Vollant]
- Use z_off_t for adler32_combine() and crc32_combine() lengths
- Make adler32() much faster for small len
- Use OS_CODE in deflate() default gzip header
Changes in 1.2.2.1 (31 October 2004)
- Allow inflateSetDictionary() call for raw inflate
- Fix inflate header crc check bug for file names and comments
- Add deflateSetHeader() and gz_header structure for custom gzip headers
- Add inflateGetheader() to retrieve gzip headers
- Add crc32_combine() and adler32_combine() functions
- Add alloc_func, free_func, in_func, out_func to Z_PREFIX list
- Use zstreamp consistently in zlib.h (inflate_back functions)
- Remove GUNZIP condition from definition of inflate_mode in inflate.h
and in contrib/inflate86/inffast.S [Truta, Anderson]
- Add support for AMD64 in contrib/inflate86/inffas86.c [Anderson]
- Update projects/README.projects and projects/visualc6 [Truta]
- Update win32/DLL_FAQ.txt [Truta]
- Avoid warning under NO_GZCOMPRESS in gzio.c; fix typo [Truta]
- Deprecate Z_ASCII; use Z_TEXT instead [Truta]
- Use a new algorithm for setting strm->data_type in trees.c [Truta]
- Do not define an exit() prototype in zutil.c unless DEBUG defined
- Remove prototype of exit() from zutil.c, example.c, minigzip.c [Truta]
- Add comment in zlib.h for Z_NO_FLUSH parameter to deflate()
- Fix Darwin build version identification [Peterson]
Changes in 1.2.2 (3 October 2004)
- Update zlib.h comments on gzip in-memory processing
- Set adler to 1 in inflateReset() to support Java test suite [Walles]
- Add contrib/dotzlib [Ravn]
- Update win32/DLL_FAQ.txt [Truta]
- Update contrib/minizip [Vollant]
- Move contrib/visual-basic.txt to old/ [Truta]
- Fix assembler builds in projects/visualc6/ [Truta]
Changes in 1.2.1.2 (9 September 2004)
- Update INDEX file
- Fix trees.c to update strm->data_type (no one ever noticed!)
- Fix bug in error case in inflate.c, infback.c, and infback9.c [Brown]
- Add "volatile" to crc table flag declaration (for DYNAMIC_CRC_TABLE)
- Add limited multitasking protection to DYNAMIC_CRC_TABLE
- Add NO_vsnprintf for VMS in zutil.h [Mozilla]
- Don't declare strerror() under VMS [Mozilla]
- Add comment to DYNAMIC_CRC_TABLE to use get_crc_table() to initialize
- Update contrib/ada [Anisimkov]
- Update contrib/minizip [Vollant]
- Fix configure to not hardcode directories for Darwin [Peterson]
- Fix gzio.c to not return error on empty files [Brown]
- Fix indentation; update version in contrib/delphi/ZLib.pas and
contrib/pascal/zlibpas.pas [Truta]
- Update mkasm.bat in contrib/masmx86 [Truta]
- Update contrib/untgz [Truta]
- Add projects/README.projects [Truta]
- Add project for MS Visual C++ 6.0 in projects/visualc6 [Cadieux, Truta]
- Update win32/DLL_FAQ.txt [Truta]
- Update list of Z_PREFIX symbols in zconf.h [Randers-Pehrson, Truta]
- Remove an unnecessary assignment to curr in inftrees.c [Truta]
- Add OS/2 to exe builds in configure [Poltorak]
- Remove err dummy parameter in zlib.h [Kientzle]
Changes in 1.2.1.1 (9 January 2004)
- Update email address in README
- Several FAQ updates
- Fix a big fat bug in inftrees.c that prevented decoding valid
dynamic blocks with only literals and no distance codes --
Thanks to "Hot Emu" for the bug report and sample file
- Add a note to puff.c on no distance codes case
Changes in 1.2.1 (17 November 2003)
- Remove a tab in contrib/gzappend/gzappend.c
- Update some interfaces in contrib for new zlib functions
- Update zlib version number in some contrib entries
- Add Windows CE definition for ptrdiff_t in zutil.h [Mai, Truta]
- Support shared libraries on Hurd and KFreeBSD [Brown]
- Fix error in NO_DIVIDE option of adler32.c
Changes in 1.2.0.8 (4 November 2003)
- Update version in contrib/delphi/ZLib.pas and contrib/pascal/zlibpas.pas
- Add experimental NO_DIVIDE #define in adler32.c
- Possibly faster on some processors (let me know if it is)
- Correct Z_BLOCK to not return on first inflate call if no wrap
- Fix strm->data_type on inflate() return to correctly indicate EOB
- Add deflatePrime() function for appending in the middle of a byte
- Add contrib/gzappend for an example of appending to a stream
- Update win32/DLL_FAQ.txt [Truta]
- Delete Turbo C comment in README [Truta]
- Improve some indentation in zconf.h [Truta]
- Fix infinite loop on bad input in configure script [Church]
- Fix gzeof() for concatenated gzip files [Johnson]
- Add example to contrib/visual-basic.txt [Michael B.]
- Add -p to mkdir's in Makefile.in [vda]
- Fix configure to properly detect presence or lack of printf functions
- Add AS400 support [Monnerat]
- Add a little Cygwin support [Wilson]
Changes in 1.2.0.7 (21 September 2003)
- Correct some debug formats in contrib/infback9
- Cast a type in a debug statement in trees.c
- Change search and replace delimiter in configure from % to # [Beebe]
- Update contrib/untgz to 0.2 with various fixes [Truta]
- Add build support for Amiga [Nikl]
- Remove some directories in old that have been updated to 1.2
- Add dylib building for Mac OS X in configure and Makefile.in
- Remove old distribution stuff from Makefile
- Update README to point to DLL_FAQ.txt, and add comment on Mac OS X
- Update links in README
Changes in 1.2.0.6 (13 September 2003)
- Minor FAQ updates
- Update contrib/minizip to 1.00 [Vollant]
- Remove test of gz functions in example.c when GZ_COMPRESS defined [Truta]
- Update POSTINC comment for 68060 [Nikl]
- Add contrib/infback9 with deflate64 decoding (unsupported)
- For MVS define NO_vsnprintf and undefine FAR [van Burik]
- Add pragma for fdopen on MVS [van Burik]
Changes in 1.2.0.5 (8 September 2003)
- Add OF to inflateBackEnd() declaration in zlib.h
- Remember start when using gzdopen in the middle of a file
- Use internal off_t counters in gz* functions to properly handle seeks
- Perform more rigorous check for distance-too-far in inffast.c
- Add Z_BLOCK flush option to return from inflate at block boundary
- Set strm->data_type on return from inflate
- Indicate bits unused, if at block boundary, and if in last block
- Replace size_t with ptrdiff_t in crc32.c, and check for correct size
- Add condition so old NO_DEFLATE define still works for compatibility
- FAQ update regarding the Windows DLL [Truta]
- INDEX update: add qnx entry, remove aix entry [Truta]
- Install zlib.3 into mandir [Wilson]
- Move contrib/zlib_dll_FAQ.txt to win32/DLL_FAQ.txt; update [Truta]
- Adapt the zlib interface to the new DLL convention guidelines [Truta]
- Introduce ZLIB_WINAPI macro to allow the export of functions using
the WINAPI calling convention, for Visual Basic [Vollant, Truta]
- Update msdos and win32 scripts and makefiles [Truta]
- Export symbols by name, not by ordinal, in win32/zlib.def [Truta]
- Add contrib/ada [Anisimkov]
- Move asm files from contrib/vstudio/vc70_32 to contrib/asm386 [Truta]
- Rename contrib/asm386 to contrib/masmx86 [Truta, Vollant]
- Add contrib/masm686 [Truta]
- Fix offsets in contrib/inflate86 and contrib/masmx86/inffas32.asm
[Truta, Vollant]
- Update contrib/delphi; rename to contrib/pascal; add example [Truta]
- Remove contrib/delphi2; add a new contrib/delphi [Truta]
- Avoid inclusion of the nonstandard <memory.h> in contrib/iostream,
and fix some method prototypes [Truta]
- Fix the ZCR_SEED2 constant to avoid warnings in contrib/minizip
[Truta]
- Avoid the use of backslash (\) in contrib/minizip [Vollant]
- Fix file time handling in contrib/untgz; update makefiles [Truta]
- Update contrib/vstudio/vc70_32 to comply with the new DLL guidelines
[Vollant]
- Remove contrib/vstudio/vc15_16 [Vollant]
- Rename contrib/vstudio/vc70_32 to contrib/vstudio/vc7 [Truta]
- Update README.contrib [Truta]
- Invert the assignment order of match_head and s->prev[...] in
INSERT_STRING [Truta]
- Compare TOO_FAR with 32767 instead of 32768, to avoid 16-bit warnings
[Truta]
- Compare function pointers with 0, not with NULL or Z_NULL [Truta]
- Fix prototype of syncsearch in inflate.c [Truta]
- Introduce ASMINF macro to be enabled when using an ASM implementation
of inflate_fast [Truta]
- Change NO_DEFLATE to NO_GZCOMPRESS [Truta]
- Modify test_gzio in example.c to take a single file name as a
parameter [Truta]
- Exit the example.c program if gzopen fails [Truta]
- Add type casts around strlen in example.c [Truta]
- Remove casting to sizeof in minigzip.c; give a proper type
to the variable compared with SUFFIX_LEN [Truta]
- Update definitions of STDC and STDC99 in zconf.h [Truta]
- Synchronize zconf.h with the new Windows DLL interface [Truta]
- Use SYS16BIT instead of __32BIT__ to distinguish between
16- and 32-bit platforms [Truta]
- Use far memory allocators in small 16-bit memory models for
Turbo C [Truta]
- Add info about the use of ASMV, ASMINF and ZLIB_WINAPI in
zlibCompileFlags [Truta]
- Cygwin has vsnprintf [Wilson]
- In Windows16, OS_CODE is 0, as in MSDOS [Truta]
- In Cygwin, OS_CODE is 3 (Unix), not 11 (Windows32) [Wilson]
Changes in 1.2.0.4 (10 August 2003)
- Minor FAQ updates
- Be more strict when checking inflateInit2's windowBits parameter
- Change NO_GUNZIP compile option to NO_GZIP to cover deflate as well
- Add gzip wrapper option to deflateInit2 using windowBits
- Add updated QNX rule in configure and qnx directory [Bonnefoy]
- Make inflate distance-too-far checks more rigorous
- Clean up FAR usage in inflate
- Add casting to sizeof() in gzio.c and minigzip.c
Changes in 1.2.0.3 (19 July 2003)
- Fix silly error in gzungetc() implementation [Vollant]
- Update contrib/minizip and contrib/vstudio [Vollant]
- Fix printf format in example.c
- Correct cdecl support in zconf.in.h [Anisimkov]
- Minor FAQ updates
Changes in 1.2.0.2 (13 July 2003)
- Add ZLIB_VERNUM in zlib.h for numerical preprocessor comparisons
- Attempt to avoid warnings in crc32.c for pointer-int conversion
- Add AIX to configure, remove aix directory [Bakker]
- Add some casts to minigzip.c
- Improve checking after insecure sprintf() or vsprintf() calls
- Remove #elif's from crc32.c
- Change leave label to inf_leave in inflate.c and infback.c to avoid
library conflicts
- Remove inflate gzip decoding by default--only enable gzip decoding by
special request for stricter backward compatibility
- Add zlibCompileFlags() function to return compilation information
- More typecasting in deflate.c to avoid warnings
- Remove leading underscore from _Capital #defines [Truta]
- Fix configure to link shared library when testing
- Add some Windows CE target adjustments [Mai]
- Remove #define ZLIB_DLL in zconf.h [Vollant]
- Add zlib.3 [Rodgers]
- Update RFC URL in deflate.c and algorithm.txt [Mai]
- Add zlib_dll_FAQ.txt to contrib [Truta]
- Add UL to some constants [Truta]
- Update minizip and vstudio [Vollant]
- Remove vestigial NEED_DUMMY_RETURN from zconf.in.h
- Expand use of NO_DUMMY_DECL to avoid all dummy structures
- Added iostream3 to contrib [Schwardt]
- Replace rewind() with fseek() for WinCE [Truta]
- Improve setting of zlib format compression level flags
- Report 0 for huffman and rle strategies and for level == 0 or 1
- Report 2 only for level == 6
- Only deal with 64K limit when necessary at compile time [Truta]
- Allow TOO_FAR check to be turned off at compile time [Truta]
- Add gzclearerr() function [Souza]
- Add gzungetc() function
Changes in 1.2.0.1 (17 March 2003)
- Add Z_RLE strategy for run-length encoding [Truta]
- When Z_RLE requested, restrict matches to distance one
- Update zlib.h, minigzip.c, gzopen(), gzdopen() for Z_RLE
- Correct FASTEST compilation to allow level == 0
- Clean up what gets compiled for FASTEST
- Incorporate changes to zconf.in.h [Vollant]
- Refine detection of Turbo C need for dummy returns
- Refine ZLIB_DLL compilation
- Include additional header file on VMS for off_t typedef
- Try to use _vsnprintf where it supplants vsprintf [Vollant]
- Add some casts in inffast.c
- Enhance comments in zlib.h on what happens if gzprintf() tries to
write more than 4095 bytes before compression
- Remove unused state from inflateBackEnd()
- Remove exit(0) from minigzip.c, example.c
- Get rid of all those darn tabs
- Add "check" target to Makefile.in that does the same thing as "test"
- Add "mostlyclean" and "maintainer-clean" targets to Makefile.in
- Update contrib/inflate86 [Anderson]
- Update contrib/testzlib, contrib/vstudio, contrib/minizip [Vollant]
- Add msdos and win32 directories with makefiles [Truta]
- More additions and improvements to the FAQ
Changes in 1.2.0 (9 March 2003)
- New and improved inflate code
- About 20% faster
- Does not allocate 32K window unless and until needed
- Automatically detects and decompresses gzip streams
- Raw inflate no longer needs an extra dummy byte at end
- Added inflateBack functions using a callback interface--even faster
than inflate, useful for file utilities (gzip, zip)
- Added inflateCopy() function to record state for random access on
externally generated deflate streams (e.g. in gzip files)
- More readable code (I hope)
- New and improved crc32()
- About 50% faster, thanks to suggestions from Rodney Brown
- Add deflateBound() and compressBound() functions
- Fix memory leak in deflateInit2()
- Permit setting dictionary for raw deflate (for parallel deflate)
- Fix const declaration for gzwrite()
- Check for some malloc() failures in gzio.c
- Fix bug in gzopen() on single-byte file 0x1f
- Fix bug in gzread() on concatenated file with 0x1f at end of buffer
and next buffer doesn't start with 0x8b
- Fix uncompress() to return Z_DATA_ERROR on truncated input
- Free memory at end of example.c
- Remove MAX #define in trees.c (conflicted with some libraries)
- Fix static const's in deflate.c, gzio.c, and zutil.[ch]
- Declare malloc() and free() in gzio.c if STDC not defined
- Use malloc() instead of calloc() in zutil.c if int big enough
- Define STDC for AIX
- Add aix/ with approach for compiling shared library on AIX
- Add HP-UX support for shared libraries in configure
- Add OpenUNIX support for shared libraries in configure
- Use $cc instead of gcc to build shared library
- Make prefix directory if needed when installing
- Correct Macintosh avoidance of typedef Byte in zconf.h
- Correct Turbo C memory allocation when under Linux
- Use libz.a instead of -lz in Makefile (assure use of compiled library)
- Update configure to check for snprintf or vsnprintf functions and their
return value, warn during make if using an insecure function
- Fix configure problem with compile-time knowledge of HAVE_UNISTD_H that
is lost when library is used--resolution is to build new zconf.h
- Documentation improvements (in zlib.h):
- Document raw deflate and inflate
- Update RFCs URL
- Point out that zlib and gzip formats are different
- Note that Z_BUF_ERROR is not fatal
- Document string limit for gzprintf() and possible buffer overflow
- Note requirement on avail_out when flushing
- Note permitted values of flush parameter of inflate()
- Add some FAQs (and even answers) to the FAQ
- Add contrib/inflate86/ for x86 faster inflate
- Add contrib/blast/ for PKWare Data Compression Library decompression
- Add contrib/puff/ simple inflate for deflate format description
Changes in 1.1.4 (11 March 2002)
- ZFREE was repeated on same allocation on some error conditions
This creates a security problem described in
http://www.zlib.org/advisory-2002-03-11.txt
- Returned incorrect error (Z_MEM_ERROR) on some invalid data
- Avoid accesses before window for invalid distances with inflate window
less than 32K
- force windowBits > 8 to avoid a bug in the encoder for a window size
of 256 bytes. (A complete fix will be available in 1.1.5)
Changes in 1.1.3 (9 July 1998)
- fix "an inflate input buffer bug that shows up on rare but persistent
occasions" (Mark)
- fix gzread and gztell for concatenated .gz files (Didier Le Botlan)
- fix gzseek(..., SEEK_SET) in write mode
- fix crc check after a gzeek (Frank Faubert)
- fix miniunzip when the last entry in a zip file is itself a zip file
(J Lillge)
- add contrib/asm586 and contrib/asm686 (Brian Raiter)
See http://www.muppetlabs.com/~breadbox/software/assembly.html
- add support for Delphi 3 in contrib/delphi (Bob Dellaca)
- add support for C++Builder 3 and Delphi 3 in contrib/delphi2 (Davide Moretti)
- do not exit prematurely in untgz if 0 at start of block (Magnus Holmgren)
- use macro EXTERN instead of extern to support DLL for BeOS (Sander Stoks)
- added a FAQ file
- Support gzdopen on Mac with Metrowerks (Jason Linhart)
- Do not redefine Byte on Mac (Brad Pettit & Jason Linhart)
- define SEEK_END too if SEEK_SET is not defined (Albert Chin-A-Young)
- avoid some warnings with Borland C (Tom Tanner)
- fix a problem in contrib/minizip/zip.c for 16-bit MSDOS (Gilles Vollant)
- emulate utime() for WIN32 in contrib/untgz (Gilles Vollant)
- allow several arguments to configure (Tim Mooney, Frodo Looijaard)
- use libdir and includedir in Makefile.in (Tim Mooney)
- support shared libraries on OSF1 V4 (Tim Mooney)
- remove so_locations in "make clean" (Tim Mooney)
- fix maketree.c compilation error (Glenn, Mark)
- Python interface to zlib now in Python 1.5 (Jeremy Hylton)
- new Makefile.riscos (Rich Walker)
- initialize static descriptors in trees.c for embedded targets (Nick Smith)
- use "foo-gz" in example.c for RISCOS and VMS (Nick Smith)
- add the OS/2 files in Makefile.in too (Andrew Zabolotny)
- fix fdopen and halloc macros for Microsoft C 6.0 (Tom Lane)
- fix maketree.c to allow clean compilation of inffixed.h (Mark)
- fix parameter check in deflateCopy (Gunther Nikl)
- cleanup trees.c, use compressed_len only in debug mode (Christian Spieler)
- Many portability patches by Christian Spieler:
. zutil.c, zutil.h: added "const" for zmem*
. Make_vms.com: fixed some typos
. Make_vms.com: msdos/Makefile.*: removed zutil.h from some dependency lists
. msdos/Makefile.msc: remove "default rtl link library" info from obj files
. msdos/Makefile.*: use model-dependent name for the built zlib library
. msdos/Makefile.emx, nt/Makefile.emx, nt/Makefile.gcc:
new makefiles, for emx (DOS/OS2), emx&rsxnt and mingw32 (Windows 9x / NT)
- use define instead of typedef for Bytef also for MSC small/medium (Tom Lane)
- replace __far with _far for better portability (Christian Spieler, Tom Lane)
- fix test for errno.h in configure (Tim Newsham)
Changes in 1.1.2 (19 March 98)
- added contrib/minzip, mini zip and unzip based on zlib (Gilles Vollant)
See http://www.winimage.com/zLibDll/unzip.html
- preinitialize the inflate tables for fixed codes, to make the code
completely thread safe (Mark)
- some simplifications and slight speed-up to the inflate code (Mark)
- fix gzeof on non-compressed files (Allan Schrum)
- add -std1 option in configure for OSF1 to fix gzprintf (Martin Mokrejs)
- use default value of 4K for Z_BUFSIZE for 16-bit MSDOS (Tim Wegner + Glenn)
- added os2/Makefile.def and os2/zlib.def (Andrew Zabolotny)
- add shared lib support for UNIX_SV4.2MP (MATSUURA Takanori)
- do not wrap extern "C" around system includes (Tom Lane)
- mention zlib binding for TCL in README (Andreas Kupries)
- added amiga/Makefile.pup for Amiga powerUP SAS/C PPC (Andreas Kleinert)
- allow "make install prefix=..." even after configure (Glenn Randers-Pehrson)
- allow "configure --prefix $HOME" (Tim Mooney)
- remove warnings in example.c and gzio.c (Glenn Randers-Pehrson)
- move Makefile.sas to amiga/Makefile.sas
Changes in 1.1.1 (27 Feb 98)
- fix macros _tr_tally_* in deflate.h for debug mode (Glenn Randers-Pehrson)
- remove block truncation heuristic which had very marginal effect for zlib
(smaller lit_bufsize than in gzip 1.2.4) and degraded a little the
compression ratio on some files. This also allows inlining _tr_tally for
matches in deflate_slow
- added msdos/Makefile.w32 for WIN32 Microsoft Visual C++ (Bob Frazier)
Changes in 1.1.0 (24 Feb 98)
- do not return STREAM_END prematurely in inflate (John Bowler)
- revert to the zlib 1.0.8 inflate to avoid the gcc 2.8.0 bug (Jeremy Buhler)
- compile with -DFASTEST to get compression code optimized for speed only
- in minigzip, try mmap'ing the input file first (Miguel Albrecht)
- increase size of I/O buffers in minigzip.c and gzio.c (not a big gain
on Sun but significant on HP)
- add a pointer to experimental unzip library in README (Gilles Vollant)
- initialize variable gcc in configure (Chris Herborth)
Changes in 1.0.9 (17 Feb 1998)
- added gzputs and gzgets functions
- do not clear eof flag in gzseek (Mark Diekhans)
- fix gzseek for files in transparent mode (Mark Diekhans)
- do not assume that vsprintf returns the number of bytes written (Jens Krinke)
- replace EXPORT with ZEXPORT to avoid conflict with other programs
- added compress2 in zconf.h, zlib.def, zlib.dnt
- new asm code from Gilles Vollant in contrib/asm386
- simplify the inflate code (Mark):
. Replace ZALLOC's in huft_build() with single ZALLOC in inflate_blocks_new()
. ZALLOC the length list in inflate_trees_fixed() instead of using stack
. ZALLOC the value area for huft_build() instead of using stack
. Simplify Z_FINISH check in inflate()
- Avoid gcc 2.8.0 comparison bug a little differently than zlib 1.0.8
- in inftrees.c, avoid cc -O bug on HP (Farshid Elahi)
- in zconf.h move the ZLIB_DLL stuff earlier to avoid problems with
the declaration of FAR (Gilles Vollant)
- install libz.so* with mode 755 (executable) instead of 644 (Marc Lehmann)
- read_buf buf parameter of type Bytef* instead of charf*
- zmemcpy parameters are of type Bytef*, not charf* (Joseph Strout)
- do not redeclare unlink in minigzip.c for WIN32 (John Bowler)
- fix check for presence of directories in "make install" (Ian Willis)
Changes in 1.0.8 (27 Jan 1998)
- fixed offsets in contrib/asm386/gvmat32.asm (Gilles Vollant)
- fix gzgetc and gzputc for big endian systems (Markus Oberhumer)
- added compress2() to allow setting the compression level
- include sys/types.h to get off_t on some systems (Marc Lehmann & QingLong)
- use constant arrays for the static trees in trees.c instead of computing
them at run time (thanks to Ken Raeburn for this suggestion). To create
trees.h, compile with GEN_TREES_H and run "make test"
- check return code of example in "make test" and display result
- pass minigzip command line options to file_compress
- simplifying code of inflateSync to avoid gcc 2.8 bug
- support CC="gcc -Wall" in configure -s (QingLong)
- avoid a flush caused by ftell in gzopen for write mode (Ken Raeburn)
- fix test for shared library support to avoid compiler warnings
- zlib.lib -> zlib.dll in msdos/zlib.rc (Gilles Vollant)
- check for TARGET_OS_MAC in addition to MACOS (Brad Pettit)
- do not use fdopen for Metrowerks on Mac (Brad Pettit))
- add checks for gzputc and gzputc in example.c
- avoid warnings in gzio.c and deflate.c (Andreas Kleinert)
- use const for the CRC table (Ken Raeburn)
- fixed "make uninstall" for shared libraries
- use Tracev instead of Trace in infblock.c
- in example.c use correct compressed length for test_sync
- suppress +vnocompatwarnings in configure for HPUX (not always supported)
Changes in 1.0.7 (20 Jan 1998)
- fix gzseek which was broken in write mode
- return error for gzseek to negative absolute position
- fix configure for Linux (Chun-Chung Chen)
- increase stack space for MSC (Tim Wegner)
- get_crc_table and inflateSyncPoint are EXPORTed (Gilles Vollant)
- define EXPORTVA for gzprintf (Gilles Vollant)
- added man page zlib.3 (Rick Rodgers)
- for contrib/untgz, fix makedir() and improve Makefile
- check gzseek in write mode in example.c
- allocate extra buffer for seeks only if gzseek is actually called
- avoid signed/unsigned comparisons (Tim Wegner, Gilles Vollant)
- add inflateSyncPoint in zconf.h
- fix list of exported functions in nt/zlib.dnt and mdsos/zlib.def
Changes in 1.0.6 (19 Jan 1998)
- add functions gzprintf, gzputc, gzgetc, gztell, gzeof, gzseek, gzrewind and
gzsetparams (thanks to Roland Giersig and Kevin Ruland for some of this code)
- Fix a deflate bug occurring only with compression level 0 (thanks to
Andy Buckler for finding this one)
- In minigzip, pass transparently also the first byte for .Z files
- return Z_BUF_ERROR instead of Z_OK if output buffer full in uncompress()
- check Z_FINISH in inflate (thanks to Marc Schluper)
- Implement deflateCopy (thanks to Adam Costello)
- make static libraries by default in configure, add --shared option
- move MSDOS or Windows specific files to directory msdos
- suppress the notion of partial flush to simplify the interface
(but the symbol Z_PARTIAL_FLUSH is kept for compatibility with 1.0.4)
- suppress history buffer provided by application to simplify the interface
(this feature was not implemented anyway in 1.0.4)
- next_in and avail_in must be initialized before calling inflateInit or
inflateInit2
- add EXPORT in all exported functions (for Windows DLL)
- added Makefile.nt (thanks to Stephen Williams)
- added the unsupported "contrib" directory:
contrib/asm386/ by Gilles Vollant <info@winimage.com>
386 asm code replacing longest_match()
contrib/iostream/ by Kevin Ruland <kevin@rodin.wustl.edu>
A C++ I/O streams interface to the zlib gz* functions
contrib/iostream2/ by Tyge Løvset <Tyge.Lovset@cmr.no>
Another C++ I/O streams interface
contrib/untgz/ by "Pedro A. Aranda Guti\irrez" <paag@tid.es>
A very simple tar.gz file extractor using zlib
contrib/visual-basic.txt by Carlos Rios <c_rios@sonda.cl>
How to use compress(), uncompress() and the gz* functions from VB
- pass params -f (filtered data), -h (huffman only), -1 to -9 (compression
level) in minigzip (thanks to Tom Lane)
- use const for rommable constants in deflate
- added test for gzseek and gztell in example.c
- add undocumented function inflateSyncPoint() (hack for Paul Mackerras)
- add undocumented function zError to convert error code to string
(for Tim Smithers)
- Allow compilation of gzio with -DNO_DEFLATE to avoid the compression code
- Use default memcpy for Symantec MSDOS compiler
- Add EXPORT keyword for check_func (needed for Windows DLL)
- add current directory to LD_LIBRARY_PATH for "make test"
- create also a link for libz.so.1
- added support for FUJITSU UXP/DS (thanks to Toshiaki Nomura)
- use $(SHAREDLIB) instead of libz.so in Makefile.in (for HPUX)
- added -soname for Linux in configure (Chun-Chung Chen,
- assign numbers to the exported functions in zlib.def (for Windows DLL)
- add advice in zlib.h for best usage of deflateSetDictionary
- work around compiler bug on Atari (cast Z_NULL in call of s->checkfn)
- allow compilation with ANSI keywords only enabled for TurboC in large model
- avoid "versionString"[0] (Borland bug)
- add NEED_DUMMY_RETURN for Borland
- use variable z_verbose for tracing in debug mode (L. Peter Deutsch)
- allow compilation with CC
- defined STDC for OS/2 (David Charlap)
- limit external names to 8 chars for MVS (Thomas Lund)
- in minigzip.c, use static buffers only for 16-bit systems
- fix suffix check for "minigzip -d foo.gz"
- do not return an error for the 2nd of two consecutive gzflush() (Felix Lee)
- use _fdopen instead of fdopen for MSC >= 6.0 (Thomas Fanslau)
- added makelcc.bat for lcc-win32 (Tom St Denis)
- in Makefile.dj2, use copy and del instead of install and rm (Frank Donahoe)
- Avoid expanded $Id$. Use "rcs -kb" or "cvs admin -kb" to avoid Id expansion
- check for unistd.h in configure (for off_t)
- remove useless check parameter in inflate_blocks_free
- avoid useless assignment of s->check to itself in inflate_blocks_new
- do not flush twice in gzclose (thanks to Ken Raeburn)
- rename FOPEN as F_OPEN to avoid clash with /usr/include/sys/file.h
- use NO_ERRNO_H instead of enumeration of operating systems with errno.h
- work around buggy fclose on pipes for HP/UX
- support zlib DLL with BORLAND C++ 5.0 (thanks to Glenn Randers-Pehrson)
- fix configure if CC is already equal to gcc
Changes in 1.0.5 (3 Jan 98)
- Fix inflate to terminate gracefully when fed corrupted or invalid data
- Use const for rommable constants in inflate
- Eliminate memory leaks on error conditions in inflate
- Removed some vestigial code in inflate
- Update web address in README
Changes in 1.0.4 (24 Jul 96)
- In very rare conditions, deflate(s, Z_FINISH) could fail to produce an EOF
bit, so the decompressor could decompress all the correct data but went
on to attempt decompressing extra garbage data. This affected minigzip too
- zlibVersion and gzerror return const char* (needed for DLL)
- port to RISCOS (no fdopen, no multiple dots, no unlink, no fileno)
- use z_error only for DEBUG (avoid problem with DLLs)
Changes in 1.0.3 (2 Jul 96)
- use z_streamp instead of z_stream *, which is now a far pointer in MSDOS
small and medium models; this makes the library incompatible with previous
versions for these models. (No effect in large model or on other systems.)
- return OK instead of BUF_ERROR if previous deflate call returned with
avail_out as zero but there is nothing to do
- added memcmp for non STDC compilers
- define NO_DUMMY_DECL for more Mac compilers (.h files merged incorrectly)
- define __32BIT__ if __386__ or i386 is defined (pb. with Watcom and SCO)
- better check for 16-bit mode MSC (avoids problem with Symantec)
Changes in 1.0.2 (23 May 96)
- added Windows DLL support
- added a function zlibVersion (for the DLL support)
- fixed declarations using Bytef in infutil.c (pb with MSDOS medium model)
- Bytef is define's instead of typedef'd only for Borland C
- avoid reading uninitialized memory in example.c
- mention in README that the zlib format is now RFC1950
- updated Makefile.dj2
- added algorithm.doc
Changes in 1.0.1 (20 May 96) [1.0 skipped to avoid confusion]
- fix array overlay in deflate.c which sometimes caused bad compressed data
- fix inflate bug with empty stored block
- fix MSDOS medium model which was broken in 0.99
- fix deflateParams() which could generate bad compressed data
- Bytef is define'd instead of typedef'ed (work around Borland bug)
- added an INDEX file
- new makefiles for DJGPP (Makefile.dj2), 32-bit Borland (Makefile.b32),
Watcom (Makefile.wat), Amiga SAS/C (Makefile.sas)
- speed up adler32 for modern machines without auto-increment
- added -ansi for IRIX in configure
- static_init_done in trees.c is an int
- define unlink as delete for VMS
- fix configure for QNX
- add configure branch for SCO and HPUX
- avoid many warnings (unused variables, dead assignments, etc...)
- no fdopen for BeOS
- fix the Watcom fix for 32 bit mode (define FAR as empty)
- removed redefinition of Byte for MKWERKS
- work around an MWKERKS bug (incorrect merge of all .h files)
Changes in 0.99 (27 Jan 96)
- allow preset dictionary shared between compressor and decompressor
- allow compression level 0 (no compression)
- add deflateParams in zlib.h: allow dynamic change of compression level
and compression strategy
- test large buffers and deflateParams in example.c
- add optional "configure" to build zlib as a shared library
- suppress Makefile.qnx, use configure instead
- fixed deflate for 64-bit systems (detected on Cray)
- fixed inflate_blocks for 64-bit systems (detected on Alpha)
- declare Z_DEFLATED in zlib.h (possible parameter for deflateInit2)
- always return Z_BUF_ERROR when deflate() has nothing to do
- deflateInit and inflateInit are now macros to allow version checking
- prefix all global functions and types with z_ with -DZ_PREFIX
- make falloc completely reentrant (inftrees.c)
- fixed very unlikely race condition in ct_static_init
- free in reverse order of allocation to help memory manager
- use zlib-1.0/* instead of zlib/* inside the tar.gz
- make zlib warning-free with "gcc -O3 -Wall -Wwrite-strings -Wpointer-arith
-Wconversion -Wstrict-prototypes -Wmissing-prototypes"
- allow gzread on concatenated .gz files
- deflateEnd now returns Z_DATA_ERROR if it was premature
- deflate is finally (?) fully deterministic (no matches beyond end of input)
- Document Z_SYNC_FLUSH
- add uninstall in Makefile
- Check for __cpluplus in zlib.h
- Better test in ct_align for partial flush
- avoid harmless warnings for Borland C++
- initialize hash_head in deflate.c
- avoid warning on fdopen (gzio.c) for HP cc -Aa
- include stdlib.h for STDC compilers
- include errno.h for Cray
- ignore error if ranlib doesn't exist
- call ranlib twice for NeXTSTEP
- use exec_prefix instead of prefix for libz.a
- renamed ct_* as _tr_* to avoid conflict with applications
- clear z->msg in inflateInit2 before any error return
- initialize opaque in example.c, gzio.c, deflate.c and inflate.c
- fixed typo in zconf.h (_GNUC__ => __GNUC__)
- check for WIN32 in zconf.h and zutil.c (avoid farmalloc in 32-bit mode)
- fix typo in Make_vms.com (f$trnlnm -> f$getsyi)
- in fcalloc, normalize pointer if size > 65520 bytes
- don't use special fcalloc for 32 bit Borland C++
- use STDC instead of __GO32__ to avoid redeclaring exit, calloc, etc.
- use Z_BINARY instead of BINARY
- document that gzclose after gzdopen will close the file
- allow "a" as mode in gzopen
- fix error checking in gzread
- allow skipping .gz extra-field on pipes
- added reference to Perl interface in README
- put the crc table in FAR data (I dislike more and more the medium model :)
- added get_crc_table
- added a dimension to all arrays (Borland C can't count)
- workaround Borland C bug in declaration of inflate_codes_new & inflate_fast
- guard against multiple inclusion of *.h (for precompiled header on Mac)
- Watcom C pretends to be Microsoft C small model even in 32 bit mode
- don't use unsized arrays to avoid silly warnings by Visual C++:
warning C4746: 'inflate_mask' : unsized array treated as '__far'
(what's wrong with far data in far model?)
- define enum out of inflate_blocks_state to allow compilation with C++
Changes in 0.95 (16 Aug 95)
- fix MSDOS small and medium model (now easier to adapt to any compiler)
- inlined send_bits
- fix the final (:-) bug for deflate with flush (output was correct but
not completely flushed in rare occasions)
- default window size is same for compression and decompression
(it's now sufficient to set MAX_WBITS in zconf.h)
- voidp -> voidpf and voidnp -> voidp (for consistency with other
typedefs and because voidnp was not near in large model)
Changes in 0.94 (13 Aug 95)
- support MSDOS medium model
- fix deflate with flush (could sometimes generate bad output)
- fix deflateReset (zlib header was incorrectly suppressed)
- added support for VMS
- allow a compression level in gzopen()
- gzflush now calls fflush
- For deflate with flush, flush even if no more input is provided
- rename libgz.a as libz.a
- avoid complex expression in infcodes.c triggering Turbo C bug
- work around a problem with gcc on Alpha (in INSERT_STRING)
- don't use inline functions (problem with some gcc versions)
- allow renaming of Byte, uInt, etc... with #define
- avoid warning about (unused) pointer before start of array in deflate.c
- avoid various warnings in gzio.c, example.c, infblock.c, adler32.c, zutil.c
- avoid reserved word 'new' in trees.c
Changes in 0.93 (25 June 95)
- temporarily disable inline functions
- make deflate deterministic
- give enough lookahead for PARTIAL_FLUSH
- Set binary mode for stdin/stdout in minigzip.c for OS/2
- don't even use signed char in inflate (not portable enough)
- fix inflate memory leak for segmented architectures
Changes in 0.92 (3 May 95)
- don't assume that char is signed (problem on SGI)
- Clear bit buffer when starting a stored block
- no memcpy on Pyramid
- suppressed inftest.c
- optimized fill_window, put longest_match inline for gcc
- optimized inflate on stored blocks
- untabify all sources to simplify patches
Changes in 0.91 (2 May 95)
- Default MEM_LEVEL is 8 (not 9 for Unix) as documented in zlib.h
- Document the memory requirements in zconf.h
- added "make install"
- fix sync search logic in inflateSync
- deflate(Z_FULL_FLUSH) now works even if output buffer too short
- after inflateSync, don't scare people with just "lo world"
- added support for DJGPP
Changes in 0.9 (1 May 95)
- don't assume that zalloc clears the allocated memory (the TurboC bug
was Mark's bug after all :)
- let again gzread copy uncompressed data unchanged (was working in 0.71)
- deflate(Z_FULL_FLUSH), inflateReset and inflateSync are now fully implemented
- added a test of inflateSync in example.c
- moved MAX_WBITS to zconf.h because users might want to change that
- document explicitly that zalloc(64K) on MSDOS must return a normalized
pointer (zero offset)
- added Makefiles for Microsoft C, Turbo C, Borland C++
- faster crc32()
Changes in 0.8 (29 April 95)
- added fast inflate (inffast.c)
- deflate(Z_FINISH) now returns Z_STREAM_END when done. Warning: this
is incompatible with previous versions of zlib which returned Z_OK
- work around a TurboC compiler bug (bad code for b << 0, see infutil.h)
(actually that was not a compiler bug, see 0.81 above)
- gzread no longer reads one extra byte in certain cases
- In gzio destroy(), don't reference a freed structure
- avoid many warnings for MSDOS
- avoid the ERROR symbol which is used by MS Windows
Changes in 0.71 (14 April 95)
- Fixed more MSDOS compilation problems :( There is still a bug with
TurboC large model
Changes in 0.7 (14 April 95)
- Added full inflate support
- Simplified the crc32() interface. The pre- and post-conditioning
(one's complement) is now done inside crc32(). WARNING: this is
incompatible with previous versions; see zlib.h for the new usage
Changes in 0.61 (12 April 95)
- workaround for a bug in TurboC. example and minigzip now work on MSDOS
Changes in 0.6 (11 April 95)
- added minigzip.c
- added gzdopen to reopen a file descriptor as gzFile
- added transparent reading of non-gziped files in gzread
- fixed bug in gzread (don't read crc as data)
- fixed bug in destroy (gzio.c) (don't return Z_STREAM_END for gzclose)
- don't allocate big arrays in the stack (for MSDOS)
- fix some MSDOS compilation problems
Changes in 0.5:
- do real compression in deflate.c. Z_PARTIAL_FLUSH is supported but
not yet Z_FULL_FLUSH
- support decompression but only in a single step (forced Z_FINISH)
- added opaque object for zalloc and zfree
- added deflateReset and inflateReset
- added a variable zlib_version for consistency checking
- renamed the 'filter' parameter of deflateInit2 as 'strategy'
Added Z_FILTERED and Z_HUFFMAN_ONLY constants
Changes in 0.4:
- avoid "zip" everywhere, use zlib instead of ziplib
- suppress Z_BLOCK_FLUSH, interpret Z_PARTIAL_FLUSH as block flush
if compression method == 8
- added adler32 and crc32
- renamed deflateOptions as deflateInit2, call one or the other but not both
- added the method parameter for deflateInit2
- added inflateInit2
- simplified considerably deflateInit and inflateInit by not supporting
user-provided history buffer. This is supported only in deflateInit2
and inflateInit2
Changes in 0.3:
- prefix all macro names with Z_
- use Z_FINISH instead of deflateEnd to finish compression
- added Z_HUFFMAN_ONLY
- added gzerror()
================================================
FILE: FAQ
================================================
Frequently Asked Questions about zlib
If your question is not there, please check the zlib home page
https://zlib.net/ which may have more recent information.
The latest zlib FAQ is at https://zlib.net/zlib_faq.html
1. Is zlib Y2K-compliant?
Yes. zlib doesn't handle dates.
2. Where can I get a Windows DLL version?
The zlib sources can be compiled without change to produce a DLL. See the
file win32/DLL_FAQ.txt in the zlib distribution.
3. Where can I get a Visual Basic interface to zlib?
See
* https://zlib.net/nelson/
* win32/DLL_FAQ.txt in the zlib distribution
4. compress() returns Z_BUF_ERROR.
Make sure that before the call of compress(), the length of the compressed
buffer is equal to the available size of the compressed buffer and not
zero. For Visual Basic, check that this parameter is passed by reference
("as any"), not by value ("as long").
5. deflate() or inflate() returns Z_BUF_ERROR.
Before making the call, make sure that avail_in and avail_out are not zero.
When setting the parameter flush equal to Z_FINISH, also make sure that
avail_out is big enough to allow processing all pending input. Note that a
Z_BUF_ERROR is not fatal--another call to deflate() or inflate() can be
made with more input or output space. A Z_BUF_ERROR may in fact be
unavoidable depending on how the functions are used, since it is not
possible to tell whether or not there is more output pending when
strm.avail_out returns with zero. See https://zlib.net/zlib_how.html for a
heavily annotated example.
6. Where's the zlib documentation (man pages, etc.)?
It's in zlib.h . Examples of zlib usage are in the files test/example.c
and test/minigzip.c, with more in examples/ .
7. Why don't you use GNU autoconf or libtool or ...?
Because we would like to keep zlib as a very small and simple package.
zlib is rather portable and doesn't need much configuration.
8. I found a bug in zlib.
Most of the time, such problems are due to an incorrect usage of zlib.
Please try to reproduce the problem with a small program and send the
corresponding source to us at zlib@gzip.org . Do not send multi-megabyte
data files without prior agreement.
9. Why do I get "undefined reference to gzputc"?
If "make test" produces something like
example.o(.text+0x154): undefined reference to `gzputc'
check that you don't have old files libz.* in /usr/lib, /usr/local/lib or
/usr/X11R6/lib. Remove any old versions, then do "make install".
10. I need a Delphi interface to zlib.
See the contrib/delphi directory in the zlib distribution.
11. Can zlib handle .zip archives?
Not by itself, no. See the directory contrib/minizip in the zlib
distribution.
12. Can zlib handle .Z files?
No, sorry. You have to spawn an uncompress or gunzip subprocess, or adapt
the code of uncompress on your own.
13. How can I make a Unix shared library?
By default a shared (and a static) library is built for Unix. So:
make distclean
./configure
make
14. How do I install a shared zlib library on Unix?
After the above, then:
make install
However, many flavors of Unix come with a shared zlib already installed.
Before going to the trouble of compiling a shared version of zlib and
trying to install it, you may want to check if it's already there! If you
can #include <zlib.h>, it's there. The -lz option will probably link to
it. You can check the version at the top of zlib.h or with the
ZLIB_VERSION symbol defined in zlib.h .
15. I have a question about OttoPDF.
We are not the authors of OttoPDF. The real author is on the OttoPDF web
site: Joel Hainley, jhainley@myndkryme.com.
16. Can zlib decode Flate data in an Adobe PDF file?
Yes. See https://www.pdflib.com/ . To modify PDF forms, see
https://sourceforge.net/projects/acroformtool/ .
17. Why am I getting this "register_frame_info not found" error on Solaris?
After installing zlib 1.1.4 on Solaris 2.6, running applications using zlib
generates an error such as:
ld.so.1: rpm: fatal: relocation error: file /usr/local/lib/libz.so:
symbol __register_frame_info: referenced symbol not found
The symbol __register_frame_info is not part of zlib, it is generated by
the C compiler (cc or gcc). You must recompile applications using zlib
which have this problem. This problem is specific to Solaris. See
http://www.sunfreeware.com for Solaris versions of zlib and applications
using zlib.
18. Why does gzip give an error on a file I make with compress/deflate?
The compress and deflate functions produce data in the zlib format, which
is different and incompatible with the gzip format. The gz* functions in
zlib on the other hand use the gzip format. Both the zlib and gzip formats
use the same compressed data format internally, but have different headers
and trailers around the compressed data.
19. Ok, so why are there two different formats?
The gzip format was designed to retain the directory information about a
single file, such as the name and last modification date. The zlib format
on the other hand was designed for in-memory and communication channel
applications, and has a much more compact header and trailer and uses a
faster integrity check than gzip.
20. Well that's nice, but how do I make a gzip file in memory?
You can request that deflate write the gzip format instead of the zlib
format using deflateInit2(). You can also request that inflate decode the
gzip format using inflateInit2(). Read zlib.h for more details.
21. Is zlib thread-safe?
Yes. However any library routines that zlib uses and any application-
provided memory allocation routines must also be thread-safe. zlib's gz*
functions use stdio library routines, and most of zlib's functions use the
library memory allocation routines by default. zlib's *Init* functions
allow for the application to provide custom memory allocation routines.
If the non-default BUILDFIXED or DYNAMIC_CRC_TABLE defines are used on a
system without atomics (e.g. pre-C11), then inflate() and crc32() will not
be thread safe.
Of course, you should only operate on any given zlib or gzip stream from a
single thread at a time.
22. Can I use zlib in my commercial application?
Yes. Please read the license in zlib.h.
23. Is zlib under the GNU license?
No. Please read the license in zlib.h.
24. The license says that altered source versions must be "plainly marked". So
what exactly do I need to do to meet that requirement?
You need to change the ZLIB_VERSION and ZLIB_VERNUM #defines in zlib.h. In
particular, the final version number needs to be changed to "f", and an
identification string should be appended to ZLIB_VERSION. Version numbers
x.x.x.f are reserved for modifications to zlib by others than the zlib
maintainers. For example, if the version of the base zlib you are altering
is "1.2.3.4", then in zlib.h you should change ZLIB_VERNUM to 0x123f, and
ZLIB_VERSION to something like "1.2.3.f-zachary-mods-v3". You can also
update the version strings in deflate.c and inftrees.c.
For altered source distributions, you should also note the origin and
nature of the changes in zlib.h, as well as in ChangeLog and README, along
with the dates of the alterations. The origin should include at least your
name (or your company's name), and an email address to contact for help or
issues with the library.
Note that distributing a compiled zlib library along with zlib.h and
zconf.h is also a source distribution, and so you should change
ZLIB_VERSION and ZLIB_VERNUM and note the origin and nature of the changes
in zlib.h as you would for a full source distribution.
25. Will zlib work on a big-endian or little-endian architecture, and can I
exchange compressed data between them?
Yes and yes.
26. Will zlib work on a 64-bit machine?
Yes. It has been tested on 64-bit machines, and has no dependence on any
data types being limited to 32-bits in length. If you have any
difficulties, please provide a complete problem report to zlib@gzip.org
27. Will zlib decompress data from the PKWare Data Compression Library?
No. The PKWare DCL uses a completely different compressed data format than
does PKZIP and zlib. However, you can look in zlib's contrib/blast
directory for a possible solution to your problem.
28. Can I access data randomly in a compressed stream?
No, not without some preparation. If when compressing you periodically use
Z_FULL_FLUSH, carefully write all the pending data at those points, and
keep an index of those locations, then you can start decompression at those
points. You have to be careful to not use Z_FULL_FLUSH too often, since it
can significantly degrade compression. Alternatively, you can scan a
deflate stream once to generate an index, and then use that index for
random access. See examples/zran.c .
29. Does zlib work on MVS, OS/390, CICS, etc.?
It has in the past, but we have not heard of any recent evidence. There
were working ports of zlib 1.1.4 to MVS, but those links no longer work.
If you know of recent, successful applications of zlib on these operating
systems, please let us know. Thanks.
30. Is there some simpler, easier to read version of inflate I can look at to
understand the deflate format?
First off, you should read RFC 1951. Second, yes. Look in zlib's
contrib/puff directory.
31. Does zlib infringe on any patents?
As far as we know, no. In fact, that was originally the whole point behind
zlib. Look here for some more information:
https://web.archive.org/web/20180729212847/http://www.gzip.org/#faq11
32. Can zlib work with greater than 4 GB of data?
Yes. inflate() and deflate() will process any amount of data correctly.
Each call of inflate() or deflate() is limited to input and output chunks
of the maximum value that can be stored in the compiler's "unsigned int"
type, but there is no limit to the number of chunks. Note however that the
strm.total_in and strm_total_out counters may be limited to 4 GB. These
counters are provided as a convenience and are not used internally by
inflate() or deflate(). The application can easily set up its own counters
updated after each call of inflate() or deflate() to count beyond 4 GB.
compress() and uncompress() may be limited to 4 GB, since they operate in a
single call. gzseek() and gztell() may be limited to 4 GB depending on how
zlib is compiled. See the zlibCompileFlags() function in zlib.h.
The word "may" appears several times above since there is a 4 GB limit only
if the compiler's "long" type is 32 bits. If the compiler's "long" type is
64 bits, then the limit is 16 exabytes.
33. Does zlib have any security vulnerabilities?
The only one that we are aware of is potentially in gzprintf(). If zlib is
compiled to use sprintf() or vsprintf(), which requires that ZLIB_INSECURE
be defined, then there is no protection against a buffer overflow of an 8K
string space (or other value as set by gzbuffer()), other than the caller
of gzprintf() assuring that the output will not exceed 8K. On the other
hand, if zlib is compiled to use snprintf() or vsnprintf(), which should
normally be the case, then there is no vulnerability. The ./configure
script will display warnings if an insecure variation of sprintf() will be
used by gzprintf(). Also the zlibCompileFlags() function will return
information on what variant of sprintf() is used by gzprintf().
If you don't have snprintf() or vsnprintf() and would like one, you can
find a good portable implementation in stb_sprintf.h here:
https://github.com/nothings/stb
Note that you should be using the most recent version of zlib. Versions
1.1.3 and before were subject to a double-free vulnerability, and versions
1.2.1 and 1.2.2 were subject to an access exception when decompressing
invalid compressed data.
34. Is there a Java version of zlib?
Probably what you want is to use zlib in Java. zlib is already included
as part of the Java SDK in the java.util.zip package. If you really want
a version of zlib written in the Java language, look on the zlib home
page for links: https://zlib.net/ .
35. I get this or that compiler or source-code scanner warning when I crank it
up to maximally-pedantic. Can't you guys write proper code?
Many years ago, we gave up attempting to avoid warnings on every compiler
in the universe. It just got to be a waste of time, and some compilers
were downright silly as well as contradicted each other. So now, we simply
make sure that the code always works.
36. Valgrind (or some similar memory access checker) says that deflate is
performing a conditional jump that depends on an uninitialized value.
Isn't that a bug?
No. That is intentional for performance reasons, and the output of deflate
is not affected. This only started showing up recently since zlib 1.2.x
uses malloc() by default for allocations, whereas earlier versions used
calloc(), which zeros out the allocated memory. Even though the code was
correct, versions 1.2.4 and later was changed to not stimulate these
checkers.
37. Will zlib read the (insert any ancient or arcane format here) compressed
data format?
Probably not. Look in the comp.compression FAQ for pointers to various
formats and associated software.
38. How can I encrypt/decrypt zip files with zlib?
zlib doesn't support encryption. The original PKZIP encryption is very
weak and can be broken with freely available programs. To get strong
encryption, use GnuPG, https://www.gnupg.org/ , which already includes zlib
compression. For PKZIP compatible "encryption", look at
https://infozip.sourceforge.net/
39. What's the difference between the "gzip" and "deflate" HTTP 1.1 encodings?
"gzip" is the gzip format, and "deflate" is the zlib format. They should
probably have called the second one "zlib" instead to avoid confusion with
the raw deflate compressed data format. While the HTTP 1.1 RFC 2616
correctly points to the zlib specification in RFC 1950 for the "deflate"
transfer encoding, there have been reports of servers and browsers that
incorrectly produce or expect raw deflate data per the deflate
specification in RFC 1951, most notably Microsoft. So even though the
"deflate" transfer encoding using the zlib format would be the more
efficient approach (and in fact exactly what the zlib format was designed
for), using the "gzip" transfer encoding is probably more reliable due to
an unfortunate choice of name on the part of the HTTP 1.1 authors.
Bottom line: use the gzip format for HTTP 1.1 encoding.
40. Does zlib support the new "Deflate64" format introduced by PKWare?
No. PKWare has apparently decided to keep that format proprietary, since
they have not documented it as they have previous compression formats. In
any case, the compression improvements are so modest compared to other more
modern approaches, that it's not worth the effort to implement.
41. I'm having a problem with the zip functions in zlib, can you help?
There are no zip functions in zlib. You are probably using minizip by
Giles Vollant, which is found in the contrib directory of zlib. It is not
part of zlib. In fact none of the stuff in contrib is part of zlib. The
files in there are not supported by the zlib authors. You need to contact
the authors of the respective contribution for help.
42. The match.asm code in contrib is under the GNU General Public License.
Since it's part of zlib, doesn't that mean that all of zlib falls under the
GNU GPL?
No. The files in contrib are not part of zlib. They were contributed by
other authors and are provided as a convenience to the user within the zlib
distribution. Each item in contrib has its own license.
43. Is zlib subject to export controls? What is its ECCN?
zlib is not subject to export controls, and so is classified as EAR99.
44. Can you please sign these lengthy legal documents and fax them back to us
so that we can use your software in our product?
No. Go away. Shoo.
================================================
FILE: INDEX
================================================
CMakeLists.txt cmake build file
ChangeLog history of changes
FAQ Frequently Asked Questions about zlib
INDEX this file
Makefile dummy Makefile that tells you to ./configure
Makefile.in template for Unix Makefile
README guess what
configure configure script for Unix
make_vms.com makefile for VMS
test/example.c zlib usages examples for build testing
test/minigzip.c minimal gzip-like functionality for build testing
test/infcover.c inf*.c code coverage for build coverage testing
treebuild.xml XML description of source file dependencies
zconf.h.cmakein zconf.h template for cmake
zconf.h.in zconf.h template for configure
zlib.3 Man page for zlib
zlib.3.pdf Man page in PDF format
zlib.map Linux symbol information
zlib.pc.in Template for pkg-config descriptor
zlib.pc.cmakein zlib.pc template for cmake
zlib2ansi perl script to convert source files for C++ compilation
amiga/ makefiles for Amiga SAS C
doc/ documentation for formats and algorithms
msdos/ makefiles for MSDOS
old/ makefiles for various architectures and zlib documentation
files that have not yet been updated for zlib 1.2.x
os400/ makefiles for OS/400
qnx/ makefiles for QNX
watcom/ makefiles for OpenWatcom
win32/ makefiles for Windows
zlib public header files (required for library use):
zconf.h
zlib.h
private source files used to build the zlib library:
adler32.c
compress.c
crc32.c
crc32.h
deflate.c
deflate.h
gzclose.c
gzguts.h
gzlib.c
gzread.c
gzwrite.c
infback.c
inffast.c
inffast.h
inffixed.h
inflate.c
inflate.h
inftrees.c
inftrees.h
trees.c
trees.h
uncompr.c
zutil.c
zutil.h
source files for sample programs
See examples/README.examples
unsupported contributions by third parties
See contrib/README.contrib
================================================
FILE: LICENSE
================================================
Copyright notice:
(C) 1995-2026 Jean-loup Gailly and Mark Adler
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
Jean-loup Gailly Mark Adler
jloup@gzip.org madler@alumni.caltech.edu
================================================
FILE: MODULE.bazel
================================================
module(
name = "zlib",
version = "0.0.0",
compatibility_level = 1,
)
bazel_dep(name = "platforms", version = "0.0.10")
bazel_dep(name = "rules_cc", version = "0.0.16")
bazel_dep(name = "rules_license", version = "1.0.0")
================================================
FILE: Makefile.in
================================================
# Makefile for zlib
# Copyright (C) 1995-2026 Jean-loup Gailly, Mark Adler
# For conditions of distribution and use, see copyright notice in zlib.h
# To compile and test, type:
# ./configure; make test
# Normally configure builds both a static and a shared library.
# If you want to build just a static library, use: ./configure --static
# To install /usr/local/lib/libz.* and /usr/local/include/zlib.h, type:
# make install
# To install in $HOME instead of /usr/local, use:
# make install prefix=$HOME
CC=cc
GCOV=GCOV
LLVM_GCOV_FLAG=LLMV_GCOV_FLAG
CFLAGS=-O
#CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7
#CFLAGS=-g -DZLIB_DEBUG
#CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
# -Wstrict-prototypes -Wmissing-prototypes
SFLAGS=-O
LDFLAGS=
TEST_LIBS=-L. libz.a
LDSHARED=$(CC)
CPP=$(CC) -E
VGFMAFLAG=
STATICLIB=libz.a
SHAREDLIB=libz.so
SHAREDLIBV=libz.so.1.3.2.1
SHAREDLIBM=libz.so.1
LIBS=$(STATICLIB) $(SHAREDLIBV)
AR=ar
ARFLAGS=rc
RANLIB=ranlib
LDCONFIG=ldconfig
LDSHAREDLIBC=-lc
TAR=tar
SHELL=/bin/sh
EXE=
prefix = /usr/local
exec_prefix = ${prefix}
libdir = ${exec_prefix}/lib
sharedlibdir = ${libdir}
includedir = ${prefix}/include
mandir = ${prefix}/share/man
man3dir = ${mandir}/man3
pkgconfigdir = ${libdir}/pkgconfig
SRCDIR=
ZINC=
ZINCOUT=-I.
OBJZ = adler32.o crc32.o deflate.o infback.o inffast.o inflate.o inftrees.o trees.o zutil.o
OBJG = compress.o uncompr.o gzclose.o gzlib.o gzread.o gzwrite.o
OBJC = $(OBJZ) $(OBJG)
PIC_OBJZ = adler32.lo crc32.lo deflate.lo infback.lo inffast.lo inflate.lo inftrees.lo trees.lo zutil.lo
PIC_OBJG = compress.lo uncompr.lo gzclose.lo gzlib.lo gzread.lo gzwrite.lo
PIC_OBJC = $(PIC_OBJZ) $(PIC_OBJG)
# to use the asm code: make OBJA=match.o, PIC_OBJA=match.lo
OBJA =
PIC_OBJA =
OBJS = $(OBJC) $(OBJA)
PIC_OBJS = $(PIC_OBJC) $(PIC_OBJA)
all: static shared
static: example$(EXE) minigzip$(EXE)
shared: examplesh$(EXE) minigzipsh$(EXE)
all64: example64$(EXE) minigzip64$(EXE)
check: test
test: all teststatic testshared
teststatic: static
@TMPST=tmpst_$$; \
if echo hello world | ${QEMU_RUN} ./minigzip | ${QEMU_RUN} ./minigzip -d && ${QEMU_RUN} ./example $$TMPST ; then \
echo ' *** zlib test OK ***'; \
else \
echo ' *** zlib test FAILED ***'; false; \
fi
@rm -f tmpst_$$
testshared: shared
@LD_LIBRARY_PATH=`pwd`:$(LD_LIBRARY_PATH) ; export LD_LIBRARY_PATH; \
LD_LIBRARYN32_PATH=`pwd`:$(LD_LIBRARYN32_PATH) ; export LD_LIBRARYN32_PATH; \
DYLD_LIBRARY_PATH=`pwd`:$(DYLD_LIBRARY_PATH) ; export DYLD_LIBRARY_PATH; \
SHLIB_PATH=`pwd`:$(SHLIB_PATH) ; export SHLIB_PATH; \
TMPSH=tmpsh_$$; \
if echo hello world | ${QEMU_RUN} ./minigzipsh | ${QEMU_RUN} ./minigzipsh -d && ${QEMU_RUN} ./examplesh $$TMPSH; then \
echo ' *** zlib shared test OK ***'; \
else \
echo ' *** zlib shared test FAILED ***'; false; \
fi
@rm -f tmpsh_$$
test64: all64
@TMP64=tmp64_$$; \
if echo hello world | ${QEMU_RUN} ./minigzip64 | ${QEMU_RUN} ./minigzip64 -d && ${QEMU_RUN} ./example64 $$TMP64; then \
echo ' *** zlib 64-bit test OK ***'; \
else \
echo ' *** zlib 64-bit test FAILED ***'; false; \
fi
@rm -f tmp64_$$
infcover.o: $(SRCDIR)test/infcover.c $(SRCDIR)zlib.h zconf.h $(SRCDIR)inflate.h $(SRCDIR)inftrees.h
$(CC) $(CFLAGS) $(ZINCOUT) -c -coverage -o $@ $(SRCDIR)test/infcover.c
infcover: infcover.o libz.a
$(CC) $(CFLAGS) -coverage -o $@ infcover.o libz.a
cover: infcover
rm -f *.gcda
${QEMU_RUN} ./infcover
${GCOV} ${LLVM_GCOV_FLAG} inf*.c -o ./infcover.gcda
libz.a: $(OBJS)
$(AR) $(ARFLAGS) $@ $(OBJS)
-@ ($(RANLIB) $@ || true) >/dev/null 2>&1
match.o: match.S
$(CPP) match.S > _match.s
$(CC) -c _match.s
mv _match.o match.o
rm -f _match.s
match.lo: match.S
$(CPP) match.S > _match.s
$(CC) -c -fPIC _match.s
mv _match.o match.lo
rm -f _match.s
example.o: $(SRCDIR)test/example.c $(SRCDIR)zlib.h zconf.h
$(CC) $(CFLAGS) $(ZINCOUT) -c -o $@ $(SRCDIR)test/example.c
minigzip.o: $(SRCDIR)test/minigzip.c $(SRCDIR)zlib.h zconf.h
$(CC) $(CFLAGS) $(ZINCOUT) -c -o $@ $(SRCDIR)test/minigzip.c
example64.o: $(SRCDIR)test/example.c $(SRCDIR)zlib.h zconf.h
$(CC) $(CFLAGS) $(ZINCOUT) -D_FILE_OFFSET_BITS=64 -c -o $@ $(SRCDIR)test/example.c
minigzip64.o: $(SRCDIR)test/minigzip.c $(SRCDIR)zlib.h zconf.h
$(CC) $(CFLAGS) $(ZINCOUT) -D_FILE_OFFSET_BITS=64 -c -o $@ $(SRCDIR)test/minigzip.c
adler32.o: $(SRCDIR)adler32.c
$(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)adler32.c
crc32.o: $(SRCDIR)crc32.c
$(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)crc32.c
crc32_vx.o: $(SRCDIR)contrib/crc32vx/crc32_vx.c
$(CC) $(CFLAGS) $(VGFMAFLAG) $(ZINC) -c -o $@ $(SRCDIR)contrib/crc32vx/crc32_vx.c
deflate.o: $(SRCDIR)deflate.c
$(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)deflate.c
infback.o: $(SRCDIR)infback.c
$(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)infback.c
inffast.o: $(SRCDIR)inffast.c
$(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)inffast.c
inflate.o: $(SRCDIR)inflate.c
$(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)inflate.c
inftrees.o: $(SRCDIR)inftrees.c
$(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)inftrees.c
trees.o: $(SRCDIR)trees.c
$(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)trees.c
zutil.o: $(SRCDIR)zutil.c $(SRCDIR)gzguts.h
$(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)zutil.c
compress.o: $(SRCDIR)compress.c
$(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)compress.c
uncompr.o: $(SRCDIR)uncompr.c
$(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)uncompr.c
gzclose.o: $(SRCDIR)gzclose.c
$(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)gzclose.c
gzlib.o: $(SRCDIR)gzlib.c
$(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)gzlib.c
gzread.o: $(SRCDIR)gzread.c
$(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)gzread.c
gzwrite.o: $(SRCDIR)gzwrite.c
$(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)gzwrite.c
adler32.lo: $(SRCDIR)adler32.c
-@mkdir objs 2>/dev/null || test -d objs
$(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/adler32.o $(SRCDIR)adler32.c
-@mv objs/adler32.o $@
crc32.lo: $(SRCDIR)crc32.c
-@mkdir objs 2>/dev/null || test -d objs
$(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/crc32.o $(SRCDIR)crc32.c
-@mv objs/crc32.o $@
crc32_vx.lo: $(SRCDIR)contrib/crc32vx/crc32_vx.c
-@mkdir objs 2>/dev/null || test -d objs
$(CC) $(SFLAGS) $(VGFMAFLAG) $(ZINC) -DPIC -c -o objs/crc32_vx.o $(SRCDIR)contrib/crc32vx/crc32_vx.c
-@mv objs/crc32_vx.o $@
deflate.lo: $(SRCDIR)deflate.c
-@mkdir objs 2>/dev/null || test -d objs
$(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/deflate.o $(SRCDIR)deflate.c
-@mv objs/deflate.o $@
infback.lo: $(SRCDIR)infback.c
-@mkdir objs 2>/dev/null || test -d objs
$(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/infback.o $(SRCDIR)infback.c
-@mv objs/infback.o $@
inffast.lo: $(SRCDIR)inffast.c
-@mkdir objs 2>/dev/null || test -d objs
$(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/inffast.o $(SRCDIR)inffast.c
-@mv objs/inffast.o $@
inflate.lo: $(SRCDIR)inflate.c
-@mkdir objs 2>/dev/null || test -d objs
$(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/inflate.o $(SRCDIR)inflate.c
-@mv objs/inflate.o $@
inftrees.lo: $(SRCDIR)inftrees.c
-@mkdir objs 2>/dev/null || test -d objs
$(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/inftrees.o $(SRCDIR)inftrees.c
-@mv objs/inftrees.o $@
trees.lo: $(SRCDIR)trees.c
-@mkdir objs 2>/dev/null || test -d objs
$(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/trees.o $(SRCDIR)trees.c
-@mv objs/trees.o $@
zutil.lo: $(SRCDIR)zutil.c $(SRCDIR)gzguts.h
-@mkdir objs 2>/dev/null || test -d objs
$(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/zutil.o $(SRCDIR)zutil.c
-@mv objs/zutil.o $@
compress.lo: $(SRCDIR)compress.c
-@mkdir objs 2>/dev/null || test -d objs
$(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/compress.o $(SRCDIR)compress.c
-@mv objs/compress.o $@
uncompr.lo: $(SRCDIR)uncompr.c
-@mkdir objs 2>/dev/null || test -d objs
$(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/uncompr.o $(SRCDIR)uncompr.c
-@mv objs/uncompr.o $@
gzclose.lo: $(SRCDIR)gzclose.c
-@mkdir objs 2>/dev/null || test -d objs
$(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/gzclose.o $(SRCDIR)gzclose.c
-@mv objs/gzclose.o $@
gzlib.lo: $(SRCDIR)gzlib.c
-@mkdir objs 2>/dev/null || test -d objs
$(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/gzlib.o $(SRCDIR)gzlib.c
-@mv objs/gzlib.o $@
gzread.lo: $(SRCDIR)gzread.c
-@mkdir objs 2>/dev/null || test -d objs
$(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/gzread.o $(SRCDIR)gzread.c
-@mv objs/gzread.o $@
gzwrite.lo: $(SRCDIR)gzwrite.c
-@mkdir objs 2>/dev/null || test -d objs
$(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/gzwrite.o $(SRCDIR)gzwrite.c
-@mv objs/gzwrite.o $@
placebo $(SHAREDLIBV): $(PIC_OBJS) libz.a $(SRCDIR)zlib.map
$(LDSHARED) $(SFLAGS) -o $@ $(PIC_OBJS) $(LDSHAREDLIBC) $(LDFLAGS)
rm -f $(SHAREDLIB) $(SHAREDLIBM)
ln -s $@ $(SHAREDLIB)
ln -s $@ $(SHAREDLIBM)
-@rmdir objs
example$(EXE): example.o $(STATICLIB)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ example.o $(TEST_LIBS)
minigzip$(EXE): minigzip.o $(STATICLIB)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ minigzip.o $(TEST_LIBS)
examplesh$(EXE): example.o $(SHAREDLIBV)
$(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS) -L. $(SHAREDLIBV)
minigzipsh$(EXE): minigzip.o $(SHAREDLIBV)
$(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS) -L. $(SHAREDLIBV)
example64$(EXE): example64.o $(STATICLIB)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ example64.o $(TEST_LIBS)
minigzip64$(EXE): minigzip64.o $(STATICLIB)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ minigzip64.o $(TEST_LIBS)
install-libs: $(LIBS)
-@if [ ! -d $(DESTDIR)$(exec_prefix) ]; then mkdir -p $(DESTDIR)$(exec_prefix); fi
-@if [ ! -d $(DESTDIR)$(libdir) ]; then mkdir -p $(DESTDIR)$(libdir); fi
-@if [ ! -d $(DESTDIR)$(sharedlibdir) ]; then mkdir -p $(DESTDIR)$(sharedlibdir); fi
-@if [ ! -d $(DESTDIR)$(man3dir) ]; then mkdir -p $(DESTDIR)$(man3dir); fi
-@if [ ! -d $(DESTDIR)$(pkgconfigdir) ]; then mkdir -p $(DESTDIR)$(pkgconfigdir); fi
rm -f $(DESTDIR)$(libdir)/$(STATICLIB)
cp $(STATICLIB) $(DESTDIR)$(libdir)
chmod 644 $(DESTDIR)$(libdir)/$(STATICLIB)
-@($(RANLIB) $(DESTDIR)$(libdir)/libz.a || true) >/dev/null 2>&1
-@if test -n "$(SHAREDLIBV)"; then \
rm -f $(DESTDIR)$(sharedlibdir)/$(SHAREDLIBV); \
cp $(SHAREDLIBV) $(DESTDIR)$(sharedlibdir); \
echo "cp $(SHAREDLIBV) $(DESTDIR)$(sharedlibdir)"; \
chmod 755 $(DESTDIR)$(sharedlibdir)/$(SHAREDLIBV); \
echo "chmod 755 $(DESTDIR)$(sharedlibdir)/$(SHAREDLIBV)"; \
rm -f $(DESTDIR)$(sharedlibdir)/$(SHAREDLIB) $(DESTDIR)$(sharedlibdir)/$(SHAREDLIBM); \
ln -s $(SHAREDLIBV) $(DESTDIR)$(sharedlibdir)/$(SHAREDLIB); \
ln -s $(SHAREDLIBV) $(DESTDIR)$(sharedlibdir)/$(SHAREDLIBM); \
($(LDCONFIG) || true) >/dev/null 2>&1; \
fi
rm -f $(DESTDIR)$(man3dir)/zlib.3
cp $(SRCDIR)zlib.3 $(DESTDIR)$(man3dir)
chmod 644 $(DESTDIR)$(man3dir)/zlib.3
rm -f $(DESTDIR)$(pkgconfigdir)/zlib.pc
cp zlib.pc $(DESTDIR)$(pkgconfigdir)
chmod 644 $(DESTDIR)$(pkgconfigdir)/zlib.pc
# The ranlib in install is needed on NeXTSTEP which checks file times
# ldconfig is for Linux
install: install-libs
-@if [ ! -d $(DESTDIR)$(includedir) ]; then mkdir -p $(DESTDIR)$(includedir); fi
rm -f $(DESTDIR)$(includedir)/zlib.h $(DESTDIR)$(includedir)/zconf.h
cp $(SRCDIR)zlib.h zconf.h $(DESTDIR)$(includedir)
chmod 644 $(DESTDIR)$(includedir)/zlib.h $(DESTDIR)$(includedir)/zconf.h
uninstall:
cd $(DESTDIR)$(includedir) && rm -f zlib.h zconf.h
cd $(DESTDIR)$(libdir) && rm -f libz.a; \
if test -n "$(SHAREDLIBV)" -a -f $(SHAREDLIBV); then \
rm -f $(SHAREDLIBV) $(SHAREDLIB) $(SHAREDLIBM); \
fi
cd $(DESTDIR)$(man3dir) && rm -f zlib.3
cd $(DESTDIR)$(pkgconfigdir) && rm -f zlib.pc
docs: zlib.3.pdf
zlib.3.pdf: $(SRCDIR)zlib.3
groff -mandoc -f H -T ps $(SRCDIR)zlib.3 | ps2pdf - $@
# zconf.h.cmakein: $(SRCDIR)zconf.h.in
# -@ TEMPFILE=zconfh_$$; \
# echo "/#define ZCONF_H/ a\\\\\n#cmakedefine Z_PREFIX\\\\\n#cmakedefine Z_HAVE_UNISTD_H\n" >> $$TEMPFILE &&\
# sed -f $$TEMPFILE $(SRCDIR)zconf.h.in > $@ &&\
# touch -r $(SRCDIR)zconf.h.in $@ &&\
# rm $$TEMPFILE
#
zconf: $(SRCDIR)zconf.h.in
cp -p $(SRCDIR)zconf.h.in zconf.h
minizip-test: static
cd contrib/minizip && { CC="$(CC)" CFLAGS="$(CFLAGS)" $(MAKE) test ; cd ../.. ; }
minizip-clean:
cd contrib/minizip && { $(MAKE) clean ; cd ../.. ; }
mostlyclean: clean
clean: minizip-clean
rm -f *.o *.lo *~ \
example$(EXE) minigzip$(EXE) examplesh$(EXE) minigzipsh$(EXE) \
example64$(EXE) minigzip64$(EXE) \
infcover \
libz.* foo.gz so_locations \
_match.s maketree contrib/infback9/*.o
rm -rf objs
rm -f *.gcda *.gcno *.gcov
rm -f contrib/infback9/*.gcda contrib/infback9/*.gcno contrib/infback9/*.gcov
maintainer-clean: distclean
distclean: clean zconf # zconf.h.cmakein
rm -f Makefile zlib.pc configure.log
-@rm -f .DS_Store
@if [ -f Makefile.in ]; then \
printf 'all:\n\t-@echo "Please use ./configure first. Thank you."\n' > Makefile ; \
printf '\ndistclean:\n\tmake -f Makefile.in distclean\n' >> Makefile ; \
touch -r $(SRCDIR)Makefile.in Makefile ; fi
tags:
etags $(SRCDIR)*.[ch]
adler32.o: $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h
zutil.o: $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h $(SRCDIR)gzguts.h
gzclose.o gzlib.o gzread.o gzwrite.o: $(SRCDIR)zlib.h zconf.h $(SRCDIR)gzguts.h
compress.o example.o minigzip.o uncompr.o: $(SRCDIR)zlib.h zconf.h
crc32.o: $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h $(SRCDIR)crc32.h
deflate.o: $(SRCDIR)deflate.h $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h
infback.o inflate.o: $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h $(SRCDIR)inftrees.h $(SRCDIR)inflate.h $(SRCDIR)inffast.h $(SRCDIR)inffixed.h
inffast.o: $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h $(SRCDIR)inftrees.h $(SRCDIR)inflate.h $(SRCDIR)inffast.h
inftrees.o: $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h $(SRCDIR)inftrees.h
trees.o: $(SRCDIR)deflate.h $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h $(SRCDIR)trees.h
crc32_vx.o: $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h $(SRCDIR)contrib/crc32vx/crc32_vx_hooks.h
adler32.lo: $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h
zutil.lo: $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h $(SRCDIR)gzguts.h
gzclose.lo gzlib.lo gzread.lo gzwrite.lo: $(SRCDIR)zlib.h zconf.h $(SRCDIR)gzguts.h
compress.lo example.lo minigzip.lo uncompr.lo: $(SRCDIR)zlib.h zconf.h
crc32.lo: $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h $(SRCDIR)crc32.h
deflate.lo: $(SRCDIR)deflate.h $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h
infback.lo inflate.lo: $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h $(SRCDIR)inftrees.h $(SRCDIR)inflate.h $(SRCDIR)inffast.h $(SRCDIR)inffixed.h
inffast.lo: $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h $(SRCDIR)inftrees.h $(SRCDIR)inflate.h $(SRCDIR)inffast.h
inftrees.lo: $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h $(SRCDIR)inftrees.h
trees.lo: $(SRCDIR)deflate.h $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h $(SRCDIR)trees.h
crc32_vx.lo: $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h $(SRCDIR)contrib/crc32vx/crc32_vx_hooks.h
================================================
FILE: README
================================================
ZLIB DATA COMPRESSION LIBRARY
zlib 1.3.2.1 is a general purpose data compression library. All the code is
thread safe (though see the FAQ for caveats). The data format used by the zlib
library is described by RFCs (Request for Comments) 1950 to 1952 at
https://datatracker.ietf.org/doc/html/rfc1950 (zlib format), rfc1951 (deflate
format) and rfc1952 (gzip format).
All functions of the compression library are documented in the file zlib.h
(volunteer to write man pages welcome, contact zlib@gzip.org). A usage example
of the library is given in the file test/example.c which also tests that
the library is working correctly. Another example is given in the file
test/minigzip.c. The compression library itself is composed of all source
files in the root directory.
To compile all files and run the test program, follow the instructions given at
the top of Makefile.in. In short "./configure; make test", and if that goes
well, "make install" should work for most flavors of Unix. For Windows, use
one of the special makefiles in win32/ or contrib/vstudio/ . For VMS, use
make_vms.com.
Questions about zlib should be sent to <zlib@gzip.org>, or to Gilles Vollant
<info@winimage.com> for the Windows DLL version. The zlib home page is
https://zlib.net/ . Before reporting a problem, please check this site to
verify that you have the latest version of zlib; otherwise get the latest
version and check whether the problem still exists or not.
PLEASE read the zlib FAQ https://zlib.net/zlib_faq.html before asking for help.
Mark Nelson <markn@ieee.org> wrote an article about zlib for the Jan. 1997
issue of Dr. Dobb's Journal; a copy of the article is available at
https://zlib.net/nelson/ .
The changes made in version 1.3.2.1 are documented in the file ChangeLog.
Unsupported third party contributions are provided in directory contrib/ .
zlib is available in Java using the java.util.zip package. Follow the API
Documentation link at: https://docs.oracle.com/search/?q=java.util.zip .
A Perl interface to zlib and bzip2 written by Paul Marquess <pmqs@cpan.org>
can be found at https://github.com/pmqs/IO-Compress .
A Python interface to zlib written by A.M. Kuchling <amk@amk.ca> is
available in Python 1.5 and later versions, see
https://docs.python.org/3/library/zlib.html .
zlib is built into tcl: https://wiki.tcl-lang.org/page/zlib .
An experimental package to read and write files in .zip format, written on top
of zlib by Gilles Vollant <info@winimage.com>, is available in the
contrib/minizip directory of zlib.
Notes for some targets:
- For Windows DLL versions, please see win32/DLL_FAQ.txt
- For 64-bit Irix, deflate.c must be compiled without any optimization. With
-O, one libpng test fails. The test works in 32 bit mode (with the -n32
compiler flag). The compiler bug has been reported to SGI.
- zlib doesn't work with gcc 2.6.3 on a DEC 3000/300LX under OSF/1 2.1 it works
when compiled with cc.
- On Digital Unix 4.0D (formerly OSF/1) on AlphaServer, the cc option -std1 is
necessary to get gzprintf working correctly. This is done by configure.
- zlib doesn't work on HP-UX 9.05 with some versions of /bin/cc. It works with
other compilers. Use "make test" to check your compiler.
- For PalmOs, see https://palmzlib.sourceforge.net/
Acknowledgments:
The deflate format used by zlib was defined by Phil Katz. The deflate and
zlib specifications were written by L. Peter Deutsch. Thanks to all the
people who reported problems and suggested various improvements in zlib; they
are too numerous to cite here.
Copyright notice:
(C) 1995-2026 Jean-loup Gailly and Mark Adler
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
Jean-loup Gailly Mark Adler
jloup@gzip.org madler@alumni.caltech.edu
If you use the zlib library in a product, we would appreciate *not* receiving
lengthy legal documents to sign. The sources are provided for free but without
warranty of any kind. The library has been entirely written by Jean-loup
Gailly and Mark Adler; it does not include third-party code. We make all
contributions to and distributions of this project solely in our personal
capacity, and are not conveying any rights to any intellectual property of
any third parties.
If you redistribute modified sources, we would appreciate that you include in
the file ChangeLog history information documenting your changes. Please read
the FAQ for more information on the distribution of modified source versions.
================================================
FILE: README-cmake.md
================================================
# For building with cmake at least version 3.12 (minizip 3.12) is needed
In most cases the usual
cmake -S . -B build -D CMAKE_BUILD_TYPE=Release
will create everything you need, however if you want something off default you can adjust several options fit your needs.
Every option is list below (excluding the cmake-standard options), they can be set via cmake-gui or on cmdline with
-D<option>=ON/OFF
## ZLIB-options with defaults ##
ZLIB_BUILD_TESTING=ON -- Enable Zlib Examples as tests
ZLIB_BUILD_SHARED=ON -- Enable building zlib shared library
ZLIB_BUILD_STATIC=ON -- Enable building zlib static library
ZLIB_BUILD_MINIZIP=ON -- Enable building libminizip contrib library
If this option is turned on, additional options are available from minizip (see below)
ZLIB_INSTALL=ON -- Enable installation of zlib
ZLIB_PREFIX=OFF -- prefix for all types and library functions, see zconf.h.in
This option is only on windows available and may/will be turned off and removed somewhen in the future.
If you rely cmake for finding and using zlib, this can be turned off, as `zlib1.dll` will never be used.
## minizip-options with defaults ##
MINIZIP_BUILD_SHARED=ON -- Enable building minizip shared library
MINIZIP_BUILD_STATIC=ON -- Enable building minizip static library
MINIZIP_BUILD_TESTING=ON -- Enable testing of minizip
MINIZIP_ENABLE_BZIP2=ON -- Build minizip withj bzip2 support
A usable installation of bzip2 is needed or config will fail. Turn this option of in this case.
MINIZIP_INSTALL=ON -- Enable installation of minizip
This option is only available on mingw as they tend to name this lib different. Maybe this will also be
removed in the future as. If you rely cmake for finding and using zlib, this can be turned off, as
the other file will never be used.
## Using the libs ##
To pull in what you need it's enough to just write
find_package(ZLIB CONFIG)
or
find_package(minizip CONFIG)
in your CMakeLists.txt, however it is advised to specify what you really want via:
find_package(ZLIB CONFIG COMPONENTS shared static REQUIRED)
or
find_package(minizip CONFIG COMPONENTS shared static REQUIRED)
As it's possible to only build the shared or the static lib, you can make sure that everything you need
is found. If no COMPONENTS are requested, everything needs to be found to satisfy your request. If the
libraries are optional in you project, you can omit the REQUIRED and check yourself if the targets you
want to link against are created.
When you search for minizip, it will search zlib for you, so only one of both is needed.
## Imported targets ##
When found the following targets are created for you:
ZLIB::ZLIB and ZLIB::ZLIBSTATIC -- for zlib
MINIZIP::minizip and MINIZIP::minizipstatic -- for minizip
================================================
FILE: adler32.c
================================================
/* adler32.c -- compute the Adler-32 checksum of a data stream
* Copyright (C) 1995-2011, 2016 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
/* @(#) $Id$ */
#include "zutil.h"
#define BASE 65521U /* largest prime smaller than 65536 */
#define NMAX 5552
/* NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 */
#define DO1(buf,i) {adler += (buf)[i]; sum2 += adler;}
#define DO2(buf,i) DO1(buf,i); DO1(buf,i+1);
#define DO4(buf,i) DO2(buf,i); DO2(buf,i+2);
#define DO8(buf,i) DO4(buf,i); DO4(buf,i+4);
#define DO16(buf) DO8(buf,0); DO8(buf,8);
/* use NO_DIVIDE if your processor does not do division in hardware --
try it both ways to see which is faster */
#ifdef NO_DIVIDE
/* note that this assumes BASE is 65521, where 65536 % 65521 == 15
(thank you to John Reiser for pointing this out) */
# define CHOP(a) \
do { \
unsigned long tmp = a >> 16; \
a &= 0xffffUL; \
a += (tmp << 4) - tmp; \
} while (0)
# define MOD28(a) \
do { \
CHOP(a); \
if (a >= BASE) a -= BASE; \
} while (0)
# define MOD(a) \
do { \
CHOP(a); \
MOD28(a); \
} while (0)
# define MOD63(a) \
do { /* this assumes a is not negative */ \
z_off64_t tmp = a >> 32; \
a &= 0xffffffffL; \
a += (tmp << 8) - (tmp << 5) + tmp; \
tmp = a >> 16; \
a &= 0xffffL; \
a += (tmp << 4) - tmp; \
tmp = a >> 16; \
a &= 0xffffL; \
a += (tmp << 4) - tmp; \
if (a >= BASE) a -= BASE; \
} while (0)
#else
# define MOD(a) a %= BASE
# define MOD28(a) a %= BASE
# define MOD63(a) a %= BASE
#endif
/* ========================================================================= */
uLong ZEXPORT adler32_z(uLong adler, const Bytef *buf, z_size_t len) {
unsigned long sum2;
unsigned n;
/* split Adler-32 into component sums */
sum2 = (adler >> 16) & 0xffff;
adler &= 0xffff;
/* in case user likes doing a byte at a time, keep it fast */
if (len == 1) {
adler += buf[0];
if (adler >= BASE)
adler -= BASE;
sum2 += adler;
if (sum2 >= BASE)
sum2 -= BASE;
return adler | (sum2 << 16);
}
/* initial Adler-32 value (deferred check for len == 1 speed) */
if (buf == Z_NULL)
return 1L;
/* in case short lengths are provided, keep it somewhat fast */
if (len < 16) {
while (len--) {
adler += *buf++;
sum2 += adler;
}
if (adler >= BASE)
adler -= BASE;
MOD28(sum2); /* only added so many BASE's */
return adler | (sum2 << 16);
}
/* do length NMAX blocks -- requires just one modulo operation */
while (len >= NMAX) {
len -= NMAX;
n = NMAX / 16; /* NMAX is divisible by 16 */
do {
DO16(buf); /* 16 sums unrolled */
buf += 16;
} while (--n);
MOD(adler);
MOD(sum2);
}
/* do remaining bytes (less than NMAX, still just one modulo) */
if (len) { /* avoid modulos if none remaining */
while (len >= 16) {
len -= 16;
DO16(buf);
buf += 16;
}
while (len--) {
adler += *buf++;
sum2 += adler;
}
MOD(adler);
MOD(sum2);
}
/* return recombined sums */
return adler | (sum2 << 16);
}
/* ========================================================================= */
uLong ZEXPORT adler32(uLong adler, const Bytef *buf, uInt len) {
return adler32_z(adler, buf, len);
}
/* ========================================================================= */
local uLong adler32_combine_(uLong adler1, uLong adler2, z_off64_t len2) {
unsigned long sum1;
unsigned long sum2;
unsigned rem;
/* for negative len, return invalid adler32 as a clue for debugging */
if (len2 < 0)
return 0xffffffffUL;
/* the derivation of this formula is left as an exercise for the reader */
MOD63(len2); /* assumes len2 >= 0 */
rem = (unsigned)len2;
sum1 = adler1 & 0xffff;
sum2 = rem * sum1;
MOD(sum2);
sum1 += (adler2 & 0xffff) + BASE - 1;
sum2 += ((adler1 >> 16) & 0xffff) + ((adler2 >> 16) & 0xffff) + BASE - rem;
if (sum1 >= BASE) sum1 -= BASE;
if (sum1 >= BASE) sum1 -= BASE;
if (sum2 >= ((unsigned long)BASE << 1)) sum2 -= ((unsigned long)BASE << 1);
if (sum2 >= BASE) sum2 -= BASE;
return sum1 | (sum2 << 16);
}
/* ========================================================================= */
uLong ZEXPORT adler32_combine(uLong adler1, uLong adler2, z_off_t len2) {
return adler32_combine_(adler1, adler2, len2);
}
uLong ZEXPORT adler32_combine64(uLong adler1, uLong adler2, z_off64_t len2) {
return adler32_combine_(adler1, adler2, len2);
}
================================================
FILE: amiga/Makefile.pup
================================================
# Amiga powerUP (TM) Makefile
# makefile for libpng and SAS C V6.58/7.00 PPC compiler
# Copyright (C) 1998 by Andreas R. Kleinert
LIBNAME = libzip.a
CC = scppc
CFLAGS = NOSTKCHK NOSINT OPTIMIZE OPTGO OPTPEEP OPTINLOCAL OPTINL \
OPTLOOP OPTRDEP=8 OPTDEP=8 OPTCOMP=8 NOVER
AR = ppc-amigaos-ar cr
RANLIB = ppc-amigaos-ranlib
LD = ppc-amigaos-ld -r
LDFLAGS = -o
LDLIBS = LIB:scppc.a LIB:end.o
RM = delete quiet
OBJS = adler32.o compress.o crc32.o gzclose.o gzlib.o gzread.o gzwrite.o \
uncompr.o deflate.o trees.o zutil.o inflate.o infback.o inftrees.o inffast.o
TEST_OBJS = example.o minigzip.o
all: example minigzip
check: test
test: all
example
echo hello world | minigzip | minigzip -d
$(LIBNAME): $(OBJS)
$(AR) $@ $(OBJS)
-$(RANLIB) $@
example: example.o $(LIBNAME)
$(LD) $(LDFLAGS) $@ LIB:c_ppc.o $@.o $(LIBNAME) $(LDLIBS)
minigzip: minigzip.o $(LIBNAME)
$(LD) $(LDFLAGS) $@ LIB:c_ppc.o $@.o $(LIBNAME) $(LDLIBS)
mostlyclean: clean
clean:
$(RM) *.o example minigzip $(LIBNAME) foo.gz
zip:
zip -ul9 zlib README ChangeLog Makefile Make????.??? Makefile.?? \
descrip.mms *.[ch]
tgz:
cd ..; tar cfz zlib/zlib.tgz zlib/README zlib/ChangeLog zlib/Makefile \
zlib/Make????.??? zlib/Makefile.?? zlib/descrip.mms zlib/*.[ch]
# DO NOT DELETE THIS LINE -- make depend depends on it.
adler32.o: zlib.h zconf.h
compress.o: zlib.h zconf.h
crc32.o: crc32.h zlib.h zconf.h
deflate.o: deflate.h zutil.h zlib.h zconf.h
example.o: zlib.h zconf.h
gzclose.o: zlib.h zconf.h gzguts.h
gzlib.o: zlib.h zconf.h gzguts.h
gzread.o: zlib.h zconf.h gzguts.h
gzwrite.o: zlib.h zconf.h gzguts.h
inffast.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
inflate.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
infback.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
inftrees.o: zutil.h zlib.h zconf.h inftrees.h
minigzip.o: zlib.h zconf.h
trees.o: deflate.h zutil.h zlib.h zconf.h trees.h
uncompr.o: zlib.h zconf.h
zutil.o: zutil.h zlib.h zconf.h
================================================
FILE: amiga/Makefile.sas
================================================
# SMakefile for zlib
# Modified from the standard UNIX Makefile Copyright Jean-loup Gailly
# Osma Ahvenlampi <Osma.Ahvenlampi@hut.fi>
# Amiga, SAS/C 6.56 & Smake
CC=sc
CFLAGS=OPT
#CFLAGS=OPT CPU=68030
#CFLAGS=DEBUG=LINE
LDFLAGS=LIB z.lib
SCOPTIONS=OPTSCHED OPTINLINE OPTALIAS OPTTIME OPTINLOCAL STRMERGE \
NOICONS PARMS=BOTH NOSTACKCHECK UTILLIB NOVERSION ERRORREXX \
DEF=POSTINC
OBJS = adler32.o compress.o crc32.o gzclose.o gzlib.o gzread.o gzwrite.o \
uncompr.o deflate.o trees.o zutil.o inflate.o infback.o inftrees.o inffast.o
TEST_OBJS = example.o minigzip.o
all: SCOPTIONS example minigzip
check: test
test: all
example
echo hello world | minigzip | minigzip -d
install: z.lib
copy clone zlib.h zconf.h INCLUDE:
copy clone z.lib LIB:
z.lib: $(OBJS)
oml z.lib r $(OBJS)
example: example.o z.lib
$(CC) $(CFLAGS) LINK TO $@ example.o $(LDFLAGS)
minigzip: minigzip.o z.lib
$(CC) $(CFLAGS) LINK TO $@ minigzip.o $(LDFLAGS)
mostlyclean: clean
clean:
-delete force quiet example minigzip *.o z.lib foo.gz *.lnk SCOPTIONS
SCOPTIONS: Makefile.sas
copy to $@ <from <
$(SCOPTIONS)
<
# DO NOT DELETE THIS LINE -- make depend depends on it.
adler32.o: zlib.h zconf.h
compress.o: zlib.h zconf.h
crc32.o: crc32.h zlib.h zconf.h
deflate.o: deflate.h zutil.h zlib.h zconf.h
example.o: zlib.h zconf.h
gzclose.o: zlib.h zconf.h gzguts.h
gzlib.o: zlib.h zconf.h gzguts.h
gzread.o: zlib.h zconf.h gzguts.h
gzwrite.o: zlib.h zconf.h gzguts.h
inffast.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
inflate.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
infback.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
inftrees.o: zutil.h zlib.h zconf.h inftrees.h
minigzip.o: zlib.h zconf.h
trees.o: deflate.h zutil.h zlib.h zconf.h trees.h
uncompr.o: zlib.h zconf.h
zutil.o: zutil.h zlib.h zconf.h
================================================
FILE: compress.c
================================================
/* compress.c -- compress a memory buffer
* Copyright (C) 1995-2026 Jean-loup Gailly, Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
/* @(#) $Id$ */
#define ZLIB_INTERNAL
#include "zlib.h"
/* ===========================================================================
Compresses the source buffer into the destination buffer. The level
parameter has the same meaning as in deflateInit. sourceLen is the byte
length of the source buffer. Upon entry, destLen is the total size of the
destination buffer, which must be at least 0.1% larger than sourceLen plus
12 bytes. Upon exit, destLen is the actual size of the compressed buffer.
compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
memory, Z_BUF_ERROR if there was not enough room in the output buffer,
Z_STREAM_ERROR if the level parameter is invalid.
The _z versions of the functions take size_t length arguments.
*/
int ZEXPORT compress2_z(Bytef *dest, z_size_t *destLen, const Bytef *source,
z_size_t sourceLen, int level) {
z_stream stream;
int err;
const uInt max = (uInt)-1;
z_size_t left;
if ((sourceLen > 0 && source == NULL) ||
destLen == NULL || (*destLen > 0 && dest == NULL))
return Z_STREAM_ERROR;
left = *destLen;
*destLen = 0;
stream.zalloc = (alloc_func)0;
stream.zfree = (free_func)0;
stream.opaque = (voidpf)0;
err = deflateInit(&stream, level);
if (err != Z_OK) return err;
stream.next_out = dest;
stream.avail_out = 0;
stream.next_in = (z_const Bytef *)source;
stream.avail_in = 0;
do {
if (stream.avail_out == 0) {
stream.avail_out = left > (z_size_t)max ? max : (uInt)left;
left -= stream.avail_out;
}
if (stream.avail_in == 0) {
stream.avail_in = sourceLen > (z_size_t)max ? max :
(uInt)sourceLen;
sourceLen -= stream.avail_in;
}
err = deflate(&stream, sourceLen ? Z_NO_FLUSH : Z_FINISH);
} while (err == Z_OK);
*destLen = (z_size_t)(stream.next_out - dest);
deflateEnd(&stream);
return err == Z_STREAM_END ? Z_OK : err;
}
int ZEXPORT compress2(Bytef *dest, uLongf *destLen, const Bytef *source,
uLong sourceLen, int level) {
int ret;
z_size_t got = *destLen;
ret = compress2_z(dest, &got, source, sourceLen, level);
*destLen = (uLong)got;
return ret;
}
/* ===========================================================================
*/
int ZEXPORT compress_z(Bytef *dest, z_size_t *destLen, const Bytef *source,
z_size_t sourceLen) {
return compress2_z(dest, destLen, source, sourceLen,
Z_DEFAULT_COMPRESSION);
}
int ZEXPORT compress(Bytef *dest, uLongf *destLen, const Bytef *source,
uLong sourceLen) {
return compress2(dest, destLen, source, sourceLen, Z_DEFAULT_COMPRESSION);
}
/* ===========================================================================
If the default memLevel or windowBits for deflateInit() is changed, then
this function needs to be updated.
*/
z_size_t ZEXPORT compressBound_z(z_size_t sourceLen) {
z_size_t bound = sourceLen + (sourceLen >> 12) + (sourceLen >> 14) +
(sourceLen >> 25) + 13;
return bound < sourceLen ? (z_size_t)-1 : bound;
}
uLong ZEXPORT compressBound(uLong sourceLen) {
z_size_t bound = compressBound_z(sourceLen);
return (uLong)bound != bound ? (uLong)-1 : (uLong)bound;
}
================================================
FILE: configure
================================================
#!/bin/sh
# configure script for zlib.
#
# Normally configure builds both a static and a shared library.
# If you want to build just a static library, use: ./configure --static
#
# To impose specific compiler or flags or install directory, use for example:
# prefix=$HOME CC=cc CFLAGS="-O4" ./configure
# or for csh/tcsh users:
# (setenv prefix $HOME; setenv CC cc; setenv CFLAGS "-O4"; ./configure)
# Incorrect settings of CC or CFLAGS may prevent creating a shared library.
# If you have problems, try without defining CC and CFLAGS before reporting
# an error.
# start off configure.log
echo -------------------- >> configure.log
echo $0 $* >> configure.log
date >> configure.log
# get source directory
SRCDIR=`dirname $0`
if test $SRCDIR = "."; then
ZINC=""
ZINCOUT="-I."
SRCDIR=""
else
ZINC='-I. -include zconf.h'
ZINCOUT='-I. -I$(SRCDIR)'
SRCDIR="$SRCDIR/"
fi
# set command prefix for cross-compilation
if [ -n "${CHOST}" ]; then
uname=${CHOST}
mname=${CHOST}
CROSS_PREFIX="${CHOST}-"
else
mname=`(uname -a || echo unknown) 2>/dev/null`
fi
# destination name for static library
STATICLIB=libz.a
# extract zlib version numbers from zlib.h
VER=`sed -n -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < ${SRCDIR}zlib.h`
VER3=`echo ${VER}|sed -n -e 's/\([0-9]\{1,\}\(\\.[0-9]\{1,\}\)\{1,2\}\).*/\1/p'`
VER1=`echo ${VER}|sed -n -e 's/\([0-9]\{1,\}\)\\..*/\1/p'`
# establish commands for library building
if "${CROSS_PREFIX}ar" --version >/dev/null 2>/dev/null || test $? -lt 126; then
AR=${AR-"${CROSS_PREFIX}ar"}
test -n "${CROSS_PREFIX}" && echo Using ${AR} | tee -a configure.log
else
AR=${AR-"ar"}
test -n "${CROSS_PREFIX}" && echo Using ${AR} | tee -a configure.log
fi
ARFLAGS=${ARFLAGS-"rc"}
if "${CROSS_PREFIX}ranlib" --version >/dev/null 2>/dev/null || test $? -lt 126; then
RANLIB=${RANLIB-"${CROSS_PREFIX}ranlib"}
test -n "${CROSS_PREFIX}" && echo Using ${RANLIB} | tee -a configure.log
else
RANLIB=${RANLIB-"ranlib"}
fi
if "${CROSS_PREFIX}nm" --version >/dev/null 2>/dev/null || test $? -lt 126; then
NM=${NM-"${CROSS_PREFIX}nm"}
test -n "${CROSS_PREFIX}" && echo Using ${NM} | tee -a configure.log
else
NM=${NM-"nm"}
fi
# set defaults before processing command line options
LDCONFIG=${LDCONFIG-"ldconfig"}
LDSHAREDLIBC="${LDSHAREDLIBC--lc}"
ARCHS=
prefix=${prefix-/usr/local}
exec_prefix=${exec_prefix-'${prefix}'}
libdir=${libdir-'${exec_prefix}/lib'}
sharedlibdir=${sharedlibdir-'${libdir}'}
includedir=${includedir-'${prefix}/include'}
mandir=${mandir-'${prefix}/share/man'}
shared_ext='.so'
shared=1
solo=0
cover=0
zprefix=0
zconst=0
build64=0
gcc=0
clang=0
warn=0
debug=0
address=0
memory=0
undefined=0
insecure=0
unknown=0
enable_crcvx=1
old_cc="$CC"
old_cflags="$CFLAGS"
OBJC='$(OBJZ) $(OBJG)'
PIC_OBJC='$(PIC_OBJZ) $(PIC_OBJG)'
# leave this script, optionally in a bad way
leave()
{
if test "$*" != "0"; then
echo "** $0 aborting." | tee -a configure.log
fi
rm -rf $test.[co] $test $test$shared_ext $test.gcno $test.dSYM ./--version
echo -------------------- >> configure.log
echo >> configure.log
echo >> configure.log
exit $1
}
# process command line options
while test $# -ge 1
do
case "$1" in
-h* | --help)
echo 'usage:' | tee -a configure.log
echo ' configure [--const] [--zprefix] [--prefix=PREFIX] [--eprefix=EXPREFIX]' | tee -a configure.log
echo ' [--insecure] [--static] [--64] [--libdir=LIBDIR] [--sharedlibdir=LIBDIR]' | tee -a configure.log
echo ' [--includedir=INCLUDEDIR] [--mandir=MANDIR]' | tee -a configure.log
echo ' [--archs="-arch i386 -arch x86_64"] [--disable-crcvx]' | tee -a configure.log
exit 0 ;;
-p*=* | --prefix=*) prefix=`echo $1 | sed 's/[^=]*=//'`; shift ;;
-e*=* | --eprefix=*) exec_prefix=`echo $1 | sed 's/[^=]*=//'`; shift ;;
-l*=* | --libdir=*) libdir=`echo $1 | sed 's/[^=]*=//'`; shift ;;
--sharedlibdir=*) sharedlibdir=`echo $1 | sed 's/[^=]*=//'`; shift ;;
-i*=* | --includedir=*) includedir=`echo $1 | sed 's/[^=]*=//'`;shift ;;
-m*=* | --mandir=*) mandir=`echo $1 | sed 's/[^=]*=//'`;shift ;;
-u*=* | --uname=*) uname=`echo $1 | sed 's/[^=]*=//'`;shift ;;
-p* | --prefix) prefix="$2"; shift; shift ;;
-e* | --eprefix) exec_prefix="$2"; shift; shift ;;
-l* | --libdir) libdir="$2"; shift; shift ;;
--sharedlibdir) sharedlibdir="$2"; shift; shift ;;
-i* | --includedir) includedir="$2"; shift; shift ;;
-m* | --mandir) mandir="$2"; shift; shift ;;
-u* | --uname) uname="$2"; shift; shift ;;
-s* | --shared | --enable-shared) shared=1; shift ;;
-t | --static | --disable-shared) shared=0; shift ;;
--solo) solo=1; shift ;;
--cover) cover=1; shift ;;
-z* | --zprefix) zprefix=1; shift ;;
-6* | --64) build64=1; shift ;;
-a*=* | --archs=*) ARCHS=`echo $1 | sed 's/[^=]*=//'`; shift ;;
-a* | --archs) ARCHS="$2"; shift; shift ;;
--sysconfdir=*) echo "ignored option: --sysconfdir" | tee -a configure.log; shift ;;
--localstatedir=*) echo "ignored option: --localstatedir" | tee -a configure.log; shift ;;
-c* | --const) zconst=1; shift ;;
-w* | --warn) warn=$((warn + 1)); shift ;;
-d* | --debug) debug=1; shift ;;
--sanitize) address=1; shift ;;
--address) address=1; shift ;;
--memory) memory=1; shift ;;
--undefined) undefined=1; shift ;;
--insecure) insecure=1; shift ;;
--disable-crcvx) enable_crcvx=0; shift ;;
*) unknown=1; echo "unknown option ignored: $1" | tee -a configure.log; shift;;
esac
done
if test $unknown -eq 1; then
echo "$0 --help for help" | tee -a configure.log
fi
# temporary file name
test=ztest$$
# put arguments in log, also put test file in log if used in arguments
show()
{
case "$*" in
*$test.c*)
echo === $test.c === >> configure.log
cat $test.c >> configure.log
echo === >> configure.log;;
esac
echo $* >> configure.log
}
# check for gcc vs. cc and set compile and link flags based on the system identified by uname
cat > $test.c <<EOF
extern int getchar();
int hello() {return getchar();}
EOF
if test -z "$CC"; then
echo Checking for ${CROSS_PREFIX}gcc... | tee -a configure.log
if ${CROSS_PREFIX}gcc -v >/dev/null 2>&1; then
cc=${CROSS_PREFIX}gcc
else
cc=${CROSS_PREFIX}cc
fi
else
cc=${CC}
fi
case "$cc" in
*gcc*) gcc=1
GCOV="gcov" ;;
*clang*) gcc=1
clang=1 ;;
esac
case `$cc -v 2>&1` in
*gcc*) gcc=1
gitextract_rftpr6jl/ ├── .cmake-format.yaml ├── .github/ │ └── workflows/ │ ├── c-std.yml │ ├── cmake.yml │ ├── configure.yml │ ├── contribs.yml │ ├── fuzz.yml │ ├── msys-cygwin.yml │ └── others.yml ├── .gitignore ├── BUILD.bazel ├── CMakeLists.txt ├── ChangeLog ├── FAQ ├── INDEX ├── LICENSE ├── MODULE.bazel ├── Makefile.in ├── README ├── README-cmake.md ├── adler32.c ├── amiga/ │ ├── Makefile.pup │ └── Makefile.sas ├── compress.c ├── configure ├── contrib/ │ ├── CMakeLists.txt │ ├── README.contrib │ ├── ada/ │ │ ├── CMakeLists.txt │ │ ├── buffer_demo.adb │ │ ├── cmake/ │ │ │ ├── Modules/ │ │ │ │ ├── CMakeADACompiler.cmake.in │ │ │ │ ├── CMakeADAInformation.cmake │ │ │ │ ├── CMakeDetermineADACompiler.cmake │ │ │ │ └── CMakeTestADACompiler.cmake │ │ │ ├── binder_helper.cmake │ │ │ ├── compile_helper.cmake │ │ │ ├── exe_link_helper.cmake │ │ │ ├── shared_link_helper.cmake │ │ │ └── static_link_helper.cmake │ │ ├── mtest.adb │ │ ├── read.adb │ │ ├── readme.txt │ │ ├── test.adb │ │ ├── zlib-streams.adb │ │ ├── zlib-streams.ads │ │ ├── zlib-thin.adb │ │ ├── zlib-thin.ads │ │ ├── zlib.adb │ │ ├── zlib.ads │ │ └── zlib.gpr │ ├── blast/ │ │ ├── CMakeLists.txt │ │ ├── Makefile │ │ ├── README │ │ ├── blast-test.c │ │ ├── blast.c │ │ ├── blast.h │ │ ├── blastConfig.cmake.in │ │ ├── test/ │ │ │ ├── CMakeLists.txt │ │ │ ├── add_subdirectory_exclude_test.cmake.in │ │ │ ├── add_subdirectory_test.cmake.in │ │ │ ├── find_package_no_components_test.cmake.in │ │ │ ├── find_package_test.cmake.in │ │ │ └── find_package_wrong_components_test.cmake.in │ │ ├── test.pk │ │ ├── test.txt │ │ └── tester.cmake │ ├── crc32vx/ │ │ ├── CMakeLists.txt │ │ ├── README │ │ ├── crc32_vx.c │ │ └── crc32_vx_hooks.h │ ├── delphi/ │ │ ├── ZLib.pas │ │ ├── ZLibConst.pas │ │ ├── readme.txt │ │ └── zlibd32.mak │ ├── dotzlib/ │ │ ├── DotZLib/ │ │ │ ├── AssemblyInfo.cs │ │ │ ├── ChecksumImpl.cs │ │ │ ├── CircularBuffer.cs │ │ │ ├── CodecBase.cs │ │ │ ├── Deflater.cs │ │ │ ├── DotZLib.cs │ │ │ ├── DotZLib.csproj │ │ │ ├── GZipStream.cs │ │ │ ├── Inflater.cs │ │ │ └── UnitTests.cs │ │ ├── DotZLib.build │ │ ├── DotZLib.chm │ │ ├── DotZLib.sln │ │ ├── LICENSE_1_0.txt │ │ └── readme.txt │ ├── gcc_gvmat64/ │ │ ├── CMakeLists.txt │ │ └── gvmat64.S │ ├── infback9/ │ │ ├── CMakeLists.txt │ │ ├── README │ │ ├── infback9.c │ │ ├── infback9.h │ │ ├── inffix9.h │ │ ├── inflate9.h │ │ ├── inftree9.c │ │ └── inftree9.h │ ├── iostream/ │ │ ├── test.cpp │ │ ├── zfstream.cpp │ │ └── zfstream.h │ ├── iostream2/ │ │ ├── zstream.h │ │ └── zstream_test.cpp │ ├── iostream3/ │ │ ├── CMakeLists.txt │ │ ├── README │ │ ├── TODO │ │ ├── iostream3Config.cmake.in │ │ ├── test/ │ │ │ ├── CMakeLists.txt │ │ │ ├── add_subdirectory_exclude_test.cmake.in │ │ │ ├── add_subdirectory_test.cmake.in │ │ │ ├── find_package_no_components_test.cmake.in │ │ │ ├── find_package_test.cmake.in │ │ │ └── find_package_wrong_components_test.cmake.in │ │ ├── test.cc │ │ ├── zfstream.cc │ │ └── zfstream.h │ ├── minizip/ │ │ ├── CMakeLists.txt │ │ ├── LICENSE.Info-Zip │ │ ├── Makefile │ │ ├── Makefile.am │ │ ├── MiniZip64_Changes.txt │ │ ├── MiniZip64_info.txt │ │ ├── configure.ac │ │ ├── crypt.h │ │ ├── ints.h │ │ ├── ioapi.c │ │ ├── ioapi.h │ │ ├── iowin32.c │ │ ├── iowin32.h │ │ ├── make_vms.com │ │ ├── miniunz.c │ │ ├── miniunzip.1 │ │ ├── minizip.1 │ │ ├── minizip.c │ │ ├── minizip.pc.in │ │ ├── minizip.pc.txt │ │ ├── minizipConfig.cmake.in │ │ ├── mztools.c │ │ ├── mztools.h │ │ ├── skipset.h │ │ ├── test/ │ │ │ ├── CMakeLists.txt │ │ │ ├── add_subdirectory_exclude_test.cmake.in │ │ │ ├── add_subdirectory_test.cmake.in │ │ │ ├── find_package_no_components_test.cmake.in │ │ │ ├── find_package_test.cmake.in │ │ │ ├── find_package_wrong_components_test.cmake.in │ │ │ └── test_helper.cm │ │ ├── unzip.c │ │ ├── unzip.h │ │ ├── zip.c │ │ └── zip.h │ ├── nuget/ │ │ ├── nuget.csproj │ │ └── nuget.sln │ ├── pascal/ │ │ ├── example.pas │ │ ├── readme.txt │ │ ├── zlibd32.mak │ │ └── zlibpas.pas │ ├── puff/ │ │ ├── CMakeLists.txt │ │ ├── Makefile │ │ ├── README │ │ ├── bin-writer.c │ │ ├── puff.c │ │ ├── puff.h │ │ ├── puffConfig.cmake.in │ │ ├── pufftest.c │ │ ├── test/ │ │ │ ├── CMakeLists.txt │ │ │ ├── add_subdirectory_exclude_test.cmake.in │ │ │ ├── add_subdirectory_test.cmake.in │ │ │ ├── find_package_no_components_test.cmake.in │ │ │ ├── find_package_test.cmake.in │ │ │ ├── find_package_wrong_components_test.cmake.in │ │ │ ├── tester-cov.cmake │ │ │ └── tester.cmake │ │ └── zeros.raw │ ├── testzlib/ │ │ ├── CMakeLists.txt │ │ ├── testzlib.c │ │ └── testzlib.txt │ ├── vstudio/ │ │ └── readme.txt │ └── zlib1-dll/ │ ├── CMakeLists.txt │ └── readme.txt ├── crc32.c ├── crc32.h ├── deflate.c ├── deflate.h ├── doc/ │ ├── algorithm.txt │ ├── rfc1950.txt │ ├── rfc1951.txt │ ├── rfc1952.txt │ └── txtvsbin.txt ├── examples/ │ ├── README.examples │ ├── enough.c │ ├── fitblk.c │ ├── gun.c │ ├── gzappend.c │ ├── gzjoin.c │ ├── gzlog.c │ ├── gzlog.h │ ├── gznorm.c │ ├── zlib_how.html │ ├── zpipe.c │ ├── zran.c │ └── zran.h ├── gzclose.c ├── gzguts.h ├── gzlib.c ├── gzread.c ├── gzwrite.c ├── infback.c ├── inffast.c ├── inffast.h ├── inffixed.h ├── inflate.c ├── inflate.h ├── inftrees.c ├── inftrees.h ├── make_vms.com ├── msdos/ │ ├── Makefile.bor │ ├── Makefile.dj2 │ ├── Makefile.emx │ ├── Makefile.msc │ └── Makefile.tc ├── os400/ │ ├── README400 │ ├── bndsrc │ ├── make.sh │ ├── zlibfixed.rpgle │ └── zlibfree.rpgle ├── qnx/ │ └── package.qpg ├── test/ │ ├── CMakeLists.txt │ ├── add_subdirectory_exclude_test.cmake.in │ ├── add_subdirectory_test.cmake.in │ ├── example.c │ ├── find_package_no_components_test.cmake.in │ ├── find_package_test.cmake.in │ ├── find_package_wrong_components_test.cmake.in │ ├── infcover.c │ └── minigzip.c ├── treebuild.xml ├── trees.c ├── trees.h ├── uncompr.c ├── watcom/ │ ├── watcom_f.mak │ └── watcom_l.mak ├── win32/ │ ├── DLL_FAQ.txt │ ├── Makefile.bor │ ├── Makefile.gcc │ ├── Makefile.msc │ ├── README-WIN32.txt │ ├── VisualC.txt │ ├── zlib.def │ └── zlib1.rc ├── zconf.h.in ├── zlib.3 ├── zlib.h ├── zlib.pc.cmakein ├── zlib.pc.in ├── zlibConfig.cmake.in ├── zutil.c └── zutil.h
SYMBOL INDEX (797 symbols across 75 files)
FILE: adler32.c
function uLong (line 61) | uLong ZEXPORT adler32_z(uLong adler, const Bytef *buf, z_size_t len) {
function uLong (line 128) | uLong ZEXPORT adler32(uLong adler, const Bytef *buf, uInt len) {
function local (line 133) | local uLong adler32_combine_(uLong adler1, uLong adler2, z_off64_t len2) {
function uLong (line 158) | uLong ZEXPORT adler32_combine(uLong adler1, uLong adler2, z_off_t len2) {
function uLong (line 162) | uLong ZEXPORT adler32_combine64(uLong adler1, uLong adler2, z_off64_t le...
FILE: compress.c
function compress2_z (line 24) | int ZEXPORT compress2_z(Bytef *dest, z_size_t *destLen, const Bytef *sou...
function compress2 (line 67) | int ZEXPORT compress2(Bytef *dest, uLongf *destLen, const Bytef *source,
function compress_z (line 77) | int ZEXPORT compress_z(Bytef *dest, z_size_t *destLen, const Bytef *source,
function compress (line 82) | int ZEXPORT compress(Bytef *dest, uLongf *destLen, const Bytef *source,
function z_size_t (line 91) | z_size_t ZEXPORT compressBound_z(z_size_t sourceLen) {
function uLong (line 96) | uLong ZEXPORT compressBound(uLong sourceLen) {
FILE: contrib/blast/blast-test.c
function inf (line 9) | local unsigned inf(void *how, unsigned char **buf)
function local (line 17) | local int outf(void *how, unsigned char *buf, unsigned len)
function main (line 23) | int main(void)
FILE: contrib/blast/blast.c
type state (line 40) | struct state {
function local (line 71) | local int bits(struct state *s, int need)
type huffman (line 102) | struct huffman {
function local (line 128) | local int decode(struct state *s, struct huffman *h)
function local (line 190) | local int construct(struct huffman *h, const unsigned char *rep, int n)
function local (line 281) | local int decomp(struct state *s)
function blast (line 382) | int blast(blast_in infun, void *inhow, blast_out outfun, void *outhow,
FILE: contrib/crc32vx/crc32_vx.c
type uv16qi (line 34) | typedef unsigned char uv16qi __attribute__((vector_size(16)));
type uv4si (line 35) | typedef unsigned int uv4si __attribute__((vector_size(16)));
type uv2di (line 36) | typedef unsigned long long uv2di __attribute__((vector_size(16)));
function local (line 38) | local uint32_t crc32_le_vgfm_16(uint32_t crc, const unsigned char *buf, ...
function s390_crc32_vx (line 212) | local unsigned long s390_crc32_vx(unsigned long crc, const unsigned char...
function local (line 239) | local void s390_crc32_setup() {
function s390_crc32_init (line 248) | local unsigned long s390_crc32_init(unsigned long crc, const unsigned ch...
FILE: contrib/dotzlib/DotZLib/ChecksumImpl.cs
class ChecksumGeneratorBase (line 20) | public abstract class ChecksumGeneratorBase : ChecksumGenerator
method ChecksumGeneratorBase (line 31) | public ChecksumGeneratorBase()
method ChecksumGeneratorBase (line 40) | public ChecksumGeneratorBase(uint initialValue)
method Reset (line 48) | public void Reset() { _current = 0; }
method Update (line 66) | public abstract void Update(byte[] data, int offset, int count);
method Update (line 72) | public void Update(byte[] data)
method Update (line 82) | public void Update(string data)
method Update (line 92) | public void Update(string data, Encoding encoding)
class CRC32Checksum (line 104) | public sealed class CRC32Checksum : ChecksumGeneratorBase
method crc32 (line 108) | [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
method CRC32Checksum (line 116) | public CRC32Checksum() : base() {}
method CRC32Checksum (line 122) | public CRC32Checksum(uint initialValue) : base(initialValue) {}
method Update (line 133) | public override void Update(byte[] data, int offset, int count)
class AdlerChecksum (line 155) | public sealed class AdlerChecksum : ChecksumGeneratorBase
method adler32 (line 159) | [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
method AdlerChecksum (line 167) | public AdlerChecksum() : base() {}
method AdlerChecksum (line 173) | public AdlerChecksum(uint initialValue) : base(initialValue) {}
method Update (line 184) | public override void Update(byte[] data, int offset, int count)
FILE: contrib/dotzlib/DotZLib/CircularBuffer.cs
class CircularBuffer (line 17) | internal class CircularBuffer
method CircularBuffer (line 27) | public CircularBuffer(int capacity)
method Put (line 39) | public int Put(byte[] source, int offset, int count)
method Put (line 51) | public bool Put(byte b)
method Get (line 61) | public int Get(byte[] destination, int offset, int count)
method Get (line 72) | public int Get()
FILE: contrib/dotzlib/DotZLib/CodecBase.cs
class CodecBase (line 16) | public abstract class CodecBase : Codec, IDisposable
method CodecBase (line 50) | public CodecBase()
method OnDataAvailable (line 75) | protected void OnDataAvailable()
method Add (line 90) | public void Add(byte[] data)
method Add (line 103) | public abstract void Add(byte[] data, int offset, int count);
method Finish (line 109) | public abstract void Finish();
method Dispose (line 131) | public void Dispose()
method CleanUp (line 140) | protected abstract void CleanUp();
method CleanUp (line 143) | private void CleanUp(bool isDisposing)
method copyInput (line 168) | protected void copyInput(byte[] data, int startIndex, int count)
method resetOutput (line 180) | protected void resetOutput()
method setChecksum (line 191) | protected void setChecksum(uint newSum)
FILE: contrib/dotzlib/DotZLib/Deflater.cs
class Deflater (line 18) | public sealed class Deflater : CodecBase
method deflateInit_ (line 21) | [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl, Cha...
method deflate (line 24) | [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
method deflateReset (line 27) | [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
method deflateEnd (line 30) | [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
method Deflater (line 38) | public Deflater(CompressLevel level) : base()
method Add (line 54) | public override void Add(byte[] data, int offset, int count)
method Finish (line 86) | public override void Finish()
method CleanUp (line 103) | protected override void CleanUp() { deflateEnd(ref _ztream); }
FILE: contrib/dotzlib/DotZLib/DotZLib.cs
type FlushTypes (line 22) | internal enum FlushTypes
type ZStream (line 29) | [StructLayoutAttribute(LayoutKind.Sequential, Pack=4, Size=0, CharSet=Ch...
type CompressLevel (line 61) | public enum CompressLevel : int
class ZLibException (line 86) | public class ZLibException : ApplicationException
method ZLibException (line 94) | public ZLibException(int errorCode, string msg) : base(String.Format("...
method ZLibException (line 103) | public ZLibException(int errorCode) : base(String.Format("ZLib error {...
type ChecksumGenerator (line 114) | public interface ChecksumGenerator
method Reset (line 124) | void Reset();
method Update (line 130) | void Update(byte[] data);
method Update (line 141) | void Update(byte[] data, int offset, int count);
method Update (line 148) | void Update(string data);
method Update (line 155) | void Update(string data, Encoding encoding);
type Codec (line 174) | public interface Codec
method Add (line 186) | void Add(byte[] data);
method Add (line 195) | void Add(byte[] data, int offset, int count);
method Finish (line 200) | void Finish();
class Info (line 216) | public class Info
method zlibCompileFlags (line 219) | [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
method zlibVersion (line 222) | [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
method bitSize (line 230) | private static int bitSize(uint bits)
method Info (line 245) | public Info()
FILE: contrib/dotzlib/DotZLib/GZipStream.cs
class GZipStream (line 17) | public class GZipStream : Stream, IDisposable
method gzopen (line 20) | [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl, Cha...
method gzclose (line 23) | [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
method gzwrite (line 26) | [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
method gzread (line 29) | [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
method gzgetc (line 32) | [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
method gzputc (line 35) | [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
method GZipStream (line 53) | public GZipStream(string fileName, CompressLevel level)
method GZipStream (line 66) | public GZipStream(string fileName)
method Dispose (line 125) | public void Dispose()
method cleanUp (line 131) | private void cleanUp(bool isDisposing)
method Read (line 154) | public override int Read(byte[] buffer, int offset, int count)
method ReadByte (line 181) | public override int ReadByte()
method Write (line 199) | public override void Write(byte[] buffer, int offset, int count)
method WriteByte (line 226) | public override void WriteByte(byte value)
method SetLength (line 243) | public override void SetLength(long value)
method Seek (line 255) | public override long Seek(long offset, SeekOrigin origin)
method Flush (line 265) | public override void Flush()
FILE: contrib/dotzlib/DotZLib/Inflater.cs
class Inflater (line 18) | public class Inflater : CodecBase
method inflateInit_ (line 21) | [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl, Cha...
method inflate (line 24) | [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
method inflateReset (line 27) | [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
method inflateEnd (line 30) | [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
method Inflater (line 37) | public Inflater() : base()
method Add (line 54) | public override void Add(byte[] data, int offset, int count)
method Finish (line 84) | public override void Finish()
method CleanUp (line 101) | protected override void CleanUp() { inflateEnd(ref _ztream); }
FILE: contrib/dotzlib/DotZLib/UnitTests.cs
class Utils (line 28) | internal class Utils
method byteArrEqual (line 30) | public static bool byteArrEqual( byte[] lhs, byte[] rhs )
class CircBufferTests (line 43) | [TestFixture]
method SinglePutGet (line 47) | [Test]
method BlockPutGet (line 61) | [Test]
class ChecksumTests (line 80) | [TestFixture]
method CRC32_Null (line 84) | [Test]
method CRC32_Data (line 97) | [Test]
method Adler_Null (line 118) | [Test]
method Adler_Data (line 131) | [Test]
class InfoTests (line 151) | [TestFixture]
method Info_Version (line 155) | [Test]
class DeflateInflateTests (line 168) | [TestFixture]
method Deflate_Init (line 172) | [Test]
method CDataAvail (line 186) | public void CDataAvail(byte[] data, int startIndex, int count)
method Deflate_Compress (line 192) | [Test]
method Inflate_Init (line 212) | [Test]
method DDataAvail (line 220) | private void DDataAvail(byte[] data, int startIndex, int count)
method Inflate_Expand (line 226) | [Test]
class GZipStreamTests (line 243) | [TestFixture]
method GZipStream_WriteRead (line 247) | [Test]
FILE: contrib/infback9/infback9.c
function inflateBack9Init_ (line 19) | int ZEXPORT inflateBack9Init_(z_stream FAR *strm, unsigned char FAR *win...
function makefixed9 (line 50) | void makefixed9(void) {
function inflateBack9 (line 212) | int ZEXPORT inflateBack9(z_stream FAR *strm, in_func in, void FAR *in_desc,
function inflateBack9End (line 596) | int ZEXPORT inflateBack9End(z_stream FAR *strm) {
FILE: contrib/infback9/inflate9.h
type inflate_mode (line 12) | typedef enum {
type inflate_state (line 35) | struct inflate_state {
FILE: contrib/infback9/inftree9.c
function inflate_table9 (line 32) | int inflate_table9(codetype type, unsigned short FAR *lens, unsigned codes,
FILE: contrib/infback9/inftree9.h
type code (line 24) | typedef struct {
type codetype (line 53) | typedef enum {
FILE: contrib/iostream/test.cpp
function main (line 4) | int main() {
FILE: contrib/iostream/zfstream.cpp
function gzfilebuf (line 18) | gzfilebuf *gzfilebuf::open( const char *name,
function gzfilebuf (line 60) | gzfilebuf *gzfilebuf::attach( int file_descriptor,
function gzfilebuf (line 102) | gzfilebuf *gzfilebuf::close() {
function streampos (line 129) | streampos gzfilebuf::seekoff( streamoff off, ios::seek_dir dir, int whic...
function gzfilebuf (line 286) | gzfilebuf *gzfilestream_common::rdbuf()
FILE: contrib/iostream/zfstream.h
function class (line 8) | class gzfilebuf : public streambuf {
function class (line 44) | class gzfilestream_common : virtual public ios {
function gzomanip (line 118) | inline gzomanip<int> setcompressionlevel(int l)
function gzomanip (line 123) | inline gzomanip<int> setcompressionstrategy(int l)
FILE: contrib/iostream2/zstream.h
function class (line 39) | class zstringlen {
function class (line 50) | class izstream
function m_fp (line 55) | izstream(const char* name) : m_fp(0) { open(name); }
function open (line 64) | void open(const char* name) {
function open (line 69) | void open(FILE* fp) {
function close (line 79) | int close() {
function read (line 86) | int read(void* buf, size_t len) {
function gzFile (line 100) | gzFile fp() { return m_fp; }
function zstringlen (line 128) | inline zstringlen::zstringlen(izstream& zs) {
function class (line 154) | class ozstream
function open (line 176) | void open(const char* name, int level = Z_DEFAULT_COMPRESSION) {
function open (line 185) | void open(FILE* fp, int level = Z_DEFAULT_COMPRESSION) {
function close (line 197) | int close() {
function write (line 207) | int write(const void* buf, size_t len) {
function flush (line 218) | int flush(int _flush) {
function gzFile (line 233) | gzFile fp() { return m_fp; }
function os_flush (line 240) | void os_flush() {
function zstringlen (line 276) | inline zstringlen::zstringlen(ozstream& zs, const char* x) {
FILE: contrib/iostream2/zstream_test.cpp
function main (line 6) | void main() {
FILE: contrib/iostream3/test.cc
function main (line 11) | int main() {
FILE: contrib/iostream3/zfstream.cc
function gzfilebuf (line 50) | gzfilebuf*
function gzfilebuf (line 78) | gzfilebuf*
function gzfilebuf (line 106) | gzfilebuf*
FILE: contrib/iostream3/zfstream.h
function class (line 27) | class gzfilebuf : public std::streambuf
function class (line 234) | class gzifstream : public std::istream
function class (line 323) | class gzofstream : public std::ostream
function gzomanip2 (line 462) | inline gzomanip2<int,int>
FILE: contrib/minizip/crypt.h
function decrypt_byte (line 32) | static int decrypt_byte(unsigned long* pkeys, const z_crc_t* pcrc_32_tab) {
function update_keys (line 45) | static int update_keys(unsigned long* pkeys, const z_crc_t* pcrc_32_tab,...
function init_keys (line 61) | static void init_keys(const char* passwd, unsigned long* pkeys, const z_...
function crypthead (line 85) | static unsigned crypthead(const char* passwd, /* password string */
FILE: contrib/minizip/ints.h
type i8_t (line 12) | typedef signed char i8_t;
type ui8_t (line 13) | typedef unsigned char ui8_t;
type i16_t (line 18) | typedef short i16_t;
type ui16_t (line 19) | typedef unsigned short ui16_t;
type i16_t (line 21) | typedef int i16_t;
type ui16_t (line 22) | typedef unsigned ui16_t;
type i32_t (line 27) | typedef int i32_t;
type ui32_t (line 28) | typedef unsigned ui32_t;
type i32_t (line 32) | typedef long i32_t;
type ui32_t (line 33) | typedef unsigned long ui32_t;
type i64_t (line 40) | typedef long i64_t;
type ui64_t (line 41) | typedef unsigned long ui64_t;
type i64_t (line 45) | typedef long long i64_t;
type ui64_t (line 46) | typedef unsigned long long ui64_t;
type i64_t (line 50) | typedef long long i64_t;
type ui64_t (line 51) | typedef unsigned long long ui64_t;
FILE: contrib/minizip/ioapi.c
function voidpf (line 31) | voidpf call_zopen64 (const zlib_filefunc64_32_def* pfilefunc, const void...
function call_zseek64 (line 40) | long call_zseek64 (const zlib_filefunc64_32_def* pfilefunc,voidpf filest...
function ZPOS64_T (line 53) | ZPOS64_T call_ztell64 (const zlib_filefunc64_32_def* pfilefunc, voidpf f...
function fill_zlib_filefunc64_32_def_from_filefunc32 (line 66) | void fill_zlib_filefunc64_32_def_from_filefunc32(zlib_filefunc64_32_def*...
function voidpf (line 82) | static voidpf ZCALLBACK fopen_file_func(voidpf opaque, const char* filen...
function voidpf (line 100) | static voidpf ZCALLBACK fopen64_file_func(voidpf opaque, const void* fil...
function uLong (line 119) | static uLong ZCALLBACK fread_file_func(voidpf opaque, voidpf stream, voi...
function uLong (line 126) | static uLong ZCALLBACK fwrite_file_func(voidpf opaque, voidpf stream, co...
function ftell_file_func (line 133) | static long ZCALLBACK ftell_file_func(voidpf opaque, voidpf stream) {
function ZPOS64_T (line 141) | static ZPOS64_T ZCALLBACK ftell64_file_func(voidpf opaque, voidpf stream) {
function fseek_file_func (line 148) | static long ZCALLBACK fseek_file_func(voidpf opaque, voidpf stream, uLon...
function fseek64_file_func (line 171) | static long ZCALLBACK fseek64_file_func(voidpf opaque, voidpf stream, ZP...
function fclose_file_func (line 197) | static int ZCALLBACK fclose_file_func(voidpf opaque, voidpf stream) {
function ferror_file_func (line 204) | static int ZCALLBACK ferror_file_func(voidpf opaque, voidpf stream) {
function fill_fopen_filefunc (line 211) | void fill_fopen_filefunc(zlib_filefunc_def* pzlib_filefunc_def) {
function fill_fopen64_filefunc (line 222) | void fill_fopen64_filefunc(zlib_filefunc64_def* pzlib_filefunc_def) {
FILE: contrib/minizip/ioapi.h
type ui64_t (line 75) | typedef ui64_t ZPOS64_T;
type uLong (line 112) | typedef uLong (ZCALLBACK *write_file_func) (voidpf opaque, voidpf...
type zlib_filefunc_def (line 121) | typedef struct zlib_filefunc_def_s
type zlib_filefunc64_def (line 137) | typedef struct zlib_filefunc64_def_s
type zlib_filefunc64_32_def (line 153) | typedef struct zlib_filefunc64_32_def_s
FILE: contrib/minizip/iowin32.c
type WIN32FILE_IOWIN (line 40) | typedef struct
function win32_translate_open_mode (line 47) | static void win32_translate_open_mode(int mode,
function voidpf (line 72) | static voidpf win32_build_iowin(HANDLE hFile) {
function voidpf (line 90) | voidpf ZCALLBACK win32_open64_file_func(voidpf opaque, const void* filen...
function voidpf (line 118) | voidpf ZCALLBACK win32_open64_file_funcA(voidpf opaque, const void* file...
function voidpf (line 141) | voidpf ZCALLBACK win32_open64_file_funcW(voidpf opaque, const void* file...
function voidpf (line 160) | voidpf ZCALLBACK win32_open_file_func(voidpf opaque, const char* filenam...
function uLong (line 188) | uLong ZCALLBACK win32_read_file_func(voidpf opaque, voidpf stream, void*...
function uLong (line 210) | uLong ZCALLBACK win32_write_file_func(voidpf opaque, voidpf stream, cons...
function BOOL (line 231) | static BOOL MySetFilePointerEx(HANDLE hFile, LARGE_INTEGER pos, LARGE_IN...
function win32_tell_file_func (line 250) | long ZCALLBACK win32_tell_file_func(voidpf opaque, voidpf stream) {
function ZPOS64_T (line 273) | ZPOS64_T ZCALLBACK win32_tell64_file_func(voidpf opaque, voidpf stream) {
function win32_seek_file_func (line 298) | long ZCALLBACK win32_seek_file_func(voidpf opaque, voidpf stream, uLong ...
function win32_seek64_file_func (line 336) | long ZCALLBACK win32_seek64_file_func(voidpf opaque, voidpf stream, ZPOS...
function win32_close_file_func (line 375) | int ZCALLBACK win32_close_file_func(voidpf opaque, voidpf stream) {
function win32_error_file_func (line 393) | int ZCALLBACK win32_error_file_func(voidpf opaque, voidpf stream) {
function fill_win32_filefunc (line 403) | void fill_win32_filefunc(zlib_filefunc_def* pzlib_filefunc_def) {
function fill_win32_filefunc64 (line 414) | void fill_win32_filefunc64(zlib_filefunc64_def* pzlib_filefunc_def) {
function fill_win32_filefunc64A (line 426) | void fill_win32_filefunc64A(zlib_filefunc64_def* pzlib_filefunc_def) {
function fill_win32_filefunc64W (line 438) | void fill_win32_filefunc64W(zlib_filefunc64_def* pzlib_filefunc_def) {
FILE: contrib/minizip/miniunz.c
function change_file_date (line 86) | static void change_file_date(const char *filename, uLong dosdate, tm_unz...
function mymkdir (line 127) | static int mymkdir(const char* dirname) {
function makedir (line 139) | static int makedir(const char *newdir) {
function do_banner (line 187) | static void do_banner(void) {
function do_help (line 192) | static void do_help(void) {
function Display64BitsSize (line 203) | static void Display64BitsSize(ZPOS64_T n, int size_char) {
function do_list (line 230) | static int do_list(unzFile uf) {
function do_extract_currentfile (line 306) | static int do_extract_currentfile(unzFile uf, const int* popt_extract_wi...
function do_extract (line 477) | static int do_extract(unzFile uf, int opt_extract_without_path, int opt_...
function do_extract_onefile (line 511) | static int do_extract_onefile(unzFile uf, const char* filename, int opt_...
function main (line 524) | int main(int argc, char *argv[]) {
FILE: contrib/minizip/minizip.c
function filetime (line 79) | static int filetime(const char *f, tm_zip *tmzip, uLong *dt) {
function filetime (line 101) | static int filetime(const char *f, tm_zip *tmzip, uLong *dt) {
function filetime (line 142) | static int filetime(const char *f, tm_zip *tmzip, uLong *dt) {
function check_exist_file (line 153) | static int check_exist_file(const char* filename) {
function do_banner (line 164) | static void do_banner(void) {
function do_help (line 169) | static void do_help(void) {
function getFileCrc (line 181) | static int getFileCrc(const char* filenameinzip, void* buf, unsigned lon...
function isLargeFile (line 219) | static int isLargeFile(const char* filename) {
function main (line 240) | int main(int argc, char *argv[]) {
FILE: contrib/minizip/mztools.c
function unzRepair (line 33) | extern int ZEXPORT unzRepair(const char* file, const char* fileOut, cons...
FILE: contrib/minizip/skipset.h
type set_rand_t (line 77) | typedef struct {
function set_seed (line 83) | void set_seed(set_rand_t *gen, ui64_t seed, ui64_t seq) {
function set_uniq (line 88) | void set_uniq(set_rand_t *gen, const void *ptr) {
function ui32_t (line 93) | ui32_t set_rand(set_rand_t *gen) {
type set_node_t (line 103) | typedef struct set_node_s set_node_t;
type set_node_s (line 104) | struct set_node_s {
type set_t (line 113) | typedef struct set_s {
function set_free (line 162) | void set_free(set_t *set, void *ptr) {
function set_free (line 177) | void set_free(set_t *set, void *ptr) {
function set_grow (line 187) | void set_grow(set_t *set, set_node_t *node, int want, int fill) {
function set_node_t (line 204) | set_node_t *set_node(set_t *set) {
function set_sweep (line 213) | void set_sweep(set_t *set) {
function set_start (line 230) | void set_start(set_t *set) {
function set_ok (line 247) | int set_ok(set_t *set) {
function set_clear (line 255) | void set_clear(set_t *set) {
function set_end (line 273) | void set_end(set_t *set) {
function set_found (line 300) | int set_found(set_t *set, set_key_t key) {
function set_insert (line 320) | int set_insert(set_t *set, set_key_t key) {
FILE: contrib/minizip/unzip.c
type unz_file_info64_internal (line 119) | typedef struct unz_file_info64_internal_s
type file_in_zip64_read_info_s (line 127) | typedef struct
type unz64_s (line 158) | typedef struct
function local (line 198) | local int unz64local_getShort(const zlib_filefunc64_32_def* pzlib_filefu...
function local (line 218) | local int unz64local_getLong(const zlib_filefunc64_32_def* pzlib_filefun...
function local (line 239) | local int unz64local_getLong64(const zlib_filefunc64_32_def* pzlib_filef...
function local (line 261) | local int strcmpcasenosensitive_internal(const char* fileName1, const ch...
function unzStringFileNameCompare (line 301) | extern int ZEXPORT unzStringFileNameCompare (const char* fileName1,
function local (line 325) | local ZPOS64_T unz64local_SearchCentralDir(const zlib_filefunc64_32_def*...
function local (line 385) | local ZPOS64_T unz64local_SearchCentralDir64(const zlib_filefunc64_32_de...
function local (line 490) | local unzFile unzOpenInternal(const void *path,
function unzFile (line 670) | extern unzFile ZEXPORT unzOpen2(const char *path,
function unzFile (line 682) | extern unzFile ZEXPORT unzOpen2_64(const void *path,
function unzFile (line 697) | extern unzFile ZEXPORT unzOpen(const char *path) {
function unzFile (line 701) | extern unzFile ZEXPORT unzOpen64(const void *path) {
function unzClose (line 710) | extern int ZEXPORT unzClose(unzFile file) {
function unzGetGlobalInfo64 (line 729) | extern int ZEXPORT unzGetGlobalInfo64(unzFile file, unz_global_info64* p...
function unzGetGlobalInfo (line 738) | extern int ZEXPORT unzGetGlobalInfo(unzFile file, unz_global_info* pglob...
function local (line 751) | local void unz64local_DosDateToTmuDate(ZPOS64_T ulDosDate, tm_unz* ptm) {
function local (line 766) | local int unz64local_GetCurrentFileInfoInternal(unzFile file,
function unzGetCurrentFileInfo64 (line 1008) | extern int ZEXPORT unzGetCurrentFileInfo64(unzFile file,
function unzGetCurrentFileInfo (line 1019) | extern int ZEXPORT unzGetCurrentFileInfo(unzFile file,
function unzGoToFirstFile (line 1060) | extern int ZEXPORT unzGoToFirstFile(unzFile file) {
function unzGoToNextFile (line 1080) | extern int ZEXPORT unzGoToNextFile(unzFile file) {
function unzLocateFile (line 1112) | extern int ZEXPORT unzLocateFile(unzFile file, const char *szFileName, i...
function unzGetFilePos64 (line 1187) | extern int ZEXPORT unzGetFilePos64(unzFile file, unz64_file_pos* file_po...
function unzGetFilePos (line 1202) | extern int ZEXPORT unzGetFilePos(unzFile file, unz_file_pos* file_pos) {
function unzGoToFilePos64 (line 1213) | extern int ZEXPORT unzGoToFilePos64(unzFile file, const unz64_file_pos* ...
function unzGoToFilePos (line 1234) | extern int ZEXPORT unzGoToFilePos(unzFile file, unz_file_pos* file_pos) {
function local (line 1256) | local int unz64local_CheckCurrentFileCoherencyHeader(unz64_s* s, uInt* p...
function unzOpenCurrentFile3 (line 1342) | extern int ZEXPORT unzOpenCurrentFile3(unzFile file, int* method,
function unzOpenCurrentFile (line 1512) | extern int ZEXPORT unzOpenCurrentFile(unzFile file) {
function unzOpenCurrentFilePassword (line 1516) | extern int ZEXPORT unzOpenCurrentFilePassword(unzFile file, const char* ...
function unzOpenCurrentFile2 (line 1520) | extern int ZEXPORT unzOpenCurrentFile2(unzFile file, int* method, int* l...
function ZPOS64_T (line 1526) | extern ZPOS64_T ZEXPORT unzGetCurrentFileZStreamPos64(unzFile file) {
function unzReadCurrentFile (line 1551) | extern int ZEXPORT unzReadCurrentFile(unzFile file, voidp buf, unsigned ...
function z_off_t (line 1758) | extern z_off_t ZEXPORT unztell(unzFile file) {
function ZPOS64_T (line 1772) | extern ZPOS64_T ZEXPORT unztell64(unzFile file) {
function unzeof (line 1791) | extern int ZEXPORT unzeof(unzFile file) {
function unzGetLocalExtrafield (line 1822) | extern int ZEXPORT unzGetLocalExtrafield(unzFile file, voidp buf, unsign...
function unzCloseCurrentFile (line 1869) | extern int ZEXPORT unzCloseCurrentFile(unzFile file) {
function unzGetGlobalComment (line 1915) | extern int ZEXPORT unzGetGlobalComment(unzFile file, char * szComment, u...
function ZPOS64_T (line 1942) | extern ZPOS64_T ZEXPORT unzGetOffset64(unzFile file) {
function uLong (line 1956) | extern uLong ZEXPORT unzGetOffset(unzFile file) {
function unzSetOffset64 (line 1965) | extern int ZEXPORT unzSetOffset64(unzFile file, ZPOS64_T pos) {
function unzSetOffset (line 1982) | extern int ZEXPORT unzSetOffset (unzFile file, uLong pos) {
FILE: contrib/minizip/unzip.h
type unzFile__ (line 66) | typedef struct TagunzFile__ { int unused; } unzFile__;
type unzFile__ (line 67) | typedef unzFile__ *unzFile;
type voidp (line 69) | typedef voidp unzFile;
type tm_unz (line 85) | typedef struct tm_unz_s
type unz_global_info64 (line 97) | typedef struct unz_global_info64_s
type unz_global_info (line 104) | typedef struct unz_global_info_s
type unz_file_info64 (line 112) | typedef struct unz_file_info64_s
type unz_file_info (line 133) | typedef struct unz_file_info_s
type unz_file_pos (line 259) | typedef struct unz_file_pos_s
type unz64_file_pos (line 273) | typedef struct unz64_file_pos_s
FILE: contrib/minizip/zip.c
type linkedlist_datablock_internal (line 114) | typedef struct linkedlist_datablock_internal_s
type linkedlist_data (line 123) | typedef struct linkedlist_data_s
type block_t (line 136) | typedef struct {
type curfile64_info (line 143) | typedef struct
type zip64_internal (line 178) | typedef struct
function local (line 206) | local linkedlist_datablock_internal* allocate_new_datablock(void) {
function local (line 219) | local void free_datablock(linkedlist_datablock_internal* ldi) {
function local (line 228) | local void init_linkedlist(linkedlist_data* ll) {
function local (line 232) | local void free_linkedlist(linkedlist_data* ll) {
function local (line 238) | local int add_data_in_datablock(linkedlist_data* ll, const void* buf, uL...
function local (line 301) | local void block_init(block_t *block, linkedlist_data *list) {
function local (line 310) | local void block_stop(block_t *block) {
function local (line 316) | local int block_end(block_t *block) {
function local (line 335) | local int block_get(block_t *block) {
function block_get2 (line 361) | local long block_get2(block_t *block) {
function local (line 368) | local size_t block_read(block_t *block, unsigned char *buf, size_t len) {
function local (line 393) | local int block_skip(block_t *block, size_t n) {
function local (line 410) | local char *block_central_name(block_t *block, set_t *set) {
function zipAlreadyThere (line 465) | extern int ZEXPORT zipAlreadyThere(zipFile file, char const *name) {
function local (line 521) | local int zip64local_putValue(const zlib_filefunc64_32_def* pzlib_filefu...
function local (line 543) | local void zip64local_putValue_inmemory (void* dest, ZPOS64_T x, int nbB...
function local (line 563) | local uLong zip64local_TmzDateToDosDate(const tm_zip* ptm) {
function local (line 577) | local int zip64local_getByte(const zlib_filefunc64_32_def* pzlib_filefun...
function local (line 598) | local int zip64local_getShort(const zlib_filefunc64_32_def* pzlib_filefu...
function local (line 617) | local int zip64local_getLong(const zlib_filefunc64_32_def* pzlib_filefun...
function local (line 645) | local int zip64local_getLong64(const zlib_filefunc64_32_def* pzlib_filef...
function local (line 696) | local ZPOS64_T zip64local_SearchCentralDir(const zlib_filefunc64_32_def*...
function local (line 755) | local ZPOS64_T zip64local_SearchCentralDir64(const zlib_filefunc64_32_de...
function local (line 852) | local int LoadCentralDirectoryRecord(zip64_internal* pziinit) {
function zipFile (line 1060) | extern zipFile ZEXPORT zipOpen3(const void *pathname, int append, zipcha...
function zipFile (line 1131) | extern zipFile ZEXPORT zipOpen2(const char *pathname, int append, zipcha...
function zipFile (line 1142) | extern zipFile ZEXPORT zipOpen2_64(const void *pathname, int append, zip...
function zipFile (line 1158) | extern zipFile ZEXPORT zipOpen(const char* pathname, int append) {
function zipFile (line 1162) | extern zipFile ZEXPORT zipOpen64(const void* pathname, int append) {
function local (line 1166) | local int Write_LocalFileHeader(zip64_internal* zi, const char* filename...
function local (line 1259) | local int utf8len(unsigned char const *str, size_t len) {
function local (line 1280) | local int isutf8(char const *str, size_t len) {
function zipOpenNewFileInZip4 (line 1524) | extern int ZEXPORT zipOpenNewFileInZip4(zipFile file, const char* filena...
function zipOpenNewFileInZip3 (line 1539) | extern int ZEXPORT zipOpenNewFileInZip3(zipFile file, const char* filena...
function zipOpenNewFileInZip3_64 (line 1553) | extern int ZEXPORT zipOpenNewFileInZip3_64(zipFile file, const char* fil...
function zipOpenNewFileInZip2 (line 1567) | extern int ZEXPORT zipOpenNewFileInZip2(zipFile file, const char* filena...
function zipOpenNewFileInZip2_64 (line 1579) | extern int ZEXPORT zipOpenNewFileInZip2_64(zipFile file, const char* fil...
function zipOpenNewFileInZip64 (line 1591) | extern int ZEXPORT zipOpenNewFileInZip64(zipFile file, const char* filen...
function zipOpenNewFileInZip (line 1603) | extern int ZEXPORT zipOpenNewFileInZip(zipFile file, const char* filenam...
function local (line 1615) | local int zip64FlushWriteBuffer(zip64_internal* zi) {
function zipWriteInFileInZip (line 1653) | extern int ZEXPORT zipWriteInFileInZip(zipFile file, const void* buf, un...
function zipCloseFileInZipRaw (line 1754) | extern int ZEXPORT zipCloseFileInZipRaw(zipFile file, uLong uncompressed...
function zipCloseFileInZipRaw64 (line 1758) | extern int ZEXPORT zipCloseFileInZipRaw64(zipFile file, ZPOS64_T uncompr...
function zipCloseFileInZip (line 1993) | extern int ZEXPORT zipCloseFileInZip(zipFile file) {
function local (line 1997) | local int Write_Zip64EndOfCentralDirectoryLocator(zip64_internal* zi, ZP...
function local (line 2018) | local int Write_Zip64EndOfCentralDirectoryRecord(zip64_internal* zi, uLo...
function local (line 2057) | local int Write_EndOfCentralDirectoryRecord(zip64_internal* zi, uLong si...
function local (line 2104) | local int Write_GlobalComment(zip64_internal* zi, const char* global_com...
function zipClose (line 2121) | extern int ZEXPORT zipClose(zipFile file, const char* global_comment) {
function zipRemoveExtraInfoBlock (line 2191) | extern int ZEXPORT zipRemoveExtraInfoBlock(char* pData, int* dataLen, sh...
FILE: contrib/minizip/zip.h
type zipFile__ (line 65) | typedef struct TagzipFile__ { int unused; } zipFile__;
type zipFile__ (line 66) | typedef zipFile__ *zipFile;
type voidp (line 68) | typedef voidp zipFile;
type tm_zip (line 90) | typedef struct tm_zip_s
type zip_fileinfo (line 100) | typedef struct
FILE: contrib/puff/bin-writer.c
function main (line 9) | int main(void) {
FILE: contrib/puff/puff.c
type state (line 98) | struct state {
function local (line 126) | local int bits(struct state *s, int need)
function local (line 164) | local int stored(struct state *s)
type huffman (line 206) | struct huffman {
function local (line 235) | local int decode(struct state *s, const struct huffman *h)
function local (line 263) | local int decode(struct state *s, const struct huffman *h)
function local (line 340) | local int construct(struct huffman *h, const short *length, int n)
function local (line 436) | local int codes(struct state *s,
function local (line 536) | local int fixed(struct state *s)
function local (line 665) | local int dynamic(struct state *s)
function puff (line 793) | int puff(unsigned char *dest, /* pointer to destination pointe...
FILE: contrib/puff/pufftest.c
function local (line 40) | local size_t bythirds(size_t size)
function local (line 63) | local void *load(const char *name, size_t *len)
function main (line 91) | int main(int argc, char **argv)
FILE: contrib/testzlib/testzlib.c
function MyDoMinus64 (line 8) | void MyDoMinus64(LARGE_INTEGER *R,LARGE_INTEGER A,LARGE_INTEGER B)
function BeginCountRdtsc (line 23) | void BeginCountRdtsc(LARGE_INTEGER * pbeginTime64)
function LARGE_INTEGER (line 29) | LARGE_INTEGER GetResRdtsc(LARGE_INTEGER beginTime64,BOOL fComputeTimeQue...
function BeginCountRdtsc (line 52) | void BeginCountRdtsc(LARGE_INTEGER * pbeginTime64)
function LARGE_INTEGER (line 57) | LARGE_INTEGER GetResRdtsc(LARGE_INTEGER beginTime64,BOOL fComputeTimeQue...
function myGetRDTSC32 (line 67) | void myGetRDTSC32(LARGE_INTEGER * pbeginTime64)
function BeginCountRdtsc (line 71) | void BeginCountRdtsc(LARGE_INTEGER * pbeginTime64)
function LARGE_INTEGER (line 75) | LARGE_INTEGER GetResRdtsc(LARGE_INTEGER beginTime64,BOOL fComputeTimeQue...
function BeginCountPerfCounter (line 84) | void BeginCountPerfCounter(LARGE_INTEGER * pbeginTime64,BOOL fComputeTim...
function DWORD (line 93) | DWORD GetMsecSincePerfCounter(LARGE_INTEGER beginTime64,BOOL fComputeTim...
function ReadFileMemory (line 119) | int ReadFileMemory(const char* filename,long* plFileSize,unsigned char**...
function main (line 145) | int main(int argc, char *argv[])
FILE: crc32.c
type Z_U8 (line 98) | typedef Z_U8 z_word_t;
type Z_U4 (line 102) | typedef Z_U4 z_word_t;
function local (line 121) | local z_word_t byte_swap(z_word_t word) {
function local (line 163) | local uLong multmodp(uLong a, uLong b) {
function local (line 184) | local uLong x2nmodp(z_off64_t n, unsigned k) {
function local (line 243) | local void make_crc_table(void) {
function local (line 410) | local void write_table(FILE *out, const z_crc_t FAR *table, int k) {
function local (line 423) | local void write_table32hi(FILE *out, const z_word_t FAR *table, int k) {
function local (line 439) | local void write_table64(FILE *out, const z_word_t FAR *table, int k) {
function main (line 449) | int main(void) {
function local (line 461) | local void braid(z_crc_t ltl[][256], z_word_t big[][256], int n, int w) {
function z_crc_t (line 482) | const z_crc_t FAR * ZEXPORT get_crc_table(void) {
function uLong (line 508) | uLong ZEXPORT crc32_z(uLong crc, const unsigned char FAR *buf, z_size_t ...
function local (line 608) | local z_crc_t crc_word(z_word_t data) {
function local (line 615) | local z_word_t crc_word_big(z_word_t data) {
function uLong (line 626) | uLong ZEXPORT crc32_z(uLong crc, const unsigned char FAR *buf, z_size_t ...
function uLong (line 946) | uLong ZEXPORT crc32(uLong crc, const unsigned char FAR *buf, uInt len) {
function uLong (line 954) | uLong ZEXPORT crc32_combine_gen64(z_off64_t len2) {
function uLong (line 964) | uLong ZEXPORT crc32_combine_gen(z_off_t len2) {
function uLong (line 969) | uLong ZEXPORT crc32_combine_op(uLong crc1, uLong crc2, uLong op) {
function uLong (line 976) | uLong ZEXPORT crc32_combine64(uLong crc1, uLong crc2, z_off64_t len2) {
function uLong (line 981) | uLong ZEXPORT crc32_combine(uLong crc1, uLong crc2, z_off_t len2) {
FILE: deflate.c
type block_state (line 63) | typedef enum {
type block_state (line 70) | typedef block_state (*compress_func)(deflate_state *s, int flush);
type config (line 98) | typedef struct config_s {
function local (line 187) | local void slide_hash(deflate_state *s) {
function read_buf (line 219) | local unsigned read_buf(z_streamp strm, Bytef *buf, unsigned size) {
function local (line 252) | local void fill_window(deflate_state *s) {
function deflateInit_ (line 379) | int ZEXPORT deflateInit_(z_streamp strm, int level, const char *version,
function deflateInit2_ (line 387) | int ZEXPORT deflateInit2_(z_streamp strm, int level, int method,
function local (line 538) | local int deflateStateCheck(z_streamp strm) {
function deflateSetDictionary (line 559) | int ZEXPORT deflateSetDictionary(z_streamp strm, const Bytef *dictionary,
function deflateGetDictionary (line 625) | int ZEXPORT deflateGetDictionary(z_streamp strm, Bytef *dictionary,
function local (line 682) | local void lm_init(deflate_state *s) {
function deflateReset (line 704) | int ZEXPORT deflateReset(z_streamp strm) {
function deflateSetHeader (line 714) | int ZEXPORT deflateSetHeader(z_streamp strm, gz_headerp head) {
function deflatePending (line 722) | int ZEXPORT deflatePending(z_streamp strm, unsigned *pending, int *bits) {
function deflateUsed (line 737) | int ZEXPORT deflateUsed(z_streamp strm, int *bits) {
function deflatePrime (line 745) | int ZEXPORT deflatePrime(z_streamp strm, int bits, int value) {
function deflateParams (line 774) | int ZEXPORT deflateParams(z_streamp strm, int level, int strategy) {
function deflateTune (line 819) | int ZEXPORT deflateTune(z_streamp strm, int good_length, int max_lazy,
function z_size_t (line 856) | z_size_t ZEXPORT deflateBound_z(z_streamp strm, z_size_t sourceLen) {
function uLong (line 929) | uLong ZEXPORT deflateBound(z_streamp strm, uLong sourceLen) {
function local (line 939) | local void putShortMSB(deflate_state *s, uInt b) {
function local (line 950) | local void flush_pending(z_streamp strm) {
function deflate (line 981) | int ZEXPORT deflate(z_streamp strm, int flush) {
function deflateEnd (line 1293) | int ZEXPORT deflateEnd(z_streamp strm) {
function deflateCopy (line 1317) | int ZEXPORT deflateCopy(z_streamp dest, z_streamp source) {
function local (line 1389) | local uInt longest_match(deflate_state *s, IPos cur_match) {
function local (line 1537) | local uInt longest_match(deflate_state *s, IPos cur_match) {
function local (line 1598) | local void check_match(deflate_state *s, IPos start, IPos match, int len...
function local (line 1668) | local block_state deflate_stored(deflate_state *s, int flush) {
function local (line 1857) | local block_state deflate_fast(deflate_state *s, int flush) {
function local (line 1956) | local block_state deflate_slow(deflate_state *s, int flush) {
function local (line 2084) | local block_state deflate_rle(deflate_state *s, int flush) {
function local (line 2155) | local block_state deflate_huff(deflate_state *s, int flush) {
FILE: deflate.h
type ct_data (line 72) | typedef struct ct_data_s {
type static_tree_desc (line 88) | typedef struct static_tree_desc_s static_tree_desc;
type tree_desc (line 90) | typedef struct tree_desc_s {
type ush (line 96) | typedef ush Pos;
type Pos (line 97) | typedef Pos FAR Posf;
type IPos (line 98) | typedef unsigned IPos;
type deflate_state (line 104) | typedef struct internal_state {
FILE: examples/enough.c
type big_t (line 115) | typedef unsigned long long big_t;
type big_t (line 117) | typedef big_t code_t;
type tab (line 118) | struct tab { // type for been-here check
type string_t (line 174) | typedef struct {
function local (line 181) | local void string_clear(string_t *s) {
function local (line 187) | local void string_init(string_t *s) {
function local (line 195) | local void string_free(string_t *s) {
function local (line 204) | local void string_printf(string_t *s, char *fmt, ...) {
type tab (line 233) | struct tab
function local (line 237) | local inline size_t map(int syms, int left, int len) {
function local (line 244) | local void cleanup(void) {
function local (line 261) | local big_t count(int syms, int left, int len) {
function local (line 308) | local int been_here(int syms, int left, int len, int mem, int rem) {
function local (line 361) | local void examine(int syms, int left, int len, int mem, int rem) {
function local (line 454) | local void enough(int syms) {
function main (line 498) | int main(int argc, char **argv) {
FILE: examples/fitblk.c
function local (line 62) | local void quit(char *why)
function local (line 73) | local int partcompress(FILE *in, z_streamp def)
function local (line 96) | local int recompress(z_streamp inf, z_streamp def)
function main (line 127) | int main(int argc, char **argv)
FILE: examples/gun.c
type ind (line 81) | struct ind {
function in (line 89) | local unsigned in(void *in_desc, z_const unsigned char **buf)
type outd (line 119) | struct outd {
function local (line 131) | local int out(void *out_desc, unsigned char *buf, unsigned len)
function local (line 200) | local int lunpipe(unsigned have, z_const unsigned char *next, struct ind...
function local (line 383) | local int gunpipe(z_stream *strm, int infile, int outfile)
function local (line 517) | local void copymeta(char *from, char *to)
function local (line 548) | local int gunzip(z_stream *strm, char *inname, char *outname, int test)
function main (line 631) | int main(int argc, char **argv)
FILE: examples/gzappend.c
function local (line 93) | local void bye(char *msg1, char *msg2)
function gcd (line 102) | local unsigned gcd(unsigned a, unsigned b)
function local (line 123) | local void rotate(unsigned char *list, unsigned len, unsigned rot)
type file (line 170) | typedef struct {
function local (line 180) | local int readin(file *in)
function local (line 192) | local int readmore(file *in)
function local (line 202) | local void skip(file *in, unsigned n)
function read4 (line 223) | unsigned long read4(file *in)
function local (line 235) | local void gzheader(file *in)
function local (line 259) | local int gzscan(char *name, z_stream *strm, int level)
function local (line 388) | local void gztack(char *name, int gd, z_stream *strm, int last)
function main (line 466) | int main(int argc, char **argv)
FILE: examples/gzjoin.c
function local (line 66) | local int bail(char *why1, char *why2)
type bin (line 78) | typedef struct {
function local (line 87) | local void bclose(bin *in)
function local (line 100) | local bin *bopen(char *name)
function local (line 121) | local int bload(bin *in)
function bget4 (line 145) | local unsigned long bget4(bin *in)
function local (line 157) | local void bskip(bin *in, unsigned skip)
function local (line 204) | local void gzhead(bin *in)
function local (line 245) | local void put4(unsigned long val, FILE *out)
function local (line 254) | local void zpull(z_streamp strm, bin *in)
function local (line 265) | local void gzinit(unsigned long *crc, unsigned long *tot, FILE *out)
function local (line 279) | local void gzcopy(char *name, int clr, unsigned long *crc, unsigned long...
function main (line 427) | int main(int argc, char **argv)
FILE: examples/gzlog.c
type uint (line 242) | typedef unsigned int uint;
type ulong (line 243) | typedef unsigned long ulong;
type log (line 289) | struct log {
function local (line 348) | local int log_lock(struct log *log)
function local (line 372) | local void log_touch(struct log *log)
function local (line 384) | local int log_check(struct log *log)
function local (line 396) | local void log_unlock(struct log *log)
function local (line 410) | local int log_head(struct log *log)
function local (line 437) | local int log_mark(struct log *log, int op)
function local (line 462) | local int log_last(struct log *log, int last)
function local (line 501) | local int log_append(struct log *log, unsigned char *data, size_t len)
function local (line 571) | local int log_replace(struct log *log)
function local (line 608) | local int log_compress(struct log *log, unsigned char *data, size_t len)
function local (line 718) | local void log_log(struct log *log, int op, char *record)
function local (line 738) | local int log_recover(struct log *log, int op)
function local (line 798) | local void log_close(struct log *log)
function local (line 815) | local int log_open(struct log *log)
function gzlog (line 867) | gzlog *gzlog_open(char *path)
function gzlog_compress (line 910) | int gzlog_compress(gzlog *logd)
function gzlog_write (line 997) | int gzlog_write(gzlog *logd, void *data, size_t len)
function gzlog_close (line 1044) | int gzlog_close(gzlog *logd)
FILE: examples/gzlog.h
type gzlog (line 52) | typedef void gzlog;
FILE: examples/gznorm.c
function local (line 40) | local char *aprintf(char *fmt, ...) {
function local (line 90) | local int gzip_normalize(FILE *in, FILE *out, char **err) {
function main (line 462) | int main(void) {
FILE: examples/zpipe.c
function def (line 37) | int def(FILE *source, FILE *dest, int level)
function inf (line 93) | int inf(FILE *source, FILE *dest)
function zerr (line 152) | void zerr(int ret)
function main (line 177) | int main(int argc, char **argv)
FILE: examples/zran.c
function deflate_index_free (line 74) | void deflate_index_free(struct deflate_index *index) {
type deflate_index (line 89) | struct deflate_index
type deflate_index (line 89) | struct deflate_index
function deflate_index_build (line 129) | int deflate_index_build(FILE *in, off_t span, struct deflate_index **bui...
function append_bits (line 259) | static inline void append_bits(unsigned value, int bits,
function inflatePreface (line 283) | static int inflatePreface(z_stream *strm, int bits, int value) {
function deflate_index_extract (line 337) | ptrdiff_t deflate_index_extract(FILE *in, struct deflate_index *index,
function main (line 479) | int main(int argc, char **argv) {
FILE: examples/zran.h
type point_t (line 10) | typedef struct point {
type deflate_index (line 19) | struct deflate_index {
type deflate_index (line 36) | struct deflate_index
type deflate_index (line 49) | struct deflate_index
type deflate_index (line 53) | struct deflate_index
FILE: gzclose.c
function gzclose (line 11) | int ZEXPORT gzclose(gzFile file) {
FILE: gzguts.h
type gz_state (line 170) | typedef struct {
type gz_state (line 204) | typedef gz_state FAR *gz_statep;
FILE: gzlib.c
function local (line 69) | local void gz_reset(gz_statep state) {
function else (line 250) | else if (fd == -2)
function gzFile (line 288) | gzFile ZEXPORT gzopen(const char *path, const char *mode) {
function gzFile (line 293) | gzFile ZEXPORT gzopen64(const char *path, const char *mode) {
function gzFile (line 298) | gzFile ZEXPORT gzdopen(int fd, const char *mode) {
function gzFile (line 316) | gzFile ZEXPORT gzopen_w(const wchar_t *path, const char *mode) {
function gzbuffer (line 322) | int ZEXPORT gzbuffer(gzFile file, unsigned size) {
function gzrewind (line 346) | int ZEXPORT gzrewind(gzFile file) {
function z_off64_t (line 367) | z_off64_t ZEXPORT gzseek64(gzFile file, z_off64_t offset, int whence) {
function z_off_t (line 438) | z_off_t ZEXPORT gzseek(gzFile file, z_off_t offset, int whence) {
function z_off64_t (line 446) | z_off64_t ZEXPORT gztell64(gzFile file) {
function z_off_t (line 461) | z_off_t ZEXPORT gztell(gzFile file) {
function z_off64_t (line 469) | z_off64_t ZEXPORT gzoffset64(gzFile file) {
function z_off_t (line 490) | z_off_t ZEXPORT gzoffset(gzFile file) {
function gzeof (line 498) | int ZEXPORT gzeof(gzFile file) {
function gzclearerr (line 531) | void ZEXPORT gzclearerr(gzFile file) {
function gz_error (line 555) | void ZLIB_INTERNAL gz_error(gz_statep state, int err, const char *msg) {
function gz_intmax (line 596) | unsigned ZLIB_INTERNAL gz_intmax(void) {
FILE: gzread.c
function local (line 18) | local int gz_load(gz_statep state, unsigned char *buf, unsigned len,
function local (line 56) | local int gz_avail(gz_statep state) {
function local (line 93) | local int gz_look(gz_statep state) {
function local (line 180) | local int gz_decomp(gz_statep state) {
function local (line 248) | local int gz_fetch(gz_statep state) {
function local (line 281) | local int gz_skip(gz_statep state) {
function local (line 317) | local z_size_t gz_read(gz_statep state, voidp buf, z_size_t len) {
function gzread (line 396) | int ZEXPORT gzread(gzFile file, voidp buf, unsigned len) {
function z_size_t (line 439) | z_size_t ZEXPORT gzfread(voidp buf, z_size_t size, z_size_t nitems,
function gzgetc (line 473) | int ZEXPORT gzgetc(gzFile file) {
function gzgetc_ (line 500) | int ZEXPORT gzgetc_(gzFile file) {
function gzungetc (line 505) | int ZEXPORT gzungetc(int c, gzFile file) {
function gzdirect (line 627) | int ZEXPORT gzdirect(gzFile file) {
function gzclose_r (line 645) | int ZEXPORT gzclose_r(gzFile file) {
FILE: gzwrite.c
function local (line 11) | local int gz_init(gz_statep state) {
function local (line 65) | local int gz_comp(gz_statep state, int flush) {
function local (line 154) | local int gz_zero(gz_statep state) {
function local (line 188) | local z_size_t gz_write(gz_statep state, voidpc buf, z_size_t len) {
function gzwrite (line 255) | int ZEXPORT gzwrite(gzFile file, voidpc buf, unsigned len) {
function z_size_t (line 280) | z_size_t ZEXPORT gzfwrite(voidpc buf, z_size_t size, z_size_t nitems,
function gzputc (line 307) | int ZEXPORT gzputc(gzFile file, int c) {
function gzputs (line 350) | int ZEXPORT gzputs(gzFile file, const char *s) {
function local (line 382) | local int gz_vacate(gz_statep state) {
function gzvprintf (line 403) | int ZEXPORTVA gzvprintf(gzFile file, const char *format, va_list va) {
function gzprintf (line 487) | int ZEXPORTVA gzprintf(gzFile file, const char *format, ...) {
function gzprintf (line 500) | int ZEXPORTVA gzprintf(gzFile file, const char *format, int a1, int a2, ...
function gzflush (line 603) | int ZEXPORT gzflush(gzFile file, int flush) {
function gzsetparams (line 630) | int ZEXPORT gzsetparams(gzFile file, int level, int strategy) {
function gzclose_w (line 667) | int ZEXPORT gzclose_w(gzFile file) {
FILE: infback.c
function inflateBackInit_ (line 25) | int ZEXPORT inflateBackInit_(z_streamp strm, int windowBits,
function inflateBack (line 191) | int ZEXPORT inflateBack(z_streamp strm, in_func in, void FAR *in_desc,
function inflateBackEnd (line 572) | int ZEXPORT inflateBackEnd(z_streamp strm) {
FILE: inffast.c
function inflate_fast (line 50) | void ZLIB_INTERNAL inflate_fast(z_streamp strm, unsigned start) {
FILE: inflate.c
function local (line 88) | local int inflateStateCheck(z_streamp strm) {
function inflateResetKeep (line 100) | int ZEXPORT inflateResetKeep(z_streamp strm) {
function inflateReset (line 125) | int ZEXPORT inflateReset(z_streamp strm) {
function inflateReset2 (line 136) | int ZEXPORT inflateReset2(z_streamp strm, int windowBits) {
function inflateInit2_ (line 173) | int ZEXPORT inflateInit2_(z_streamp strm, int windowBits,
function inflateInit_ (line 214) | int ZEXPORT inflateInit_(z_streamp strm, const char *version,
function inflatePrime (line 219) | int ZEXPORT inflatePrime(z_streamp strm, int bits, int value) {
function local (line 252) | local int updatewindow(z_streamp strm, const Bytef *end, unsigned copy) {
type inflate_state (line 475) | struct inflate_state
type inflate_state (line 498) | struct inflate_state
type inflate_state (line 1156) | struct inflate_state
type inflate_state (line 1159) | struct inflate_state
type inflate_state (line 1169) | struct inflate_state
type inflate_state (line 1173) | struct inflate_state
type inflate_state (line 1189) | struct inflate_state
type inflate_state (line 1195) | struct inflate_state
type inflate_state (line 1220) | struct inflate_state
type inflate_state (line 1224) | struct inflate_state
type inflate_state (line 1269) | struct inflate_state
type inflate_state (line 1273) | struct inflate_state
type inflate_state (line 1321) | struct inflate_state
type inflate_state (line 1324) | struct inflate_state
type inflate_state (line 1329) | struct inflate_state
type inflate_state (line 1330) | struct inflate_state
type inflate_state (line 1336) | struct inflate_state
type inflate_state (line 1339) | struct inflate_state
type inflate_state (line 1340) | struct inflate_state
type inflate_state (line 1342) | struct inflate_state
type inflate_state (line 1355) | struct inflate_state
type internal_state (line 1366) | struct internal_state
type inflate_state (line 1371) | struct inflate_state
type inflate_state (line 1374) | struct inflate_state
type inflate_state (line 1386) | struct inflate_state
type inflate_state (line 1389) | struct inflate_state
type inflate_state (line 1398) | struct inflate_state
type inflate_state (line 1402) | struct inflate_state
type inflate_state (line 1409) | struct inflate_state
type inflate_state (line 1411) | struct inflate_state
FILE: inflate.h
type inflate_mode (line 20) | typedef enum {
type inflate_state (line 82) | struct inflate_state {
FILE: inftrees.c
function inflate_table (line 46) | int ZLIB_INTERNAL inflate_table(codetype type, unsigned short FAR *lens,
function local (line 327) | local void buildtables(void) {
function inflate_fixed (line 364) | void inflate_fixed(struct inflate_state FAR *state) {
function main (line 386) | int main(void) {
FILE: inftrees.h
type code (line 24) | typedef struct {
type codetype (line 54) | typedef enum {
type inflate_state (line 63) | struct inflate_state
type inflate_state (line 64) | struct inflate_state
FILE: test/example.c
function myfree (line 50) | static void myfree(void *q, void *p) {
function test_compress (line 66) | static void test_compress(Byte *compr, uLong comprLen, Byte *uncompr,
function test_gzio (line 90) | static void test_gzio(const char *fname, Byte *uncompr, uLong uncomprLen) {
function test_deflate (line 172) | static void test_deflate(Byte *compr, uLong comprLen) {
function test_inflate (line 207) | static void test_inflate(Byte *compr, uLong comprLen, Byte *uncompr,
function test_large_deflate (line 246) | static void test_large_deflate(Byte *compr, uLong comprLen, Byte *uncompr,
function test_large_inflate (line 299) | static void test_large_inflate(Byte *compr, uLong comprLen, Byte *uncompr,
function test_flush (line 338) | static void test_flush(Byte *compr, uLong *comprLen) {
function test_sync (line 373) | static void test_sync(Byte *compr, uLong comprLen, Byte *uncompr,
function test_dict_deflate (line 414) | static void test_dict_deflate(Byte *compr, uLong comprLen) {
function test_dict_inflate (line 448) | static void test_dict_inflate(Byte *compr, uLong comprLen, Byte *uncompr,
function main (line 497) | int main(int argc, char *argv[]) {
FILE: test/infcover.c
type mem_item (line 56) | struct mem_item {
type mem_zone (line 63) | struct mem_zone {
function local (line 71) | local void *mem_alloc(void *mem, unsigned count, unsigned size)
function local (line 112) | local void mem_free(void *mem, void *ptr)
function local (line 158) | local void mem_setup(z_stream *strm)
function local (line 176) | local void mem_limit(z_stream *strm, size_t limit)
function local (line 184) | local void mem_used(z_stream *strm, char *prefix)
function local (line 192) | local void mem_high(z_stream *strm, char *prefix)
function local (line 200) | local void mem_done(z_stream *strm, char *prefix)
function local (line 284) | local void inf(char *hex, char *what, unsigned step, int win, unsigned len,
function local (line 350) | local void cover_support(void)
function local (line 388) | local void cover_wrap(void)
function pull (line 447) | local unsigned pull(void *desc, unsigned char z_const **buf)
function local (line 463) | local int push(void *desc, unsigned char *buf, unsigned len)
function local (line 471) | local void cover_back(void)
function local (line 508) | local int try(char *hex, char *id, int err)
function local (line 582) | local void cover_inflate(void)
function local (line 618) | local void cover_trees(void)
function local (line 642) | local void cover_fast(void)
function main (line 662) | int main(void)
FILE: test/minigzip.c
function pwinerror (line 128) | static void pwinerror (s)
function myfree (line 185) | static void myfree(void *q, void *p) {
type gzFile_s (line 190) | struct gzFile_s {
function gzFile (line 198) | static gzFile gz_open(const char *path, int fd, const char *mode) {
function gzFile (line 232) | static gzFile gzopen(const char *path, const char *mode) {
function gzFile (line 236) | static gzFile gzdopen(int fd, const char *mode) {
function gzwrite (line 240) | static int gzwrite(gzFile gz, const void *buf, unsigned len) {
function gzread (line 258) | static int gzread(gzFile gz, void *buf, unsigned len) {
function gzclose (line 289) | static int gzclose(gzFile gz) {
function error (line 326) | static void error(const char *msg) {
function gz_compress_mmap (line 336) | static int gz_compress_mmap(FILE *in, gzFile out) {
function gz_compress (line 369) | static void gz_compress(FILE *in, gzFile out) {
function gz_uncompress (line 397) | static void gz_uncompress(gzFile in, FILE *out) {
function file_compress (line 421) | static void file_compress(char *file, char *mode) {
function file_uncompress (line 454) | static void file_uncompress(char *file) {
function main (line 505) | int main(int argc, char *argv[]) {
FILE: trees.c
type static_tree_desc_s (line 117) | struct static_tree_desc_s {
function bi_reverse (line 154) | local unsigned bi_reverse(unsigned code, int len) {
function local (line 166) | local void bi_flush(deflate_state *s) {
function local (line 181) | local void bi_windup(deflate_state *s) {
function local (line 203) | local void gen_codes(ct_data *tree, int max_code, ushf *bl_count) {
function local (line 253) | local void send_bits(deflate_state *s, int value, int length) {
function local (line 295) | local void tr_static_init(void) {
function gen_trees_header (line 388) | void gen_trees_header(void) {
function local (line 440) | local void init_block(deflate_state *s) {
function _tr_init (line 456) | void ZLIB_INTERNAL _tr_init(deflate_state *s) {
function local (line 509) | local void pqdownheap(deflate_state *s, ct_data *tree, int k) {
function local (line 540) | local void gen_bitlen(deflate_state *s, tree_desc *desc) {
function local (line 627) | local void build_tree(deflate_state *s, tree_desc *desc) {
function local (line 712) | local void scan_tree(deflate_state *s, ct_data *tree, int max_code) {
function local (line 753) | local void send_tree(deflate_state *s, ct_data *tree, int max_code) {
function local (line 800) | local int build_bl_tree(deflate_state *s) {
function local (line 833) | local void send_all_trees(deflate_state *s, int lcodes, int dcodes,
function _tr_stored_block (line 860) | void ZLIB_INTERNAL _tr_stored_block(deflate_state *s, charf *buf,
function _tr_flush_bits (line 880) | void ZLIB_INTERNAL _tr_flush_bits(deflate_state *s) {
function _tr_align (line 888) | void ZLIB_INTERNAL _tr_align(deflate_state *s) {
function local (line 900) | local void compress_block(deflate_state *s, const ct_data *ltree,
function local (line 966) | local int detect_data_type(deflate_state *s) {
function _tr_tally (line 1095) | int ZLIB_INTERNAL _tr_tally(deflate_state *s, unsigned dist, unsigned lc) {
FILE: uncompr.c
function uncompress2_z (line 29) | int ZEXPORT uncompress2_z(Bytef *dest, z_size_t *destLen, const Bytef *s...
function uncompress2 (line 83) | int ZEXPORT uncompress2(Bytef *dest, uLongf *destLen, const Bytef *source,
function uncompress_z (line 92) | int ZEXPORT uncompress_z(Bytef *dest, z_size_t *destLen, const Bytef *so...
function uncompress (line 97) | int ZEXPORT uncompress(Bytef *dest, uLongf *destLen, const Bytef *source,
FILE: zlib.h
type voidpf (line 85) | typedef voidpf (*alloc_func)(voidpf opaque, uInt items, uInt size);
type internal_state (line 88) | struct internal_state
type z_stream (line 90) | typedef struct z_stream_s {
type z_stream (line 112) | typedef z_stream FAR *z_streamp;
type gz_header (line 118) | typedef struct gz_header_s {
type gz_header (line 135) | typedef gz_header FAR *gz_headerp;
type gzFile_s (line 1354) | struct gzFile_s
type gzFile_s (line 1956) | struct gzFile_s {
FILE: zutil.c
function uLong (line 31) | uLong ZEXPORT zlibCompileFlags(void) {
function z_error (line 130) | void ZLIB_INTERNAL z_error(char *m) {
function zmemcpy (line 153) | void ZLIB_INTERNAL zmemcpy(void FAR *dst, const void FAR *src, z_size_t ...
function zmemcmp (line 162) | int ZLIB_INTERNAL zmemcmp(const void FAR *s1, const void FAR *s2, z_size...
function zmemzero (line 172) | void ZLIB_INTERNAL zmemzero(void FAR *b, z_size_t len) {
type ptr_table (line 202) | typedef struct ptr_table_s {
function voidpf (line 215) | voidpf ZLIB_INTERNAL zcalloc(voidpf opaque, unsigned items, unsigned siz...
function zcfree (line 240) | void ZLIB_INTERNAL zcfree(voidpf opaque, voidpf ptr) {
function voidpf (line 276) | voidpf ZLIB_INTERNAL zcalloc(voidpf opaque, uInt items, uInt size) {
function zcfree (line 281) | void ZLIB_INTERNAL zcfree(voidpf opaque, voidpf ptr) {
function voidpf (line 299) | voidpf ZLIB_INTERNAL zcalloc(voidpf opaque, unsigned items, unsigned siz...
function zcfree (line 305) | void ZLIB_INTERNAL zcfree(voidpf opaque, voidpf ptr) {
FILE: zutil.h
type uch (line 43) | typedef unsigned char uch;
type uch (line 44) | typedef uch FAR uchf;
type ush (line 45) | typedef unsigned short ush;
type ush (line 46) | typedef ush FAR ushf;
type ulg (line 47) | typedef unsigned long ulg;
type z_once_t (line 271) | typedef struct {
function local (line 282) | local void z_once(z_once_t *state, void (*init)(void)) {
type z_once_t (line 298) | typedef struct z_once_s {
function local (line 306) | local int test_and_set(int volatile *flag) {
function local (line 315) | local void z_once(z_once_t *state, void (*init)(void)) {
Condensed preview — 257 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (2,800K chars).
[
{
"path": ".cmake-format.yaml",
"chars": 9269,
"preview": "_help_parse: Options affecting listfile parsing\nparse:\n _help_additional_commands:\n - Specify structure for custom cma"
},
{
"path": ".github/workflows/c-std.yml",
"chars": 6990,
"preview": "name: C Standard\n\n# Compile with as many C standards as possible.\n# The worflow is setup to fail on any compilation warn"
},
{
"path": ".github/workflows/cmake.yml",
"chars": 4424,
"preview": "name: CMake\non: [push, pull_request]\njobs:\n ci-cmake:\n name: ${{ matrix.name }}\n runs-on: ${{ matrix.os }}\n st"
},
{
"path": ".github/workflows/configure.yml",
"chars": 4754,
"preview": "name: Configure\non: [push, pull_request]\njobs:\n ci-configure:\n name: ${{ matrix.name }}\n runs-on: ${{ matrix.os }"
},
{
"path": ".github/workflows/contribs.yml",
"chars": 1879,
"preview": "name: contribs\non: [push, pull_request]\njobs:\n ci-cmake:\n name: ${{ matrix.name }}\n runs-on: ${{ matrix.os }}\n "
},
{
"path": ".github/workflows/fuzz.yml",
"chars": 601,
"preview": "name: OSS-Fuzz\non: [pull_request]\njobs:\n Fuzzing:\n runs-on: ubuntu-latest\n steps:\n - name: Build Fuzzers\n "
},
{
"path": ".github/workflows/msys-cygwin.yml",
"chars": 2322,
"preview": "name: mingw/cygwin\n\non: [push, pull_request]\n\njobs:\n MSys:\n runs-on: ${{ matrix.os || 'windows-latest' }}\n strate"
},
{
"path": ".github/workflows/others.yml",
"chars": 3995,
"preview": "name: anyVM-OSes\n\non: [push, pull_request]\n\njobs:\n\n dragonflybsd:\n runs-on: ubuntu-latest\n name: DragonflyBSD\n "
},
{
"path": ".gitignore",
"chars": 620,
"preview": "*.diff\n*.patch\n*.orig\n*.rej\n\n*~\n*.a\n*.lo\n*.o\n*.dylib\n\n*.gcda\n*.gcno\n*.gcov\n\n/zconf.h\n/Makefile\n/example\n/example64\n/exam"
},
{
"path": "BUILD.bazel",
"chars": 4302,
"preview": "# Copied from https://github.com/bazelbuild/bazel-central-registry/tree/main/modules/zlib/1.3.1.bcr.4/patches\n# Adapted "
},
{
"path": "CMakeLists.txt",
"chars": 9875,
"preview": "cmake_minimum_required(VERSION 3.12...3.31)\n\nproject(\n zlib\n LANGUAGES C\n VERSION 1.3.2.1\n HOMEPAGE_URL \"htt"
},
{
"path": "ChangeLog",
"chars": 86362,
"preview": "\n ChangeLog file for zlib\n\nChanges in 1.3.2.1 (xx Feb 2026)\n- \n\nChanges in 1.3.2 (17 Feb 2026)\n- Continue"
},
{
"path": "FAQ",
"chars": 16760,
"preview": "\n Frequently Asked Questions about zlib\n\n\nIf your question is not there, please check the zlib home page\n"
},
{
"path": "INDEX",
"chars": 1947,
"preview": "CMakeLists.txt cmake build file\nChangeLog history of changes\nFAQ Frequently Asked Questions about zli"
},
{
"path": "LICENSE",
"chars": 1002,
"preview": "Copyright notice:\n\n (C) 1995-2026 Jean-loup Gailly and Mark Adler\n\n This software is provided 'as-is', without any expr"
},
{
"path": "MODULE.bazel",
"chars": 234,
"preview": "module(\n name = \"zlib\",\n version = \"0.0.0\",\n compatibility_level = 1,\n)\n\nbazel_dep(name = \"platforms\", version "
},
{
"path": "Makefile.in",
"chars": 14695,
"preview": "# Makefile for zlib\n# Copyright (C) 1995-2026 Jean-loup Gailly, Mark Adler\n# For conditions of distribution and use, see"
},
{
"path": "README",
"chars": 5295,
"preview": "ZLIB DATA COMPRESSION LIBRARY\n\nzlib 1.3.2.1 is a general purpose data compression library. All the code is\nthread safe "
},
{
"path": "README-cmake.md",
"chars": 2831,
"preview": "# For building with cmake at least version 3.12 (minizip 3.12) is needed\n\nIn most cases the usual\n\n cmake -S . -B bui"
},
{
"path": "adler32.c",
"chars": 4964,
"preview": "/* adler32.c -- compute the Adler-32 checksum of a data stream\n * Copyright (C) 1995-2011, 2016 Mark Adler\n * For condit"
},
{
"path": "amiga/Makefile.pup",
"chars": 1981,
"preview": "# Amiga powerUP (TM) Makefile\n# makefile for libpng and SAS C V6.58/7.00 PPC compiler\n# Copyright (C) 1998 by Andreas R."
},
{
"path": "amiga/Makefile.sas",
"chars": 1847,
"preview": "# SMakefile for zlib\n# Modified from the standard UNIX Makefile Copyright Jean-loup Gailly\n# Osma Ahvenlampi <Osma.Ahven"
},
{
"path": "compress.c",
"chars": 3639,
"preview": "/* compress.c -- compress a memory buffer\n * Copyright (C) 1995-2026 Jean-loup Gailly, Mark Adler\n * For conditions of d"
},
{
"path": "configure",
"chars": 32907,
"preview": "#!/bin/sh\n# configure script for zlib.\n#\n# Normally configure builds both a static and a shared library.\n# If you want t"
},
{
"path": "contrib/CMakeLists.txt",
"chars": 2197,
"preview": "function(zlib_add_contrib_lib name description dir)\n option(ZLIB_BUILD_${name} \"Enable building of ${description}\" OF"
},
{
"path": "contrib/README.contrib",
"chars": 2180,
"preview": "All files under this contrib directory are UNSUPPORTED. They were\nprovided by users of zlib and were not tested by the a"
},
{
"path": "contrib/ada/CMakeLists.txt",
"chars": 6058,
"preview": "cmake_minimum_required(VERSION 3.12...3.31)\n\nset(CMAKE_MODULE_PATH \"${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules\")\n\nproject"
},
{
"path": "contrib/ada/buffer_demo.adb",
"chars": 3717,
"preview": "----------------------------------------------------------------\n-- ZLib for Ada thick binding. "
},
{
"path": "contrib/ada/cmake/Modules/CMakeADACompiler.cmake.in",
"chars": 1005,
"preview": "set(CMAKE_ADA_COMPILER \"@CMAKE_ADA_COMPILER@\")\nset(CMAKE_ADA_COMPILER_ARG1 \"@CMAKE_ADA_COMPILER_ARG1@\")\nset(CMAKE_ADA_CO"
},
{
"path": "contrib/ada/cmake/Modules/CMakeADAInformation.cmake",
"chars": 5203,
"preview": "include(CMakeLanguageInformation)\n\nset(CMAKE_ADA_OUTPUT_EXTENSION .o)\nset(CMAKE_ADA_OUTPUT_EXTENSION_REPLACE TRUE)\n\nif(C"
},
{
"path": "contrib/ada/cmake/Modules/CMakeDetermineADACompiler.cmake",
"chars": 1443,
"preview": "include(${CMAKE_ROOT}/Modules/CMakeDetermineCompiler.cmake)\n\n# Load system-specific compiler preferences for this langua"
},
{
"path": "contrib/ada/cmake/Modules/CMakeTestADACompiler.cmake",
"chars": 1767,
"preview": "include(CMakeTestCompilerCommon)\nunset(CMAKE_ADA_COMPILER_WORKS CACHE)\n\nif(NOT CMAKE_ADA_COMPILER_WORKS)\n PrintTestCo"
},
{
"path": "contrib/ada/cmake/binder_helper.cmake",
"chars": 1306,
"preview": "#CMAKE_ARGV0 = /path/to/cmake\n#CMAKE_ARGV1 = -P\n#CMAKE_ARGV2 = path/to/this/file\n#CMAKE_ARGV3 = binder\n#CMAKE_ARGV4 = al"
},
{
"path": "contrib/ada/cmake/compile_helper.cmake",
"chars": 851,
"preview": "#CMAKE_ARGV0 = /path/to/cmake\n#CMAKE_ARGV1 = -P\n#CMAKE_ARGV2 = path/to/this/file\n#CMAKE_ARGV3 = compiler\n#CMAKE_ARGV4 = "
},
{
"path": "contrib/ada/cmake/exe_link_helper.cmake",
"chars": 1531,
"preview": "#CMAKE_ARGV0 = /path/to/cmake\n#CMAKE_ARGV1 = -P\n#CMAKE_ARGV2 = path/to/this/file\n#CMAKE_ARGV3 = linker\n#CMAKE_ARGV4 = ou"
},
{
"path": "contrib/ada/cmake/shared_link_helper.cmake",
"chars": 1487,
"preview": "#CMAKE_ARGV0 = /path/to/cmake\n#CMAKE_ARGV1 = -P\n#CMAKE_ARGV2 = path/to/this/file\n#CMAKE_ARGV3 = linker\n#CMAKE_ARGV4 = ou"
},
{
"path": "contrib/ada/cmake/static_link_helper.cmake",
"chars": 719,
"preview": "#CMAKE_ARGV0 = /path/to/cmake\n#CMAKE_ARGV1 = -P\n#CMAKE_ARGV2 = path/to/this/file\n#CMAKE_ARGV3 = path/to/ar\n#CMAKE_ARGV4 "
},
{
"path": "contrib/ada/mtest.adb",
"chars": 4467,
"preview": "----------------------------------------------------------------\n-- ZLib for Ada thick binding. "
},
{
"path": "contrib/ada/read.adb",
"chars": 4248,
"preview": "----------------------------------------------------------------\n-- ZLib for Ada thick binding. "
},
{
"path": "contrib/ada/readme.txt",
"chars": 2170,
"preview": " ZLib for Ada thick binding (ZLib.Ada)\n Release 1.3\n\nZLib.Ada is a thick b"
},
{
"path": "contrib/ada/test.adb",
"chars": 13178,
"preview": "----------------------------------------------------------------\n-- ZLib for Ada thick binding. "
},
{
"path": "contrib/ada/zlib-streams.adb",
"chars": 5996,
"preview": "----------------------------------------------------------------\n-- ZLib for Ada thick binding. "
},
{
"path": "contrib/ada/zlib-streams.ads",
"chars": 4330,
"preview": "----------------------------------------------------------------\n-- ZLib for Ada thick binding. "
},
{
"path": "contrib/ada/zlib-thin.adb",
"chars": 3347,
"preview": "----------------------------------------------------------------\n-- ZLib for Ada thick binding. "
},
{
"path": "contrib/ada/zlib-thin.ads",
"chars": 15819,
"preview": "----------------------------------------------------------------\n-- ZLib for Ada thick binding. "
},
{
"path": "contrib/ada/zlib.adb",
"chars": 20401,
"preview": "----------------------------------------------------------------\n-- ZLib for Ada thick binding. "
},
{
"path": "contrib/ada/zlib.ads",
"chars": 13595,
"preview": "------------------------------------------------------------------------------\n-- ZLib for Ada thic"
},
{
"path": "contrib/ada/zlib.gpr",
"chars": 511,
"preview": "project Zlib is\n\n for Languages use (\"Ada\");\n for Source_Dirs use (\".\");\n for Object_Dir use \".\";\n for Main use "
},
{
"path": "contrib/blast/CMakeLists.txt",
"chars": 5320,
"preview": "cmake_minimum_required(VERSION 3.12...3.31)\n\nproject(\n blast\n VERSION 1.3.0\n LANGUAGES C\n DESCRIPTION \"A lib"
},
{
"path": "contrib/blast/Makefile",
"chars": 308,
"preview": "all: test\n\nlibblast.so: blast.c blast.h\n\tcc -o libblast.so -shared blast.c\n\nblast-test: libblast.so\n\tcc -o blast-test.o "
},
{
"path": "contrib/blast/README",
"chars": 74,
"preview": "Read blast.h for purpose and usage.\n\nMark Adler\nmadler@alumni.caltech.edu\n"
},
{
"path": "contrib/blast/blast-test.c",
"chars": 954,
"preview": "#include \"blast.h\" /* prototype for blast() */\n\n/* Example of how to use blast() */\n#include <stdio.h>\n#inc"
},
{
"path": "contrib/blast/blast.c",
"chars": 17180,
"preview": "/* blast.c\n * Copyright (C) 2003, 2012, 2013 Mark Adler\n * For conditions of distribution and use, see copyright notice "
},
{
"path": "contrib/blast/blast.h",
"chars": 3933,
"preview": "/* blast.h -- interface for blast.c\n Copyright (C) 2003, 2012, 2013 Mark Adler\n version 1.3, 24 Aug 2013\n\n This softw"
},
{
"path": "contrib/blast/blastConfig.cmake.in",
"chars": 755,
"preview": "@PACKAGE_INIT@\n\nset(_blast_supported_components \"shared\" \"static\")\n\nif(blast_FIND_COMPONENTS)\n foreach(_comp ${blast_"
},
{
"path": "contrib/blast/test/CMakeLists.txt",
"chars": 6500,
"preview": "# if we are built from with zlib, use this path's)\nif(DEFINED ZLIB_BUILD_BLAST)\n set(WORK_DIR ${zlib_BINARY_DIR})\n "
},
{
"path": "contrib/blast/test/add_subdirectory_exclude_test.cmake.in",
"chars": 798,
"preview": "cmake_minimum_required(VERSION 3.12...3.31)\n\nproject(\n blast_find_package\n LANGUAGES C\n VERSION @blast_VERSION@"
},
{
"path": "contrib/blast/test/add_subdirectory_test.cmake.in",
"chars": 773,
"preview": "cmake_minimum_required(VERSION 3.12...3.31)\n\nproject(\n blast_find_package\n LANGUAGES C\n VERSION @blast_VERSION@"
},
{
"path": "contrib/blast/test/find_package_no_components_test.cmake.in",
"chars": 675,
"preview": "cmake_minimum_required(VERSION 3.12...3.31)\n\nproject(\n blast_find_package\n LANGUAGES C\n VERSION @blast_VERSION@"
},
{
"path": "contrib/blast/test/find_package_test.cmake.in",
"chars": 754,
"preview": "cmake_minimum_required(VERSION 3.12...3.31)\n\nproject(\n blast_find_package\n LANGUAGES C\n VERSION @blast_VERSION@"
},
{
"path": "contrib/blast/test/find_package_wrong_components_test.cmake.in",
"chars": 692,
"preview": "cmake_minimum_required(VERSION 3.12...3.31)\n\nproject(\n blast_find_package\n LANGUAGES C\n VERSION @blast_VERSION@"
},
{
"path": "contrib/blast/test.txt",
"chars": 13,
"preview": "AIAIAIAIAIAIA"
},
{
"path": "contrib/blast/tester.cmake",
"chars": 866,
"preview": "cmake_minimum_required(VERSION 3.12...3.31)\n\n#CMAKE_ARGV0 = ${CMAKE_COMMAND}\n#CMAKE_ARGV1 = -P\n#CMAKE_ARGV2 = ${CMAKE_CU"
},
{
"path": "contrib/crc32vx/CMakeLists.txt",
"chars": 2270,
"preview": "# check if we compile for IBM s390x\n#\nCHECK_C_SOURCE_COMPILES(\"\n#ifndef __s390x__\n #error\n#endif\nint main() {return 0"
},
{
"path": "contrib/crc32vx/README",
"chars": 337,
"preview": "IBM Z mainframes starting from version z13 provide vector instructions, which \nallows vectorization of crc32. This exten"
},
{
"path": "contrib/crc32vx/crc32_vx.c",
"chars": 9675,
"preview": "/*\n * Hardware-accelerated CRC-32 variants for Linux on z Systems\n *\n * Use the z/Architecture Vector Extension Facility"
},
{
"path": "contrib/crc32vx/crc32_vx_hooks.h",
"chars": 218,
"preview": "#ifndef CRC32_VX_HOOKS_H\n#define CRC32_VX_HOOKS_H\n\n/**\n * CRC HOOKS\n */\nZLIB_INTERNAL extern unsigned long (*crc32_z_hoo"
},
{
"path": "contrib/delphi/ZLib.pas",
"chars": 16414,
"preview": "{*******************************************************}\n{ }\n{ "
},
{
"path": "contrib/delphi/ZLibConst.pas",
"chars": 186,
"preview": "unit ZLibConst;\n\ninterface\n\nresourcestring\n sTargetBufferTooSmall = 'ZLib error: target buffer may be too small';\n sIn"
},
{
"path": "contrib/delphi/readme.txt",
"chars": 2500,
"preview": "\nOverview\n========\n\nThis directory contains an update to the ZLib interface unit,\ndistributed by Borland as a Delphi sup"
},
{
"path": "contrib/delphi/zlibd32.mak",
"chars": 2360,
"preview": "# Makefile for zlib\n# For use with Delphi and C++ Builder under Win32\n# Updated for zlib 1.2.x by Cosmin Truta\n\n# ------"
},
{
"path": "contrib/dotzlib/DotZLib/AssemblyInfo.cs",
"chars": 2500,
"preview": "using System.Reflection;\r\nusing System.Runtime.CompilerServices;\r\n\r\n//\r\n// General Information about an assembly is cont"
},
{
"path": "contrib/dotzlib/DotZLib/ChecksumImpl.cs",
"chars": 8041,
"preview": "//\r\n// Copyright Henrik Ravn 2004\r\n//\r\n// Use, modification and distribution are subject to the Boost Software License,"
},
{
"path": "contrib/dotzlib/DotZLib/CircularBuffer.cs",
"chars": 2246,
"preview": "//\r\n// Copyright Henrik Ravn 2004\r\n//\r\n// Use, modification and distribution are subject to the Boost Software License,"
},
{
"path": "contrib/dotzlib/DotZLib/CodecBase.cs",
"chars": 6334,
"preview": "//\r\n// Copyright Henrik Ravn 2004\r\n//\r\n// Use, modification and distribution are subject to the Boost Software License,"
},
{
"path": "contrib/dotzlib/DotZLib/Deflater.cs",
"chars": 3992,
"preview": "//\r\n// Copyright Henrik Ravn 2004\r\n//\r\n// Use, modification and distribution are subject to the Boost Software License,"
},
{
"path": "contrib/dotzlib/DotZLib/DotZLib.cs",
"chars": 9927,
"preview": "//\r\n// Copyright Henrik Ravn 2004\r\n//\r\n// Use, modification and distribution are subject to the Boost Software License,"
},
{
"path": "contrib/dotzlib/DotZLib/DotZLib.csproj",
"chars": 5396,
"preview": "<VisualStudioProject>\r\n <CSHARP\r\n ProjectType = \"Local\"\r\n ProductVersion = \"7.10.3077\"\r\n SchemaV"
},
{
"path": "contrib/dotzlib/DotZLib/GZipStream.cs",
"chars": 11159,
"preview": "//\r\n// Copyright Henrik Ravn 2004\r\n//\r\n// Use, modification and distribution are subject to the Boost Software License,"
},
{
"path": "contrib/dotzlib/DotZLib/Inflater.cs",
"chars": 3740,
"preview": "//\r\n// Copyright Henrik Ravn 2004\r\n//\r\n// Use, modification and distribution are subject to the Boost Software License,"
},
{
"path": "contrib/dotzlib/DotZLib/UnitTests.cs",
"chars": 7687,
"preview": "//\r\n// © Copyright Henrik Ravn 2004\r\n//\r\n// Use, modification and distribution are subject to the Boost Software License"
},
{
"path": "contrib/dotzlib/DotZLib.build",
"chars": 1173,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\r\n<project name=\"DotZLib\" default=\"build\" basedir=\"./DotZLib\">\r\n\t<description>A "
},
{
"path": "contrib/dotzlib/DotZLib.sln",
"chars": 907,
"preview": "Microsoft Visual Studio Solution File, Format Version 8.00\r\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"DotZLib"
},
{
"path": "contrib/dotzlib/LICENSE_1_0.txt",
"chars": 1359,
"preview": "Boost Software License - Version 1.0 - August 17th, 2003\r\n\r\nPermission is hereby granted, free of charge, to any person "
},
{
"path": "contrib/dotzlib/readme.txt",
"chars": 2359,
"preview": "This directory contains a .Net wrapper class library for the ZLib1.dll\r\n\r\nThe wrapper includes support for inflating/def"
},
{
"path": "contrib/gcc_gvmat64/CMakeLists.txt",
"chars": 496,
"preview": "enable_language(ASM)\n\n# Need to push CMAKE_ASM_COMPILE_OBJECT to cache as otherwise it's not\n# available in top-level\n\ns"
},
{
"path": "contrib/gcc_gvmat64/gvmat64.S",
"chars": 15615,
"preview": "/*\n;uInt longest_match_x64(\n; deflate_state *s,\n; IPos cur_match); // current match \n\n"
},
{
"path": "contrib/infback9/CMakeLists.txt",
"chars": 411,
"preview": "if(ZLIB_BUILD_SHARED)\n target_sources(zlib\n PRIVATE\n infback9.c\n inftree9.c\n "
},
{
"path": "contrib/infback9/README",
"chars": 51,
"preview": "See infback9.h for what this is and how to use it.\n"
},
{
"path": "contrib/infback9/infback9.c",
"chars": 21704,
"preview": "/* infback9.c -- inflate deflate64 data using a call-back interface\n * Copyright (C) 1995-2008 Mark Adler\n * For conditi"
},
{
"path": "contrib/infback9/infback9.h",
"chars": 1564,
"preview": "/* infback9.h -- header for using inflateBack9 functions\n * Copyright (C) 2003 Mark Adler\n * For conditions of distribut"
},
{
"path": "contrib/infback9/inffix9.h",
"chars": 6599,
"preview": " /* inffix9.h -- table for decoding deflate64 fixed codes\n * Generated automatically by makefixed9().\n */\n\n "
},
{
"path": "contrib/infback9/inflate9.h",
"chars": 1991,
"preview": "/* inflate9.h -- internal inflate state definition\n * Copyright (C) 1995-2003 Mark Adler\n * For conditions of distributi"
},
{
"path": "contrib/infback9/inftree9.c",
"chars": 13407,
"preview": "/* inftree9.c -- generate Huffman trees for efficient decoding\n * Copyright (C) 1995-2026 Mark Adler\n * For conditions o"
},
{
"path": "contrib/infback9/inftree9.h",
"chars": 2881,
"preview": "/* inftree9.h -- header to use inftree9.c\n * Copyright (C) 1995-2008 Mark Adler\n * For conditions of distribution and us"
},
{
"path": "contrib/iostream/test.cpp",
"chars": 526,
"preview": "\n#include \"zfstream.h\"\n\nint main() {\n\n // Construct a stream object with this filebuffer. Anything sent\n // to this s"
},
{
"path": "contrib/iostream/zfstream.cpp",
"chars": 5112,
"preview": "\n#include \"zfstream.h\"\n\ngzfilebuf::gzfilebuf() :\n file(NULL),\n mode(0),\n own_file_descriptor(0)\n{ }\n\ngzfilebuf::~gzfi"
},
{
"path": "contrib/iostream/zfstream.h",
"chars": 2467,
"preview": "\n#ifndef zfstream_h\n#define zfstream_h\n\n#include <fstream.h>\n#include \"zlib.h\"\n\nclass gzfilebuf : public streambuf {\n\npu"
},
{
"path": "contrib/iostream2/zstream.h",
"chars": 9262,
"preview": "/*\n *\n * Copyright (c) 1997\n * Christian Michelsen Research AS\n * Advanced Computing\n * Fantoftvegen 38, 5036 BERGEN, No"
},
{
"path": "contrib/iostream2/zstream_test.cpp",
"chars": 711,
"preview": "#include \"zstream.h\"\n#include <math.h>\n#include <stdlib.h>\n#include <iomanip.h>\n\nvoid main() {\n char h[256] = \"Hello\""
},
{
"path": "contrib/iostream3/CMakeLists.txt",
"chars": 6528,
"preview": "cmake_minimum_required(VERSION 3.12...3.31)\n\nproject(\n iostreamV3\n VERSION 1.0.0\n LANGUAGES CXX\n DESCRIPTION"
},
{
"path": "contrib/iostream3/README",
"chars": 1490,
"preview": "These classes provide a C++ stream interface to the zlib library. It allows you\nto do things like:\n\n gzofstream outf(\"b"
},
{
"path": "contrib/iostream3/TODO",
"chars": 491,
"preview": "Possible upgrades to gzfilebuf:\n\n- The ability to do putback (e.g. putbackfail)\n\n- The ability to seek (zlib supports th"
},
{
"path": "contrib/iostream3/iostream3Config.cmake.in",
"chars": 967,
"preview": "@PACKAGE_INIT@\n\nset(_iostreamv3_supported_components \"shared\" \"static\")\ninclude(CMakeFindDependencyMacro)\n\nif(iostreamv3"
},
{
"path": "contrib/iostream3/test/CMakeLists.txt",
"chars": 6627,
"preview": "# if we are built from with zlib, use this path's)\nif(DEFINED ZLIB_BUILD_IOSTREAM3)\n set(WORK_DIR ${zlib_BINARY_DIR})"
},
{
"path": "contrib/iostream3/test/add_subdirectory_exclude_test.cmake.in",
"chars": 871,
"preview": "cmake_minimum_required(VERSION 3.12...3.31)\n\nproject(\n iostream_add_subdirectory_exclude\n LANGUAGES CXX\n VERSIO"
},
{
"path": "contrib/iostream3/test/add_subdirectory_test.cmake.in",
"chars": 838,
"preview": "cmake_minimum_required(VERSION 3.12...3.31)\n\nproject(\n iostream_add_subdirectory\n LANGUAGES CXX\n VERSION @iostr"
},
{
"path": "contrib/iostream3/test/find_package_no_components_test.cmake.in",
"chars": 765,
"preview": "cmake_minimum_required(VERSION 3.12...3.31)\n\nproject(\n iostream_find_package_no_components\n LANGUAGES CXX\n VERS"
},
{
"path": "contrib/iostream3/test/find_package_test.cmake.in",
"chars": 827,
"preview": "cmake_minimum_required(VERSION 3.12...3.31)\n\nproject(\n iostream_find_package\n LANGUAGES CXX\n VERSION @iostreamV"
},
{
"path": "contrib/iostream3/test/find_package_wrong_components_test.cmake.in",
"chars": 755,
"preview": "cmake_minimum_required(VERSION 3.12...3.31)\n\nproject(\n iostream_find_package\n LANGUAGES CXX\n VERSION @iostreamV"
},
{
"path": "contrib/iostream3/test.cc",
"chars": 1490,
"preview": "/*\n * Test program for gzifstream and gzofstream\n *\n * by Ludwig Schwardt <schwardt@sun.ac.za>\n * original version by Ke"
},
{
"path": "contrib/iostream3/zfstream.cc",
"chars": 13447,
"preview": "/*\n * A C++ I/O streams interface to the zlib gz* functions\n *\n * by Ludwig Schwardt <schwardt@sun.ac.za>\n * original ve"
},
{
"path": "contrib/iostream3/zfstream.h",
"chars": 12240,
"preview": "/*\n * A C++ I/O streams interface to the zlib gz* functions\n *\n * by Ludwig Schwardt <schwardt@sun.ac.za>\n * original ve"
},
{
"path": "contrib/minizip/CMakeLists.txt",
"chars": 15310,
"preview": "cmake_minimum_required(VERSION 3.12...3.31)\n\nproject(\n minizip\n VERSION 1.0.0\n LANGUAGES C\n DESCRIPTION \"A l"
},
{
"path": "contrib/minizip/LICENSE.Info-Zip",
"chars": 3509,
"preview": "This is version 2009-Jan-02 of the Info-ZIP license. The definitive version of\nthis document should be available at ftp:"
},
{
"path": "contrib/minizip/Makefile",
"chars": 773,
"preview": "CPPFLAGS = -I../..\n\nUNZ_OBJS = miniunz.o unzip.o ioapi.o ../../libz.a\nZIP_OBJS = minizip.o zip.o ioapi.o ../../libz.a\n"
},
{
"path": "contrib/minizip/Makefile.am",
"chars": 828,
"preview": "lib_LTLIBRARIES = libminizip.la\n\nif COND_DEMOS\nbin_PROGRAMS = miniunzip minizip\nendif\n\nzlib_top_srcdir = $(top_srcdir)/."
},
{
"path": "contrib/minizip/MiniZip64_Changes.txt",
"chars": 108,
"preview": "\nMiniZip 1.1 was derived from MiniZip at version 1.01f\n\nChange in 1.0 (Okt 2009)\n - **TODO - Add history**\n\n"
},
{
"path": "contrib/minizip/MiniZip64_info.txt",
"chars": 2788,
"preview": "MiniZip - Copyright (c) 1998-2026 - by Gilles Vollant - version 1.1 64 bits from Mathias Svensson\n\nIntroduction\n--------"
},
{
"path": "contrib/minizip/configure.ac",
"chars": 788,
"preview": "# -*- Autoconf -*-\n# Process this file with autoconf to produce a configur"
},
{
"path": "contrib/minizip/crypt.h",
"chars": 4751,
"preview": "/* crypt.h -- base code for crypt/uncrypt ZIPfile\n\n Copyright (C) 1998-2026 Gilles Vollant\n\n This code is a modified"
},
{
"path": "contrib/minizip/ints.h",
"chars": 1602,
"preview": "/* ints.h -- create integer types for 8, 16, 32, and 64 bits\n * Copyright (C) 2024 Mark Adler\n * For conditions of distr"
},
{
"path": "contrib/minizip/ioapi.c",
"chars": 7800,
"preview": "/* ioapi.h -- IO base function header for compress/uncompress .zip\n part of the MiniZip project - ( https://www.winima"
},
{
"path": "contrib/minizip/ioapi.h",
"chars": 6723,
"preview": "/* ioapi.h -- IO base function header for compress/uncompress .zip\n part of the MiniZip project - ( https://www.winima"
},
{
"path": "contrib/minizip/iowin32.c",
"chars": 13794,
"preview": "/* iowin32.c -- IO base function header for compress/uncompress .zip\n part of the MiniZip project - ( https://www.wi"
},
{
"path": "contrib/minizip/iowin32.h",
"chars": 797,
"preview": "/* iowin32.h -- IO base function header for compress/uncompress .zip\n part of the MiniZip project - ( https://www.wi"
},
{
"path": "contrib/minizip/make_vms.com",
"chars": 905,
"preview": "$ if f$search(\"ioapi.h_orig\") .eqs. \"\" then copy ioapi.h ioapi.h_orig\n$ open/write zdef vmsdefs.h\n$ copy sys$input: zdef"
},
{
"path": "contrib/minizip/miniunz.c",
"chars": 18217,
"preview": "/*\n miniunz.c\n sample part of the MiniZip project - ( https://www.winimage.com/zLibDll/minizip.html )\n\n Copy"
},
{
"path": "contrib/minizip/miniunzip.1",
"chars": 1861,
"preview": ".\\\" Hey, EMACS: -*- nroff -*-\n.TH miniunzip 1 \"Nov 7, 2001\"\n.\\\" Please adjust this "
},
{
"path": "contrib/minizip/minizip.1",
"chars": 1462,
"preview": ".\\\" Hey, EMACS: -*- nroff -*-\n.TH minizip 1 \"May 2, 2001\"\n.\\\" Please adjust this da"
},
{
"path": "contrib/minizip/minizip.c",
"chars": 15204,
"preview": "/*\n minizip.c\n sample part of the MiniZip project - ( https://www.winimage.com/zLibDll/minizip.html )\n\n Copy"
},
{
"path": "contrib/minizip/minizip.pc.in",
"chars": 269,
"preview": "prefix=@prefix@\nexec_prefix=@exec_prefix@\nlibdir=@libdir@\nincludedir=@includedir@\n\nName: minizip\nDescription: Minizip zi"
},
{
"path": "contrib/minizip/minizip.pc.txt",
"chars": 382,
"preview": "prefix=@CMAKE_INSTALL_PREFIX@\nexec_prefix=@CMAKE_INSTALL_PREFIX@\nlibdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@\nsharedlibd"
},
{
"path": "contrib/minizip/minizipConfig.cmake.in",
"chars": 1005,
"preview": "@PACKAGE_INIT@\n\nset(_MINIZIP_supported_components \"shared\" \"static\")\ninclude(CMakeFindDependencyMacro)\n\nif(@MINIZIP_ENAB"
},
{
"path": "contrib/minizip/mztools.c",
"chars": 8343,
"preview": "/*\n Additional tools for Minizip\n Code: Xavier Roche '2004\n License: Same as ZLIB (www.gzip.org)\n*/\n\n/* Code */\n#ifnd"
},
{
"path": "contrib/minizip/mztools.h",
"chars": 708,
"preview": "/*\n Additional tools for Minizip\n Code: Xavier Roche '2004\n License: Same as ZLIB (www.gzip.org)\n*/\n\n#ifndef _zip_too"
},
{
"path": "contrib/minizip/skipset.h",
"chars": 13964,
"preview": "/* skipset.h -- set operations using a skiplist\n// Copyright (C) 2024-2026 Mark Adler\n// See MiniZip_info.txt for the li"
},
{
"path": "contrib/minizip/test/CMakeLists.txt",
"chars": 6573,
"preview": "# if we are built from with zlib, use this path's)\nif(DEFINED ZLIB_BUILD_MINIZIP)\n set(WORK_DIR ${zlib_BINARY_DIR})\n "
},
{
"path": "contrib/minizip/test/add_subdirectory_exclude_test.cmake.in",
"chars": 969,
"preview": "cmake_minimum_required(VERSION 3.12...3.31)\n\nproject(\n minizip_add_subdirectory_exclude_from_all\n LANGUAGES C\n "
},
{
"path": "contrib/minizip/test/add_subdirectory_test.cmake.in",
"chars": 935,
"preview": "cmake_minimum_required(VERSION 3.12...3.31)\n\nproject(\n minizip_add_subdirectory_exclude_from_all\n LANGUAGES C\n "
},
{
"path": "contrib/minizip/test/find_package_no_components_test.cmake.in",
"chars": 804,
"preview": "cmake_minimum_required(VERSION 3.12...3.31)\n\nproject(\n minizip_find_package\n LANGUAGES C\n VERSION @minizip_VERS"
},
{
"path": "contrib/minizip/test/find_package_test.cmake.in",
"chars": 904,
"preview": "cmake_minimum_required(VERSION 3.12...3.31)\n\nproject(\n minizip_find_package\n LANGUAGES C\n VERSION @minizip_VERS"
},
{
"path": "contrib/minizip/test/find_package_wrong_components_test.cmake.in",
"chars": 821,
"preview": "cmake_minimum_required(VERSION 3.12...3.31)\n\nproject(\n minizip_find_package\n LANGUAGES C\n VERSION @minizip_VERS"
},
{
"path": "contrib/minizip/test/test_helper.cm",
"chars": 828,
"preview": "if(CREATE_SHARED)\n file(REMOVE ./test_file_shared.orig ./test_file_shared.zip)\n file(WRITE ./test_file_shared.txt "
},
{
"path": "contrib/minizip/unzip.c",
"chars": 67752,
"preview": "/* unzip.c -- IO for uncompress .zip files using zlib\n part of the MiniZip project - ( https://www.winimage.com/zLibDl"
},
{
"path": "contrib/minizip/unzip.h",
"chars": 16712,
"preview": "/* unzip.h -- IO for uncompress .zip files using zlib\n part of the MiniZip project - ( https://www.winimage.com/zLibDl"
},
{
"path": "contrib/minizip/zip.c",
"chars": 77081,
"preview": "/* zip.c -- IO on .zip files using zlib\n part of the MiniZip project - ( https://www.winimage.com/zLibDll/minizip.html"
},
{
"path": "contrib/minizip/zip.h",
"chars": 15699,
"preview": "/* zip.h -- IO on .zip files using zlib\n part of the MiniZip project - ( https://www.winimage.com/zLibDll/minizip.html"
},
{
"path": "contrib/nuget/nuget.csproj",
"chars": 3789,
"preview": "<Project Sdk=\"Microsoft.Build.NoTargets/3.5.6\">\n\n <PropertyGroup>\n <TargetFramework>net6.0</TargetFramework>\n <Pa"
},
{
"path": "contrib/nuget/nuget.sln",
"chars": 961,
"preview": "\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio Version 17\nVisualStudioVersion = 17.0.3190"
},
{
"path": "contrib/pascal/example.pas",
"chars": 15687,
"preview": "(* example.c -- usage example of the zlib compression library\n * Copyright (C) 1995-2003 Jean-loup Gailly.\n * For condit"
},
{
"path": "contrib/pascal/readme.txt",
"chars": 3004,
"preview": "\nThis directory contains a Pascal (Delphi, Kylix) interface to the\nzlib data compression library.\n\n\nDirectory listing\n=="
},
{
"path": "contrib/pascal/zlibd32.mak",
"chars": 2360,
"preview": "# Makefile for zlib\n# For use with Delphi and C++ Builder under Win32\n# Updated for zlib 1.2.x by Cosmin Truta\n\n# ------"
},
{
"path": "contrib/pascal/zlibpas.pas",
"chars": 10128,
"preview": "(* zlibpas -- Pascal interface to the zlib data compression library\n *\n * Copyright (C) 2003 Cosmin Truta.\n * Derived fr"
},
{
"path": "contrib/puff/CMakeLists.txt",
"chars": 4864,
"preview": "cmake_minimum_required(VERSION 3.12...3.31)\n\nproject(\n puff\n VERSION 2.3.0\n LANGUAGES C\n DESCRIPTION \"A libr"
},
{
"path": "contrib/puff/Makefile",
"chars": 1899,
"preview": "CFLAGS=-O\n\npuff: puff.o pufftest.o\n\npuff.o: puff.h\n\npufftest.o: puff.h\n\ntest: puff\n\tpuff zeros.raw\n\npuft: puff.c puff.h "
},
{
"path": "contrib/puff/README",
"chars": 3077,
"preview": "Puff -- A Simple Inflate\n3 Mar 2003\nMark Adler\nmadler@alumni.caltech.edu\n\nWhat this is --\n\npuff.c provides the routine p"
},
{
"path": "contrib/puff/bin-writer.c",
"chars": 748,
"preview": "#include \"stdio.h\"\n#include \"stdlib.h\"\n\n/**\n * Reads hexadecimal values from stdin and writes binary bytes to stdout.\n *"
},
{
"path": "contrib/puff/puff.c",
"chars": 37891,
"preview": "/*\n * puff.c\n * Copyright (C) 2002-2013 Mark Adler\n * For conditions of distribution and use, see copyright notice in pu"
},
{
"path": "contrib/puff/puff.h",
"chars": 1415,
"preview": "/* puff.h\n Copyright (C) 2002-2013 Mark Adler, all rights reserved\n version 2.3, 21 Jan 2013\n\n This software is provi"
},
{
"path": "contrib/puff/puffConfig.cmake.in",
"chars": 741,
"preview": "@PACKAGE_INIT@\n\nset(_puff_supported_components \"shared\" \"static\")\n\nif(puff_FIND_COMPONENTS)\n foreach(_comp ${puff_FIN"
},
{
"path": "contrib/puff/pufftest.c",
"chars": 4994,
"preview": "/*\n * pufftest.c\n * Copyright (C) 2002-2026 Mark Adler\n * For conditions of distribution and use, see copyright notice i"
},
{
"path": "contrib/puff/test/CMakeLists.txt",
"chars": 8969,
"preview": "# if we are built from with zlib, use this path's)\nif(DEFINED ZLIB_BUILD_PUFF)\n set(WORK_DIR ${zlib_BINARY_DIR})\n "
},
{
"path": "contrib/puff/test/add_subdirectory_exclude_test.cmake.in",
"chars": 787,
"preview": "cmake_minimum_required(VERSION 3.12...3.31)\n\nproject(\n zlib_puff_add_subdirectory_exclude_from_all\n LANGUAGES C\n "
},
{
"path": "contrib/puff/test/add_subdirectory_test.cmake.in",
"chars": 736,
"preview": "cmake_minimum_required(VERSION 3.12...3.31)\n\nproject(\n zlib_puff_add_subdirectory\n LANGUAGES C\n VERSION @puff_V"
},
{
"path": "contrib/puff/test/find_package_no_components_test.cmake.in",
"chars": 654,
"preview": "cmake_minimum_required(VERSION 3.12...3.31)\n\nproject(\n puff_find_package\n LANGUAGES C\n VERSION @puff_VERSION@)\n"
},
{
"path": "contrib/puff/test/find_package_test.cmake.in",
"chars": 732,
"preview": "cmake_minimum_required(VERSION 3.12...3.31)\n\nproject(\n puff_find_package\n LANGUAGES C\n VERSION @puff_VERSION@)\n"
},
{
"path": "contrib/puff/test/find_package_wrong_components_test.cmake.in",
"chars": 671,
"preview": "cmake_minimum_required(VERSION 3.12...3.31)\n\nproject(\n puff_find_package\n LANGUAGES C\n VERSION @puff_VERSION@)\n"
},
{
"path": "contrib/puff/test/tester-cov.cmake",
"chars": 2165,
"preview": "cmake_minimum_required(VERSION 3.12...3.31)\n\n#CMAKE_ARGV0 = ${CMAKE_COMMAND}\n#CMAKE_ARGV1 = -P\n#CMAKE_ARGV2 = ${CMAKE_CU"
},
{
"path": "contrib/puff/test/tester.cmake",
"chars": 490,
"preview": "cmake_minimum_required(VERSION 3.12...3.31)\n\n#CMAKE_ARGV0 = ${CMAKE_COMMAND}\n#CMAKE_ARGV1 = -P\n#CMAKE_ARGV2 = ${CMAKE_CU"
},
{
"path": "contrib/testzlib/CMakeLists.txt",
"chars": 1376,
"preview": "cmake_minimum_required(VERSION 3.12...3.31)\n\nproject(\n testzlib\n VERSION 1.0.0\n LANGUAGES C\n DESCRIPTION \"A "
},
{
"path": "contrib/testzlib/testzlib.c",
"chars": 7376,
"preview": "#include <stdio.h>\n#include <stdlib.h>\n#include <windows.h>\n\n#include \"zlib.h\"\n\n\nvoid MyDoMinus64(LARGE_INTEGER *R,LARGE"
},
{
"path": "contrib/testzlib/testzlib.txt",
"chars": 197,
"preview": "To build testzLib with Visual Studio 2005:\n\ncopy to a directory file from :\n- root of zLib tree\n- contrib/testzlib\n- con"
},
{
"path": "contrib/vstudio/readme.txt",
"chars": 828,
"preview": "The pre-made Visual Studio projects have been removed in lieu of the ability to\nuse cmake to build such projects on dema"
},
{
"path": "contrib/zlib1-dll/CMakeLists.txt",
"chars": 5246,
"preview": "cmake_minimum_required(VERSION 3.12...3.31)\n\nproject(\n zlib1-dll\n LANGUAGES C\n VERSION 1.3.2.1\n HOMEPAGE_URL"
},
{
"path": "contrib/zlib1-dll/readme.txt",
"chars": 812,
"preview": "Use this directory to build the legacy zlib1.dll for Windows, which contains\nboth zlib and minizip. Use cmake either at "
},
{
"path": "crc32.c",
"chars": 29735,
"preview": "/* crc32.c -- compute the CRC-32 of a data stream\n * Copyright (C) 1995-2026 Mark Adler\n * For conditions of distributio"
},
{
"path": "crc32.h",
"chars": 591749,
"preview": "/* crc32.h -- tables for rapid CRC calculation\n * Generated automatically by crc32.c\n */\n\nlocal const z_crc_t FAR crc_ta"
},
{
"path": "deflate.c",
"chars": 83288,
"preview": "/* deflate.c -- compress data using the deflation algorithm\n * Copyright (C) 1995-2026 Jean-loup Gailly and Mark Adler\n "
},
{
"path": "deflate.h",
"chars": 14213,
"preview": "/* deflate.h -- internal compression state\n * Copyright (C) 1995-2026 Jean-loup Gailly\n * For conditions of distribution"
},
{
"path": "doc/algorithm.txt",
"chars": 9345,
"preview": "1. Compression algorithm (deflate)\n\nThe deflation algorithm used by gzip (also zip and zlib) is a variation of\nLZ77 (Lem"
},
{
"path": "doc/rfc1950.txt",
"chars": 20502,
"preview": "\n\n\n\n\n\nNetwork Working Group P. Deutsch\nRequest for Comments: 1950 "
},
{
"path": "doc/rfc1951.txt",
"chars": 36944,
"preview": "\n\n\n\n\n\nNetwork Working Group P. Deutsch\nRequest for Comments: 1951 "
},
{
"path": "doc/rfc1952.txt",
"chars": 25037,
"preview": "\n\n\n\n\n\nNetwork Working Group P. Deutsch\nRequest for Comments: 1952 "
},
{
"path": "doc/txtvsbin.txt",
"chars": 5193,
"preview": "A Fast Method for Identifying Plain Text Files\n==============================================\n\n\nIntroduction\n-----------"
},
{
"path": "examples/README.examples",
"chars": 1970,
"preview": "This directory contains examples of the use of zlib and other relevant\nprograms and documentation.\n\nenough.c\n calcula"
},
{
"path": "examples/enough.c",
"chars": 24902,
"preview": "/* enough.c -- determine the maximum size of inflate's Huffman code tables over\n * all possible valid and complete prefi"
},
{
"path": "examples/fitblk.c",
"chars": 8596,
"preview": "/* fitblk.c: example of fitting compressed output to a specified size\n Not copyrighted -- provided to the public domai"
},
{
"path": "examples/gun.c",
"chars": 26014,
"preview": "/* gun.c -- simple gunzip to give an example of the use of inflateBack()\n * Copyright (C) 2003, 2005, 2008, 2010, 2012 M"
},
{
"path": "examples/gzappend.c",
"chars": 16978,
"preview": "/* gzappend -- command to append to a gzip file\n\n Copyright (C) 2003, 2012 Mark Adler, all rights reserved\n version 1."
},
{
"path": "examples/gzjoin.c",
"chars": 14132,
"preview": "/* gzjoin -- command to join gzip files into one gzip file\n\n Copyright (C) 2004, 2005, 2012 Mark Adler, all rights rese"
},
{
"path": "examples/gzlog.c",
"chars": 41537,
"preview": "/*\n * gzlog.c\n * Copyright (C) 2004, 2008, 2012, 2016, 2019 Mark Adler, all rights reserved\n * For conditions of distrib"
},
{
"path": "examples/gzlog.h",
"chars": 4558,
"preview": "/* gzlog.h\n Copyright (C) 2004, 2008, 2012 Mark Adler, all rights reserved\n version 2.2, 14 Aug 2012\n\n This software "
},
{
"path": "examples/gznorm.c",
"chars": 22285,
"preview": "/* gznorm.c -- normalize a gzip stream\n * Copyright (C) 2018 Mark Adler\n * For conditions of distribution and use, see c"
},
{
"path": "examples/zlib_how.html",
"chars": 29894,
"preview": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<"
},
{
"path": "examples/zpipe.c",
"chars": 6387,
"preview": "/* zpipe.c: example of proper use of zlib's inflate() and deflate()\n Not copyrighted -- provided to the public domain\n"
},
{
"path": "examples/zran.c",
"chars": 22603,
"preview": "/* zran.c -- example of deflate stream indexing and random access\n * Copyright (C) 2005, 2012, 2018, 2023, 2024, 2025 Ma"
},
{
"path": "examples/zran.h",
"chars": 2899,
"preview": "/* zran.h -- example of deflate stream indexing and random access\n * Copyright (C) 2005, 2012, 2018, 2023, 2024, 2025 Ma"
},
{
"path": "gzclose.c",
"chars": 668,
"preview": "/* gzclose.c -- zlib gzclose() function\n * Copyright (C) 2004, 2010 Mark Adler\n * For conditions of distribution and use"
},
{
"path": "gzguts.h",
"chars": 7088,
"preview": "/* gzguts.h -- zlib internal header definitions for gz* operations\n * Copyright (C) 2004-2026 Mark Adler\n * For conditio"
}
]
// ... and 57 more files (download for full content)
About this extraction
This page contains the full source code of the madler/zlib GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 257 files (2.6 MB), approximately 688.1k tokens, and a symbol index with 797 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.