Zlib

Zlib is a general-purpose, lossless data-compression library used for ZIP and GZip functionality.

v0.0.4-2 Active
News About

Overview

Zlib is a general-purpose, lossless data-compression library used for ZIP and GZip functionality. It implements the DEFLATE compression algorithm and is one of the most widely used compression libraries in the world.

This repository contains a maintained fork of the upstream zlib project. The fork exists to allow controlled integration, CI validation, and long-term maintenance within the ProjT Launcher monorepo.


Usage in ProjT Launcher

Zlib is used for:

  • ZIP archive handling via QuaZip wrapper
  • PNG image compression for textures and assets
  • Network compression for mod downloads
  • NBT file compression for Minecraft world data

Documentation

Resource Location
API Reference zlib/zlib.h
FAQ zlib/FAQ
Change History zlib/ChangeLog
Original CMake README Upstream CMake documentation
Upstream Manual zlib.net/manual.html

Build Integration

Zlib is built as part of the ProjT Launcher build system. The upstream build systems are preserved for reference, but the primary build path uses our integrated CMake configuration.

CMake Options

# In the main CMakeLists.txt, zlib is included as a subdirectory
add_subdirectory(zlib)

# Link against zlib
target_link_libraries(your_target PRIVATE ZLIB::ZLIB)

Standalone Build

For development or testing purposes:

cd zlib
mkdir build && cd build
cmake ..
cmake --build .

For upstream-specific build instructions, see zlib.net.


Testing

Zlib includes its own test suite that is run as part of CI:

cd zlib/build
ctest -V

See ci-zlib.yml for CI configuration.