head     1.1;
branch   1.1.1;
access   ;
symbols  zlib-1-3-2:1.1.1.1 ZLIB:1.1.1;
locks    ; strict;
comment  @# @;


1.1
date     2026.05.03.16.34.35;  author christos;  state Exp;
branches 1.1.1.1;
next     ;
commitid        WC5vTA5Qzr0V6oEG;

1.1.1.1
date     2026.05.03.16.34.35;  author christos;  state Exp;
branches ;
next     ;
commitid        WC5vTA5Qzr0V6oEG;


desc
@@



1.1
log
@Initial revision
@
text
@cmake_minimum_required(VERSION 3.12...3.31)

#CMAKE_ARGV0 = ${CMAKE_COMMAND}
#CMAKE_ARGV1 = -P
#CMAKE_ARGV2 = ${CMAKE_CURRENT_SOURCE_DIR}/tester-cov.cmake
#CMAKE_ARGV3 = "$<TARGET_FILE:puff-test-cov>"
#CMAKE_ARGV4 = "${CMAKE_CURRENT_SOURCE_DIR}"
#CMAKE_ARGV5 = "${CMAKE_CURRENT_BINARY_DIR}"
#CMAKE_ARGV6 = GCOV_EXECUTABLE
#CMAKE_ARGV7 = GCOV_EXECUTABLE

function(puff_cov_test test_string expected_result)
    execute_process(COMMAND ${CMAKE_ARGV0} -E echo_append ${test_string}
                    COMMAND ${CMAKE_ARGV5}
                    COMMAND ${CMAKE_ARGV3}
                    RESULT_VARIABLE RESULT)

    if(NOT RESULT EQUAL expected_result)
        message(FATAL_ERROR "Received Exit-Code: ${RESULT}\n"
                            "Expected Exit-Code: ${expected_result}\n"
                            "Test-String: ${test_string}")
    endif(NOT RESULT EQUAL expected_result)
endfunction(puff_cov_test test_string expected_result)

execute_process(COMMAND ${CMAKE_ARGV3} -w ${CMAKE_ARGV4}/zeros.raw)

puff_cov_test("04" "2")
puff_cov_test("00" "2")
puff_cov_test("00 00 00 00 00" "254")
puff_cov_test("00 01 00 fe ff" "2")

execute_process(COMMAND ${CMAKE_ARGV0} -E echo_append "01 01 00 fe ff 0a"
                COMMAND ${CMAKE_ARGV5}
                COMMAND ${CMAKE_ARGV3})

puff_cov_test("02 7e ff ff" "246")
puff_cov_test("02" "2")
puff_cov_test("04 80 49 92 24 49 92 24 0f b4 ff ff c3 04" "2")
puff_cov_test("04 80 49 92 24 49 92 24 71 ff ff 93 11 00" "249")
puff_cov_test("04 c0 81 08 00 00 00 00 20 7f eb 0b 00 00" "246")

execute_process(COMMAND ${CMAKE_ARGV0} -E echo_append "0b 00 00"
                COMMAND ${CMAKE_ARGV5}
                COMMAND ${CMAKE_ARGV3})

puff_cov_test("1a 07" "246")
puff_cov_test("0c c0 81 00 00 00 00 00 90 ff 6b 04" "245")

execute_process(COMMAND ${CMAKE_ARGV3} -f ${CMAKE_ARGV4}/zeros.raw)

puff_cov_test("fc 00 00" "253")
puff_cov_test("04 00 fe ff" "252")
puff_cov_test("04 00 24 49" "251")
puff_cov_test("04 80 49 92 24 49 92 24 0f b4 ff ff c3 84" "248")
puff_cov_test("04 00 24 e9 ff ff" "250")
puff_cov_test("04 00 24 e9 ff 6d" "247")

execute_process(COMMAND ${CMAKE_ARGV6} ${CMAKE_ARGV7} -n puff.c.gcno)
@


1.1.1.1
log
@import zlib-1.3.2 (previous was 1.3.1)


Version 1.3.2 has these key updates from 1.3.1:

    Address findings of the 7ASecurity audit of zlib.
	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 --undefined option to ./configure for UBSan checker.
	Copy only the initialized deflate state in deflateCopy.
	Zero inflate state on allocation.
	Add compress_z and uncompress_z functions.
    Complete rewrite of cmake support.
    Remove untgz from contrib.
    Vectorize the CRC-32 calculation on the s390x.
    Remove vstudio projects in lieu of cmake-generated projects.
    Add zipAlreadyThere() to minizip zip.c to help avoid duplicates.
    Add deflateUsed() function to get the used bits in the last byte.
    Fix bug in inflatePrime() for 16-bit ints.
    Add a "G" option to force gzip, disabling transparency in gzread().
    Return all available uncompressed data on error in gzread.c.
    Support non-blocking devices in the gz* routines.
@
text
@@
