Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
dd625a9
Change version number on develop branch to 1.3.2.1.
madler Feb 17, 2026
cb14dc9
Add dependency to ints.h in minizip Makefile.am.
chenrui333 Feb 17, 2026
846a66a
Remove redundant check in zmemzero().
madler Feb 17, 2026
09a1572
Fix inflateBack() bug that would fail to detect a too far back.
madler Feb 22, 2026
63a623c
Correct ENOUGH_LENS and ENOUGH_DIST for PKZIP_BUG_WORKAROUND.
madler Mar 9, 2026
60ab906
Add setting of VGFMAFLAG to configure for s390x.
rwolke Feb 18, 2026
2d20523
Remove C99 intermingled variable declarations from minizip.
jodogne Feb 21, 2026
c68d46a
Make skipset functions static (not external) in minizip.
madler Mar 26, 2026
74030f2
Clean up skipset.h comment formatting.
madler Mar 26, 2026
bb65dcb
CMake: Define exec_prefix to be the same as prefix in .pc file.
marcin-serwin Feb 18, 2026
ed659f3
CMake: Use prefix for includedir in .pc file.
marcin-serwin Feb 18, 2026
91292b1
CMake: Emit correct variables for absolute install directories.
marcin-serwin Feb 18, 2026
7cdaaa0
CMake: Don't add coverage tests if gcov is not found.
marcin-serwin Feb 18, 2026
f9dd600
Clean up comment formatting in minizip's zip.c and unzip.c.
madler Mar 27, 2026
51b2667
Correct errno symbol in zlib.h comment.
jonathangray Mar 23, 2026
02adb14
CMake: Check for loaded config.
Feb 21, 2026
a18d683
CMake: Reduce the noise in ZLIBConfig.cmake and minizipConfig.cmake.
Feb 21, 2026
88b597d
CMake: Check for loaded config in minizip.
Feb 21, 2026
d767818
CMake: Add found vars for components.
Feb 21, 2026
7d697b0
CMake: Clarify README-cmake.md about usage of components.
Feb 21, 2026
faaaab2
CMake: Search for minizip the right way.
Feb 21, 2026
bc406b9
Use scp for vmactions which is hopefully more robust.
Feb 21, 2026
b55070a
CMake: Fix naming of libs on MSVC.
Feb 22, 2026
494708c
CMake: Fix naming on cygwin.
Feb 22, 2026
1c2519c
CMake: Update README-cmake.md.
Vollstrecker Feb 23, 2026
0d10bbd
CMake: Avoid failure if only static or shared is found.
Feb 24, 2026
43129bf
CMake: Create all package targets.
Feb 24, 2026
e171c51
CMake: Fix gvmat warning about unused linker-inputs.
Feb 25, 2026
4072767
CMake: Fix assembler detection.
Feb 25, 2026
5c0dfd2
CMake: Fix zlib1-dll when building from within zlib.
Feb 25, 2026
021a130
CMake: Give clear option-names for zlib1_dll.
Feb 25, 2026
29e991a
Add Windows to contrib tests and test contribs standalone.
Feb 25, 2026
caa5163
CMake: Bring all configs to the same level.
Feb 25, 2026
ecea898
CMake: Add indicator to check if minizip was compiled with bzip2.
Feb 25, 2026
27703b2
CMake: Fix zlib1.dll typo.
Feb 25, 2026
dd0d778
CMake: Unify target names for blast.
Feb 25, 2026
4a181d8
CMake: Export symbols from iostream3.
Feb 25, 2026
e2a957b
CMake: Fix testzlib standalone build.
Feb 25, 2026
9c19e68
CMake: Move CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS to the right place.
Feb 25, 2026
2d407ac
CMake: Remove extra parenthesis.
Feb 25, 2026
6af5136
CMake: Fix conditional around wrong statement.
Feb 25, 2026
aa9e122
CMake: Export puff symbols.
Feb 25, 2026
7a675db
CMake: Move redundant variables higher in level.
Feb 26, 2026
4b4588d
CMake: Use targets for iostream.
Feb 26, 2026
8dab7e8
CMake: Add missing suffix for iostream.
Feb 26, 2026
dda8535
CMake: Allow minizip to build on 32-bit.
Feb 26, 2026
b49dce6
CMake: Enable tests for standalone puff.
Feb 26, 2026
8849c7c
CMake: Add debug-postfix to zlib1-dll.
Feb 26, 2026
d287163
CMake: Add path handling for standalone and chainbuild zlib1-dll.
Feb 26, 2026
74c677c
CMake: Add proper reconfiguration for standalone zlib1.dll.
Feb 26, 2026
0c147a7
CMake: Add alias for chainbuilding zlib1-dll.
Feb 26, 2026
337803a
CMake: Add installation and export to zlib1.dll and zlibwapi.dll.
Feb 26, 2026
2d2b187
CMake: Add tests for zlib1.dll.
Feb 26, 2026
e1a1c15
CMake: Set Ada build defaults to zlib defaults.
Feb 26, 2026
59c7b00
CMake: Set blast build defaults to zlib defaults.
Feb 26, 2026
6bda445
CMake: Set iostream build defaults to zlib defaults.
Feb 26, 2026
321c6fb
CMake: Set puff build defaults to zlib defaults.
Feb 26, 2026
d567128
CMake: Rename the targets to the same schema.
Feb 26, 2026
81b3af3
Avoid minizip test in c-std.
Feb 26, 2026
b2ed197
CMake: Consolidate build tests in the test directory.
Feb 27, 2026
582b8ef
CMake: Remove unnecessary make_directory calls.
Feb 27, 2026
ace35f6
CMake: Break long lines for readability.
Feb 27, 2026
90d5bd8
CMake: Prefix targets and tests with zlib_ when not standalone.
Feb 27, 2026
f8444a9
CMake: Correct the name of blast_testStatic.
Feb 27, 2026
213ea4d
CMake: Correct the iostream3_add_subdirectory test dependency.
Feb 27, 2026
7ccaebc
CMake: Fix minizip test-dep-graph.
Feb 28, 2026
6a0e00f
CMake: Fix puff-test-dep-graph.
Feb 28, 2026
979a56e
CMake: Fix zlib test-dep-graph.
Feb 28, 2026
6de84ae
CMake: Fix Ada test.dep-graph.
Feb 28, 2026
4fd956f
CMake: Avoid resource conflict in blast tests.
Feb 28, 2026
1110699
CMake: Enable Ada to compile in different directories.
Feb 28, 2026
bcf22ee
CMake: Move Ada tests to test directory.
Feb 28, 2026
c95cdea
CMake: Move blast tests into test directory.
Feb 28, 2026
2da4816
CMake: Move iostream3 tests into test directory.
Feb 28, 2026
6d3b776
CMake: Move minizip tests into test directory.
Feb 28, 2026
13c70da
CMake: Fix Ada configuration.
Feb 28, 2026
3e8969d
CMake: Avoid test in tests.
Feb 28, 2026
160de9b
CMake: Fix DLL details when building with cmake.
Feb 28, 2026
6672d10
CMake: Fix broken link_helper.
Vollstrecker Feb 28, 2026
8be6629
CMake: Avoid masking a slash in REPLACE.
Feb 28, 2026
629d8cb
Remove redundant cmake runs in testing.
Feb 28, 2026
25e021a
CMake: Avoid running integration tests when not installing.
Mar 18, 2026
d491f4a
CMake: Fix tests with pre-3.24 cmake updates.
Mar 18, 2026
bb0c497
CMake: Avoid coverage testing when cross-compiling.
Mar 18, 2026
e3dc0a8
Avoid undefined behavior in gzwrite.c.
madler Apr 5, 2026
7b2780d
ci: add permissions blocks to all workflows
Alb3e3 Aug 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 6 additions & 17 deletions .github/workflows/c-std.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
push:
pull_request:

permissions:
contents: read

jobs:

main:
Expand Down Expand Up @@ -46,7 +49,6 @@ jobs:
compiler-opt: -m32
cmake-opt: -A Win32


builder:
- configure
- cmake
Expand Down Expand Up @@ -152,31 +154,18 @@ jobs:
- 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
cmake -S . -B ./build -D CMAKE_BUILD_TYPE=Release ${{ matrix.os.cmake-opt }} -DZLIB_BUILD_TESTING=OFF -DZLIB_BUILD_MINIZIP=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
run: cmake --build ./build --config Release

- name: Run test cases (cmake)
if: matrix.builder == 'cmake'
run: ctest ./build2 -C Release --output-on-failure --max-width 120

run: ctest ./build -C Release --output-on-failure --max-width 120

msvc:
name: ${{ matrix.os.name }} ${{ matrix.compiler }} ${{ matrix.arch.name }} ${{ matrix.std.name }} ${{ matrix.builder }}
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: CMake
on: [push, pull_request]

permissions:
contents: read

jobs:
ci-cmake:
name: ${{ matrix.name }}
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/configure.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: Configure
on: [push, pull_request]

permissions:
contents: read

jobs:
ci-configure:
name: ${{ matrix.name }}
Expand Down
48 changes: 47 additions & 1 deletion .github/workflows/contribs.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: contribs
on: [push, pull_request]

permissions:
contents: read

jobs:
ci-cmake:
name: ${{ matrix.name }}
Expand All @@ -12,37 +16,79 @@ jobs:
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: .
sudo: sudo

- name: Windows all contribs
os: windows-latest
cmake-args: -DZLIB_BUILD_BLAST=ON -DZLIB_BUILD_IOSTREAM3=ON -DZLIB_BUILD_MINIZIP=ON -DZLIB_BUILD_PUFF=ON -DZLIB_BUILD_TESTZLIB=ON -DZLIB_BUILD_ZLIB1_DLL=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
sudo: sudo

- name: Ubuntu BLAST
os: ubuntu-latest
src_dir: contrib/blast
install_zlib: yes
sudo: sudo

- name: Windows BLAST
os: Windows-latest
src_dir: contrib/blast
install_zlib: yes

- name: Ubuntu IOSTREAM
os: ubuntu-latest
src_dir: contrib/iostream3
install_zlib: yes
sudo: sudo

- name: Windows IOSTREAM
os: Windows-latest
src_dir: contrib/iostream3
install_zlib: yes

- name: Ubuntu MINIZIP
os: ubuntu-latest
src_dir: contrib/minizip
install_zlib: yes
sudo: sudo

- name: Windows MINIZIP
os: Windows-latest
src_dir: contrib/minizip
install_zlib: yes

- name: Ubuntu PUFF
os: ubuntu-latest
src_dir: contrib/puff
install_zlib: yes
sudo: sudo

- name: Windows PUFF
os: Windows-latest
src_dir: contrib/puff
install_zlib: yes

- name: Windows testzlib
os: windows-latest
src_dir: contrib/testzlib
install_zlib: yes

- name: Windows zlib1-dll
os: windows-latest
src_dir: contrib/zlib1-dll
install_zlib: yes

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install packages
if: runner.os == 'Linux'
run: |
sudo apt install gnat libbz2-dev

Expand All @@ -51,7 +97,7 @@ jobs:
run: |
cmake -S . -B ../build-zlib -DCMAKE_BUILD_TYPE=Release
cmake --build ../build-zlib --config Release
sudo cmake --install ../build-zlib
${{ matrix.sudo }} cmake --install ../build-zlib

- name: Generate project files
run: cmake -S ${{ matrix.src_dir }} -B ../build ${{ matrix.cmake-args }} -DCMAKE_BUILD_TYPE=Release
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/fuzz.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: OSS-Fuzz
on: [pull_request]

permissions:
contents: read

jobs:
Fuzzing:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/msys-cygwin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: mingw/cygwin

on: [push, pull_request]

permissions:
contents: read

jobs:
MSys:
runs-on: ${{ matrix.os || 'windows-latest' }}
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/others.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: anyVM-OSes

on: [push, pull_request]

permissions:
contents: read

jobs:

dragonflybsd:
Expand All @@ -13,6 +16,7 @@ jobs:
uses: vmactions/dragonflybsd-vm@v1
with:
copyback: false
sync: scp
prepare: |
pkg install -y cmake gcc14 bzip2

Expand All @@ -37,6 +41,7 @@ jobs:
with:
arch: ${{ matrix.name }}
copyback: false
sync: scp
release: "15.0"
prepare: |
pkg install -y cmake gcc14 bzip2
Expand All @@ -61,6 +66,7 @@ jobs:
uses: vmactions/netbsd-vm@v1
with:
copyback: false
sync: scp
prepare: |
export PATH="/usr/pkg/sbin:/usr/pkg/bin:$PATH"
export PKG_PATH="https://cdn.NetBSD.org/pub/pkgsrc/packages"
Expand All @@ -82,6 +88,7 @@ jobs:
uses: vmactions/omnios-vm@v1
with:
copyback: false
sync: scp
prepare: |
pkg install cmake gcc14 make bzip2

Expand All @@ -107,6 +114,7 @@ jobs:
with:
arch: ${{ matrix.name }}
copyback: false
sync: scp
prepare: |
pkg_add cmake
bzip2
Expand All @@ -125,6 +133,7 @@ jobs:
# uses: vmactions/openindiana-vm@v0
# with:
# copyback: false
# sync: scp
# prepare: |
# pkg install cmake gcc-14 make bzip2

Expand All @@ -142,6 +151,7 @@ jobs:
uses: vmactions/solaris-vm@v1
with:
copyback: false
sync: scp
release: "11.4-gcc"
prepare: |
pkgutil -U
Expand Down
49 changes: 41 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.12...3.31)
project(
zlib
LANGUAGES C
VERSION 1.3.2
VERSION 1.3.2.1
HOMEPAGE_URL "https://zlib.net/"
DESCRIPTION "a general-purpose lossless data-compression library")

Expand Down Expand Up @@ -112,6 +112,16 @@ check_c_source_compiles(

unset(CMAKE_COMPILE_FLAGS)
set(ZLIB_PC ${zlib_BINARY_DIR}/zlib.pc)
if(IS_ABSOLUTE "${CMAKE_INSTALL_INCLUDEDIR}")
set(pc_includedir "${CMAKE_INSTALL_INCLUDEDIR}")
else()
set(pc_includedir "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}")
endif()
if(IS_ABSOLUTE "${CMAKE_INSTALL_LIBDIR}")
set(pc_libdir "${CMAKE_INSTALL_LIBDIR}")
else()
set(pc_libdir "\${exec_prefix}/${CMAKE_INSTALL_LIBDIR}")
endif()
configure_file(${zlib_SOURCE_DIR}/zlib.pc.cmakein ${ZLIB_PC} @ONLY)
configure_file(${zlib_BINARY_DIR}/zconf.h.cmakein ${zlib_BINARY_DIR}/zconf.h)

Expand Down Expand Up @@ -157,8 +167,9 @@ 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>)
$<$<OR:$<BOOL:${WIN32}>,$<BOOL:${CYGWIN}>>:win32/zlib-cmake.rc>)
add_library(ZLIB::ZLIB ALIAS zlib)

target_include_directories(
zlib
PUBLIC $<BUILD_INTERFACE:${zlib_BINARY_DIR}>
Expand All @@ -174,16 +185,24 @@ if(ZLIB_BUILD_SHARED)
PUBLIC $<$<BOOL:${HAVE_OFF64_T}>:_LARGEFILE64_SOURCE=1>)
set(INSTALL_VERSION ${zlib_VERSION})

if(NOT CYGWIN)
if(CYGWIN)
set_target_properties(zlib PROPERTIES PREFIX "lib")
else(CYGWIN)
set_target_properties(zlib PROPERTIES SOVERSION ${zlib_VERSION_MAJOR}
VERSION ${INSTALL_VERSION})
endif(NOT CYGWIN)
endif(CYGWIN)

set_target_properties(
zlib
PROPERTIES DEFINE_SYMBOL ZLIB_DLL
EXPORT_NAME ZLIB
OUTPUT_NAME z)
EXPORT_NAME ZLIB)

if(MSVC)
set_target_properties(zlib PROPERTIES OUTPUT_NAME libz)
else(MSVC)
set_target_properties(zlib PROPERTIES OUTPUT_NAME z)
endif(MSVC)

if(UNIX
AND NOT APPLE
AND NOT (CMAKE_SYSTEM_NAME STREQUAL AIX)
Expand Down Expand Up @@ -217,9 +236,23 @@ if(ZLIB_BUILD_STATIC)
$<$<BOOL:${MSVC}>:_CRT_SECURE_NO_DEPRECATE>
$<$<BOOL:${MSVC}>:_CRT_NONSTDC_NO_DEPRECATE>
PUBLIC $<$<BOOL:${HAVE_OFF64_T}>:_LARGEFILE64_SOURCE=1>)

if(CYGWIN)
set_target_properties(zlibstatic PROPERTIES PREFIX "lib")
endif(CYGWIN)

if(MSVC)
set_target_properties(zlibstatic
PROPERTIES
ARCHIVE_OUTPUT_NAME libz${zlib_static_suffix})
else(MSVC)
set_target_properties(zlibstatic
PROPERTIES
ARCHIVE_OUTPUT_NAME z${zlib_static_suffix})
endif(MSVC)

set_target_properties(
zlibstatic PROPERTIES EXPORT_NAME ZLIBSTATIC OUTPUT_NAME
z${zlib_static_suffix})
zlibstatic PROPERTIES EXPORT_NAME ZLIBSTATIC)
endif(ZLIB_BUILD_STATIC)

if(ZLIB_INSTALL)
Expand Down
3 changes: 3 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@

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
Expand Down
2 changes: 1 addition & 1 deletion Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ VGFMAFLAG=

STATICLIB=libz.a
SHAREDLIB=libz.so
SHAREDLIBV=libz.so.1.3.2
SHAREDLIBV=libz.so.1.3.2.1
SHAREDLIBM=libz.so.1
LIBS=$(STATICLIB) $(SHAREDLIBV)

Expand Down
4 changes: 2 additions & 2 deletions README
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ZLIB DATA COMPRESSION LIBRARY

zlib 1.3.2 is a general purpose data compression library. All the code is
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
Expand Down Expand Up @@ -31,7 +31,7 @@ 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 are documented in the file ChangeLog.
The changes made in version 1.3.2.1 are documented in the file ChangeLog.

Unsupported third party contributions are provided in directory contrib/ .

Expand Down
Loading