├── .cmake-format.yaml ├── .github └── workflows │ ├── c-std.yml │ ├── cmake.yml │ ├── configure.yml │ ├── fuzz.yml │ └── msys-cygwin.yml ├── .gitignore ├── BUILD.bazel ├── CMakeLists.txt ├── ChangeLog ├── FAQ ├── INDEX ├── LICENSE ├── MODULE.bazel ├── Makefile ├── Makefile.in ├── README ├── README-cmake.md ├── adler32.c ├── amiga ├── Makefile.pup └── Makefile.sas ├── compress.c ├── configure ├── contrib ├── README.contrib ├── ada │ ├── buffer_demo.adb │ ├── 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 │ ├── Makefile │ ├── README │ ├── blast.c │ ├── blast.h │ ├── test.pk │ └── test.txt ├── delphi │ ├── ZLib.pas │ ├── ZLibConst.pas │ ├── readme.txt │ └── zlibd32.mak ├── dotzlib │ ├── DotZLib.build │ ├── DotZLib.chm │ ├── DotZLib.sln │ ├── DotZLib │ │ ├── AssemblyInfo.cs │ │ ├── ChecksumImpl.cs │ │ ├── CircularBuffer.cs │ │ ├── CodecBase.cs │ │ ├── Deflater.cs │ │ ├── DotZLib.cs │ │ ├── DotZLib.csproj │ │ ├── GZipStream.cs │ │ ├── Inflater.cs │ │ └── UnitTests.cs │ ├── LICENSE_1_0.txt │ └── readme.txt ├── gcc_gvmat64 │ └── gvmat64.S ├── infback9 │ ├── 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 │ ├── README │ ├── TODO │ ├── test.cc │ ├── zfstream.cc │ └── zfstream.h ├── minizip │ ├── CMakeLists.txt │ ├── 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_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 │ ├── Makefile │ ├── README │ ├── puff.c │ ├── puff.h │ ├── pufftest.c │ └── zeros.raw ├── testzlib │ ├── testzlib.c │ └── testzlib.txt ├── untgz │ ├── Makefile │ ├── Makefile.msc │ └── untgz.c └── vstudio │ ├── readme.txt │ ├── vc10 │ ├── miniunz.vcxproj │ ├── miniunz.vcxproj.filters │ ├── minizip.vcxproj │ ├── minizip.vcxproj.filters │ ├── testzlib.vcxproj │ ├── testzlib.vcxproj.filters │ ├── testzlibdll.vcxproj │ ├── testzlibdll.vcxproj.filters │ ├── zlib.rc │ ├── zlibstat.vcxproj │ ├── zlibstat.vcxproj.filters │ ├── zlibvc.def │ ├── zlibvc.sln │ ├── zlibvc.vcxproj │ └── zlibvc.vcxproj.filters │ ├── vc11 │ ├── miniunz.vcxproj │ ├── minizip.vcxproj │ ├── testzlib.vcxproj │ ├── testzlibdll.vcxproj │ ├── zlib.rc │ ├── zlibstat.vcxproj │ ├── zlibvc.def │ ├── zlibvc.sln │ └── zlibvc.vcxproj │ ├── vc12 │ ├── miniunz.vcxproj │ ├── minizip.vcxproj │ ├── testzlib.vcxproj │ ├── testzlibdll.vcxproj │ ├── zlib.rc │ ├── zlibstat.vcxproj │ ├── zlibvc.def │ ├── zlibvc.sln │ └── zlibvc.vcxproj │ ├── vc14 │ ├── miniunz.vcxproj │ ├── minizip.vcxproj │ ├── testzlib.vcxproj │ ├── testzlibdll.vcxproj │ ├── zlib.rc │ ├── zlibstat.vcxproj │ ├── zlibvc.def │ ├── zlibvc.sln │ └── zlibvc.vcxproj │ ├── vc17 │ ├── miniunz.vcxproj │ ├── minizip.vcxproj │ ├── testzlib.vcxproj │ ├── testzlibdll.vcxproj │ ├── zlib.rc │ ├── zlibstat.vcxproj │ ├── zlibvc.def │ ├── zlibvc.sln │ └── zlibvc.vcxproj │ └── vc9 │ ├── miniunz.vcproj │ ├── minizip.vcproj │ ├── testzlib.vcproj │ ├── testzlibdll.vcproj │ ├── zlib.rc │ ├── zlibstat.vcproj │ ├── zlibvc.def │ ├── zlibvc.sln │ └── zlibvc.vcproj ├── crc32.c ├── crc32.h ├── deflate.c ├── deflate.h ├── doc ├── algorithm.txt ├── crc-doc.1.0.pdf ├── 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 ├── nintendods ├── Makefile └── README ├── old ├── Makefile.emx ├── Makefile.riscos ├── README ├── descrip.mms ├── os2 │ ├── Makefile.os2 │ └── zlib.def └── visual-basic.txt ├── os400 ├── README400 ├── bndsrc ├── make.sh └── zlib.inc ├── qnx └── package.qpg ├── test ├── CMakeLists.txt ├── add_subdirectory_exclude_test.cmake.in ├── add_subdirectory_test.cmake.in ├── example.c ├── find_package_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 ├── zconf.h.in ├── zlib.3 ├── zlib.3.pdf ├── zlib.h ├── zlib.map ├── zlib.pc.cmakein ├── zlib.pc.in ├── zlibConfig.cmake.in ├── zutil.c └── zutil.h /.github/workflows/cmake.yml: -------------------------------------------------------------------------------- 1 | name: CMake 2 | on: [push, pull_request] 3 | jobs: 4 | ci-cmake: 5 | name: ${{ matrix.name }} 6 | runs-on: ${{ matrix.os }} 7 | strategy: 8 | fail-fast: false 9 | matrix: 10 | include: 11 | - name: Ubuntu GCC 12 | os: ubuntu-latest 13 | compiler: gcc 14 | cflags: -Wall -Wextra 15 | pkgtgt: package package_source 16 | cmake-args: -DMINIZIP_ENABLE_BZIP2=ON 17 | 18 | - name: Ubuntu GCC -O3 19 | os: ubuntu-latest 20 | compiler: gcc 21 | cflags: -O3 -Wall -Wextra 22 | pkgtgt: package package_source 23 | cmake-args: -DMINIZIP_ENABLE_BZIP2=ON 24 | 25 | - name: Ubuntu Clang 26 | os: ubuntu-latest 27 | compiler: clang 28 | cflags: -Wall -Wextra 29 | pkgtgt: package package_source 30 | cmake-args: -DMINIZIP_ENABLE_BZIP2=ON 31 | 32 | - name: Ubuntu Clang Debug 33 | os: ubuntu-latest 34 | compiler: clang 35 | cflags: -Wall -Wextra 36 | build-config: Debug 37 | pkgtgt: package package_source 38 | cmake-args: -DMINIZIP_ENABLE_BZIP2=ON 39 | 40 | - name: Windows MSVC Win32 41 | os: windows-latest 42 | compiler: cl 43 | cflags: /W3 44 | cmake-args: -A Win32 45 | pkgtgt: PACKAGE 46 | 47 | - name: Windows MSVC Win64 48 | os: windows-latest 49 | compiler: cl 50 | cflags: /W3 51 | cmake-args: -A x64 -DMINIZIP_ENABLE_BZIP2=OFF 52 | pkgtgt: PACKAGE 53 | 54 | - name: Windows GCC 55 | os: windows-latest 56 | compiler: gcc 57 | cflags: -Wall -Wextra 58 | cmake-args: -G Ninja -DMINIZIP_ENABLE_BZIP2=OFF 59 | pkgtgt: package 60 | 61 | - name: macOS Clang 62 | os: macos-latest 63 | compiler: clang 64 | cflags: -Wall -Wextra 65 | pkgtgt: package 66 | cmake-args: -DMINIZIP_ENABLE_BZIP2=ON 67 | 68 | - name: macOS GCC 69 | os: macos-latest 70 | compiler: gcc-12 71 | cflags: -Wall -Wextra 72 | pkgtgt: package 73 | cmake-args: -DMINIZIP_ENABLE_BZIP2=ON 74 | 75 | steps: 76 | - name: Checkout repository 77 | uses: actions/checkout@v4 78 | 79 | - name: Install packages (Windows) 80 | if: runner.os == 'Windows' 81 | run: | 82 | choco install --no-progress ninja 83 | 84 | - name: Install packages (Linux) 85 | if: runner.os == 'Linux' 86 | run: | 87 | sudo apt install libbz2-dev 88 | - name: Generate project files 89 | run: cmake -S . -B ../build ${{ matrix.cmake-args }} -D CMAKE_BUILD_TYPE=${{ matrix.build-config || 'Release' }} -DZLIB_BUILD_MINIZIP=ON 90 | env: 91 | CC: ${{ matrix.compiler }} 92 | CFLAGS: ${{ matrix.cflags }} 93 | 94 | - name: Compile source code 95 | run: cmake --build ../build --config ${{ matrix.build-config || 'Release' }} 96 | 97 | - name: Run test cases 98 | run: ctest -C Release --output-on-failure --max-width 120 99 | working-directory: ../build 100 | 101 | - name: create packages 102 | run: cmake --build ../build --config ${{ matrix.build-config || 'Release' }} -t ${{ matrix.pkgtgt }} 103 | 104 | - name: Upload build errors 105 | uses: actions/upload-artifact@v4 106 | if: failure() 107 | with: 108 | name: ${{ matrix.name }} (cmake) 109 | path: | 110 | ../build/CMakeFiles/CMakeOutput.log 111 | ../build/CMakeFiles/CMakeError.log 112 | retention-days: 7 113 | -------------------------------------------------------------------------------- /.github/workflows/fuzz.yml: -------------------------------------------------------------------------------- 1 | name: OSS-Fuzz 2 | on: [pull_request] 3 | jobs: 4 | Fuzzing: 5 | runs-on: ubuntu-latest 6 | steps: 7 | - name: Build Fuzzers 8 | uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master 9 | with: 10 | oss-fuzz-project-name: 'zlib' 11 | dry-run: false 12 | 13 | - name: Run Fuzzers 14 | uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master 15 | with: 16 | oss-fuzz-project-name: 'zlib' 17 | fuzz-seconds: 300 18 | dry-run: false 19 | 20 | - name: Upload Crash 21 | uses: actions/upload-artifact@v4 22 | if: failure() 23 | with: 24 | name: artifacts 25 | path: ./out/artifacts 26 | -------------------------------------------------------------------------------- /.github/workflows/msys-cygwin.yml: -------------------------------------------------------------------------------- 1 | name: mingw/cygwin 2 | 3 | on: [push, pull_request] 4 | 5 | jobs: 6 | MSys: 7 | runs-on: windows-latest 8 | strategy: 9 | fail-fast: false 10 | matrix: 11 | sys: [mingw32, mingw64, ucrt64, clang64] 12 | name: MSys - ${{ matrix.sys }} 13 | defaults: 14 | run: 15 | shell: msys2 {0} 16 | steps: 17 | - name: Checkout 18 | uses: actions/checkout@v4 19 | with: 20 | fetch-depth: 0 21 | - name: Setup MSYS2 22 | uses: msys2/setup-msys2@v2 23 | with: 24 | msystem: ${{ matrix.sys }} 25 | update: true 26 | install: >- 27 | make 28 | pacboy: >- 29 | toolchain:p 30 | cmake:p 31 | - name: Configure 32 | run: | 33 | cmake -G"Unix Makefiles" \ 34 | -S . \ 35 | -B build \ 36 | -DCMAKE_VERBOSE_MAKEFILE=ON \ 37 | -DCMAKE_BUILD_TYPE=Release \ 38 | -DMINIZIP_ENABLE_BZIP2=ON 39 | - name: Build 40 | run: cmake --build build --config Release 41 | - name: Run tests 42 | run: ctest --output-on-failure --test-dir build -C Release 43 | 44 | cygwin: 45 | strategy: 46 | fail-fast: false 47 | runs-on: windows-latest 48 | defaults: 49 | run: 50 | shell: C:\cygwin\bin\bash.exe --login -o igncr '{0}' 51 | name: Cygwin 52 | steps: 53 | - name: Checkout 54 | uses: actions/checkout@v4 55 | with: 56 | fetch-depth: 0 57 | - name: Setup cygwin 58 | uses: cygwin/cygwin-install-action@master 59 | with: 60 | packages: >- 61 | cmake 62 | cygwin-devel 63 | gcc-core 64 | gcc-g++ 65 | ninja 66 | - name: Configure 67 | run: | 68 | cmake /cygdrive/d/a/zlib/zlib \ 69 | -B build \ 70 | -DCMAKE_BUILD_TYPE=Release \ 71 | -DZLIB_BUILD_MINIZIP=ON \ 72 | -DMINIZIP_ENABLE_BZIP2=OFF \ 73 | -G Ninja 74 | - name: Build 75 | run: cmake --build build --config Release -v -j1 76 | - name: Run tests 77 | run: ctest --output-on-failure --test-dir build -C Release 78 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.diff 2 | *.patch 3 | *.orig 4 | *.rej 5 | 6 | *~ 7 | *.a 8 | *.lo 9 | *.o 10 | *.dylib 11 | 12 | *.gcda 13 | *.gcno 14 | *.gcov 15 | 16 | /zconf.h 17 | /Makefile 18 | /example 19 | /example64 20 | /examplesh 21 | **/libz.so* 22 | /minigzip 23 | /minigzip64 24 | /minigzipsh 25 | /zlib.pc 26 | /configure.log 27 | /build 28 | 29 | .DS_Store 30 | .vs 31 | *.user 32 | *.nupkg 33 | contrib/vstudio/vc143/x86 34 | contrib/vstudio/vc143/x64 35 | contrib/vstudio/vc143/arm 36 | contrib/vstudio/vc143/arm64 37 | contrib/nuget/bin 38 | contrib/nuget/obj 39 | *.included 40 | 41 | # Bazel directories 42 | /bazel-* 43 | /bazel-bin 44 | /bazel-genfiles 45 | /bazel-out 46 | /bazel-testlogs 47 | user.bazelrc 48 | 49 | # MODULE.bazel.lock is ignored for now as per this recommendation: 50 | # https://github.com/bazelbuild/bazel/issues/20369 51 | MODULE.bazel.lock 52 | -------------------------------------------------------------------------------- /BUILD.bazel: -------------------------------------------------------------------------------- 1 | # Copied from https://github.com/bazelbuild/bazel-central-registry/tree/main/modules/zlib/1.3.1.bcr.4/patches 2 | # Adapted from https://github.com/protocolbuffers/protobuf/blob/master/third_party/zlib.BUILD 3 | 4 | # Copyright 2008 Google Inc. All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are 8 | # met: 9 | # 10 | # * Redistributions of source code must retain the above copyright 11 | # notice, this list of conditions and the following disclaimer. 12 | # * Redistributions in binary form must reproduce the above 13 | # copyright notice, this list of conditions and the following disclaimer 14 | # in the documentation and/or other materials provided with the 15 | # distribution. 16 | # * Neither the name of Google Inc. nor the names of its 17 | # contributors may be used to endorse or promote products derived from 18 | # this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | # 32 | # Code generated by the Protocol Buffer compiler is owned by the owner 33 | # of the input file used when generating it. This code is not 34 | # standalone and requires a support library to be linked with it. This 35 | # support library is itself covered by the above license. 36 | 37 | load("@rules_cc//cc:defs.bzl", "cc_library") 38 | load("@rules_license//rules:license.bzl", "license") 39 | 40 | package( 41 | default_applicable_licenses = [":license"], 42 | ) 43 | 44 | license( 45 | name = "license", 46 | license_kinds = ["@rules_license//licenses/spdx:Zlib"], 47 | license_text = "LICENSE", 48 | ) 49 | 50 | exports_files([ 51 | "LICENSE", 52 | ]) 53 | 54 | _ZLIB_HEADERS = [ 55 | "crc32.h", 56 | "deflate.h", 57 | "gzguts.h", 58 | "inffast.h", 59 | "inffixed.h", 60 | "inflate.h", 61 | "inftrees.h", 62 | "trees.h", 63 | "zconf.h", 64 | "zlib.h", 65 | "zutil.h", 66 | ] 67 | 68 | _ZLIB_PREFIXED_HEADERS = ["zlib/include/" + hdr for hdr in _ZLIB_HEADERS] 69 | 70 | # In order to limit the damage from the `includes` propagation 71 | # via `:zlib`, copy the public headers to a subdirectory and 72 | # expose those. 73 | genrule( 74 | name = "copy_public_headers", 75 | srcs = _ZLIB_HEADERS, 76 | outs = _ZLIB_PREFIXED_HEADERS, 77 | cmd_bash = "cp $(SRCS) $(@D)/zlib/include/", 78 | cmd_bat = " && ".join( 79 | ["@copy /Y \"$(location %s)\" \"$(@D)\\zlib\\include\\\" >NUL" % 80 | s for s in _ZLIB_HEADERS], 81 | ), 82 | ) 83 | 84 | config_setting( 85 | name = "mingw_gcc_compiler", 86 | flag_values = { 87 | "@bazel_tools//tools/cpp:compiler": "mingw-gcc", 88 | }, 89 | visibility = [":__subpackages__"], 90 | ) 91 | 92 | cc_library( 93 | name = "z", 94 | srcs = [ 95 | "adler32.c", 96 | "compress.c", 97 | "crc32.c", 98 | "deflate.c", 99 | "gzclose.c", 100 | "gzlib.c", 101 | "gzread.c", 102 | "gzwrite.c", 103 | "infback.c", 104 | "inffast.c", 105 | "inflate.c", 106 | "inftrees.c", 107 | "trees.c", 108 | "uncompr.c", 109 | "zutil.c", 110 | # Include the un-prefixed headers in srcs to work 111 | # around the fact that zlib isn't consistent in its 112 | # choice of <> or "" delimiter when including itself. 113 | ] + _ZLIB_HEADERS, 114 | hdrs = _ZLIB_PREFIXED_HEADERS, 115 | copts = select({ 116 | ":mingw_gcc_compiler": [ 117 | "-fpermissive", 118 | ], 119 | "@platforms//os:windows": [], 120 | "//conditions:default": [ 121 | "-Wno-deprecated-non-prototype", 122 | "-Wno-unused-variable", 123 | "-Wno-implicit-function-declaration", 124 | ], 125 | }), 126 | includes = ["zlib/include/"], 127 | visibility = ["//visibility:public"], 128 | ) 129 | 130 | alias( 131 | name = "zlib", 132 | actual = ":z", 133 | visibility = ["//visibility:public"], 134 | ) 135 | -------------------------------------------------------------------------------- /INDEX: -------------------------------------------------------------------------------- 1 | CMakeLists.txt cmake build file 2 | ChangeLog history of changes 3 | FAQ Frequently Asked Questions about zlib 4 | INDEX this file 5 | Makefile dummy Makefile that tells you to ./configure 6 | Makefile.in template for Unix Makefile 7 | README guess what 8 | configure configure script for Unix 9 | make_vms.com makefile for VMS 10 | test/example.c zlib usages examples for build testing 11 | test/minigzip.c minimal gzip-like functionality for build testing 12 | test/infcover.c inf*.c code coverage for build coverage testing 13 | treebuild.xml XML description of source file dependencies 14 | zconf.h.cmakein zconf.h template for cmake 15 | zconf.h.in zconf.h template for configure 16 | zlib.3 Man page for zlib 17 | zlib.3.pdf Man page in PDF format 18 | zlib.map Linux symbol information 19 | zlib.pc.in Template for pkg-config descriptor 20 | zlib.pc.cmakein zlib.pc template for cmake 21 | zlib2ansi perl script to convert source files for C++ compilation 22 | 23 | amiga/ makefiles for Amiga SAS C 24 | as400/ makefiles for AS/400 25 | doc/ documentation for formats and algorithms 26 | msdos/ makefiles for MSDOS 27 | nintendods/ makefile for Nintendo DS 28 | old/ makefiles for various architectures and zlib documentation 29 | files that have not yet been updated for zlib 1.2.x 30 | qnx/ makefiles for QNX 31 | watcom/ makefiles for OpenWatcom 32 | win32/ makefiles for Windows 33 | 34 | zlib public header files (required for library use): 35 | zconf.h 36 | zlib.h 37 | 38 | private source files used to build the zlib library: 39 | adler32.c 40 | compress.c 41 | crc32.c 42 | crc32.h 43 | deflate.c 44 | deflate.h 45 | gzclose.c 46 | gzguts.h 47 | gzlib.c 48 | gzread.c 49 | gzwrite.c 50 | infback.c 51 | inffast.c 52 | inffast.h 53 | inffixed.h 54 | inflate.c 55 | inflate.h 56 | inftrees.c 57 | inftrees.h 58 | trees.c 59 | trees.h 60 | uncompr.c 61 | zutil.c 62 | zutil.h 63 | 64 | source files for sample programs 65 | See examples/README.examples 66 | 67 | unsupported contributions by third parties 68 | See contrib/README.contrib 69 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright notice: 2 | 3 | (C) 1995-2024 Jean-loup Gailly and Mark Adler 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | 21 | Jean-loup Gailly Mark Adler 22 | jloup@gzip.org madler@alumni.caltech.edu 23 | -------------------------------------------------------------------------------- /MODULE.bazel: -------------------------------------------------------------------------------- 1 | module( 2 | name = "zlib", 3 | version = "0.0.0", 4 | compatibility_level = 1, 5 | ) 6 | 7 | bazel_dep(name = "platforms", version = "0.0.10") 8 | bazel_dep(name = "rules_cc", version = "0.0.16") 9 | bazel_dep(name = "rules_license", version = "1.0.0") 10 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | all: 2 | -@echo "Please use ./configure first. Thank you." 3 | 4 | distclean: 5 | make -f Makefile.in distclean 6 | -------------------------------------------------------------------------------- /README-cmake.md: -------------------------------------------------------------------------------- 1 | # For building with cmake at least version 3.12 (minizip 3.12) is needed 2 | 3 | In most cases the usual 4 | 5 | cmake -S . -B build -D CMAKE_BUILD_TYPE=Release 6 | 7 | will create everything you need, however if you want something off default you can adjust several options fit your needs. 8 | Every option is list below (excluding the cmake-standard options), they can be set via cmake-gui or on cmdline with 9 | 10 | -D