Import zlib-1.2.13, previous was 1.2.10
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
This commit is contained in:
parent
53c9f550ce
commit
ec47cc4ba8
|
@ -3,10 +3,7 @@ set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS ON)
|
|||
|
||||
project(zlib C)
|
||||
|
||||
set(VERSION "1.2.10")
|
||||
|
||||
option(ASM686 "Enable building i686 assembly implementation")
|
||||
option(AMD64 "Enable building amd64 assembly implementation")
|
||||
set(VERSION "1.2.13")
|
||||
|
||||
set(INSTALL_BIN_DIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "Installation directory for executables")
|
||||
set(INSTALL_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib" CACHE PATH "Installation directory for libraries")
|
||||
|
@ -129,39 +126,6 @@ if(NOT MINGW)
|
|||
)
|
||||
endif()
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCC)
|
||||
if(ASM686)
|
||||
set(ZLIB_ASMS contrib/asm686/match.S)
|
||||
elseif (AMD64)
|
||||
set(ZLIB_ASMS contrib/amd64/amd64-match.S)
|
||||
endif ()
|
||||
|
||||
if(ZLIB_ASMS)
|
||||
add_definitions(-DASMV)
|
||||
set_source_files_properties(${ZLIB_ASMS} PROPERTIES LANGUAGE C COMPILE_FLAGS -DNO_UNDERLINE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
if(ASM686)
|
||||
ENABLE_LANGUAGE(ASM_MASM)
|
||||
set(ZLIB_ASMS
|
||||
contrib/masmx86/inffas32.asm
|
||||
contrib/masmx86/match686.asm
|
||||
)
|
||||
elseif (AMD64)
|
||||
ENABLE_LANGUAGE(ASM_MASM)
|
||||
set(ZLIB_ASMS
|
||||
contrib/masmx64/gvmat64.asm
|
||||
contrib/masmx64/inffasx64.asm
|
||||
)
|
||||
endif()
|
||||
|
||||
if(ZLIB_ASMS)
|
||||
add_definitions(-DASMV -DASMINF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# parse the full version number from zlib.h and include in ZLIB_FULL_VERSION
|
||||
file(READ ${CMAKE_CURRENT_SOURCE_DIR}/zlib.h _zlib_h_contents)
|
||||
string(REGEX REPLACE ".*#define[ \t]+ZLIB_VERSION[ \t]+\"([-0-9A-Za-z.]+)\".*"
|
||||
|
@ -183,8 +147,8 @@ if(MINGW)
|
|||
set(ZLIB_DLL_SRCS ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj)
|
||||
endif(MINGW)
|
||||
|
||||
add_library(zlib SHARED ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
|
||||
add_library(zlibstatic STATIC ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
|
||||
add_library(zlib SHARED ${ZLIB_SRCS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
|
||||
add_library(zlibstatic STATIC ${ZLIB_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
|
||||
set_target_properties(zlib PROPERTIES DEFINE_SYMBOL ZLIB_DLL)
|
||||
set_target_properties(zlib PROPERTIES SOVERSION 1)
|
||||
|
||||
|
|
|
@ -1,6 +1,85 @@
|
|||
|
||||
ChangeLog file for zlib
|
||||
|
||||
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
|
||||
|
@ -92,7 +171,7 @@ Changes in 1.2.7.1 (24 Mar 2013)
|
|||
- 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
|
||||
- Suport i686 and amd64 assembler builds in CMakeLists.txt
|
||||
- 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
|
||||
|
@ -292,14 +371,14 @@ Changes in 1.2.5.1 (10 Sep 2011)
|
|||
- 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 indeterminancy
|
||||
- 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 assmebler code [Londer]
|
||||
- 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]
|
||||
|
||||
|
@ -507,7 +586,7 @@ Changes in 1.2.3.5 (8 Jan 2010)
|
|||
- 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 .
|
||||
- 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
|
||||
|
@ -681,7 +760,7 @@ Changes in 1.2.2.4 (11 July 2005)
|
|||
- 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.
|
||||
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]
|
||||
|
@ -717,7 +796,7 @@ Changes in 1.2.2.2 (30 December 2004)
|
|||
- 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.
|
||||
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
|
||||
|
@ -788,7 +867,7 @@ Changes in 1.2.1.1 (9 January 2004)
|
|||
- 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.
|
||||
- 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
|
||||
|
@ -966,7 +1045,7 @@ Changes in 1.2.0.1 (17 March 2003)
|
|||
- 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
|
||||
- Enchance comments in zlib.h on what happens if gzprintf() tries to
|
||||
- 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
|
||||
|
@ -1032,14 +1111,14 @@ Changes in 1.2.0 (9 March 2003)
|
|||
- 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.
|
||||
- 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.
|
||||
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).
|
||||
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
|
||||
|
@ -1113,7 +1192,7 @@ Changes in 1.1.1 (27 Feb 98)
|
|||
- 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.
|
||||
matches in deflate_slow
|
||||
- added msdos/Makefile.w32 for WIN32 Microsoft Visual C++ (Bob Frazier)
|
||||
|
||||
Changes in 1.1.0 (24 Feb 98)
|
||||
|
@ -1144,7 +1223,7 @@ Changes in 1.0.9 (17 Feb 1998)
|
|||
- 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)
|
||||
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)
|
||||
|
@ -1158,7 +1237,7 @@ Changes in 1.0.8 (27 Jan 1998)
|
|||
- 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".
|
||||
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
|
||||
|
@ -1197,12 +1276,12 @@ 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.
|
||||
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.
|
||||
- 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)
|
||||
|
@ -1214,7 +1293,7 @@ Changes in 1.0.6 (19 Jan 1998)
|
|||
- 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().
|
||||
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>
|
||||
|
@ -1222,7 +1301,7 @@ Changes in 1.0.6 (19 Jan 1998)
|
|||
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.
|
||||
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)
|
||||
|
||||
|
@ -1231,8 +1310,8 @@ Changes in 1.0.6 (19 Jan 1998)
|
|||
- 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.
|
||||
- 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
|
||||
|
@ -1245,7 +1324,7 @@ Changes in 1.0.6 (19 Jan 1998)
|
|||
- 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).
|
||||
- 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)
|
||||
|
@ -1255,7 +1334,7 @@ Changes in 1.0.6 (19 Jan 1998)
|
|||
- 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: ChangeLog,v 1.1.1.2 2017/01/10 00:25:29 christos Exp $. Use "rcs -kb" or "cvs admin -kb" to avoid Id expansion.
|
||||
- Avoid expanded $Id: ChangeLog,v 1.1.1.3 2022/10/15 19:38:37 christos Exp $. 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
|
||||
|
@ -1276,7 +1355,7 @@ Changes in 1.0.5 (3 Jan 98)
|
|||
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.
|
||||
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)
|
||||
|
@ -1306,7 +1385,7 @@ 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.
|
||||
- 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),
|
||||
|
@ -1327,7 +1406,7 @@ 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.
|
||||
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
|
||||
|
@ -1369,30 +1448,30 @@ Changes in 0.99 (27 Jan 96)
|
|||
- 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.
|
||||
- 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).
|
||||
- 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.
|
||||
- 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?).
|
||||
(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).
|
||||
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).
|
||||
(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).
|
||||
typedefs and because voidnp was not near in large model)
|
||||
|
||||
Changes in 0.94 (13 Aug 95)
|
||||
- support MSDOS medium model
|
||||
|
@ -1401,12 +1480,12 @@ Changes in 0.94 (13 Aug 95)
|
|||
- 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.
|
||||
- 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.
|
||||
- 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
|
||||
|
@ -1425,7 +1504,7 @@ Changes in 0.92 (3 May 95)
|
|||
- no memcpy on Pyramid
|
||||
- suppressed inftest.c
|
||||
- optimized fill_window, put longest_match inline for gcc
|
||||
- optimized inflate on stored blocks.
|
||||
- optimized inflate on stored blocks
|
||||
- untabify all sources to simplify patches
|
||||
|
||||
Changes in 0.91 (2 May 95)
|
||||
|
@ -1443,7 +1522,7 @@ Changes in 0.9 (1 May 95)
|
|||
- 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.
|
||||
- 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++
|
||||
|
@ -1452,7 +1531,7 @@ Changes in 0.9 (1 May 95)
|
|||
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.
|
||||
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
|
||||
|
@ -1462,50 +1541,50 @@ Changes in 0.8 (29 April 95)
|
|||
|
||||
Changes in 0.71 (14 April 95)
|
||||
- Fixed more MSDOS compilation problems :( There is still a bug with
|
||||
TurboC large model.
|
||||
TurboC large model
|
||||
|
||||
Changes in 0.7 (14 April 95)
|
||||
- Added full inflate support.
|
||||
- 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.
|
||||
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.
|
||||
- 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.
|
||||
- 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).
|
||||
- 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.
|
||||
not yet Z_FULL_FLUSH
|
||||
- support decompression but only in a single step (forced Z_FINISH)
|
||||
- added opaque object for zalloc and zfree.
|
||||
- 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.
|
||||
- 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.
|
||||
- avoid "zip" everywhere, use zlib instead of ziplib
|
||||
- suppress Z_BLOCK_FLUSH, interpret Z_PARTIAL_FLUSH as block flush
|
||||
if compression method == 8.
|
||||
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 the method parameter for deflateInit2
|
||||
- added inflateInit2
|
||||
- simplied considerably deflateInit and inflateInit by not supporting
|
||||
- simplified considerably deflateInit and inflateInit by not supporting
|
||||
user-provided history buffer. This is supported only in deflateInit2
|
||||
and inflateInit2.
|
||||
and inflateInit2
|
||||
|
||||
Changes in 0.3:
|
||||
- prefix all macro names with Z_
|
||||
- use Z_FINISH instead of deflateEnd to finish compression.
|
||||
- use Z_FINISH instead of deflateEnd to finish compression
|
||||
- added Z_HUFFMAN_ONLY
|
||||
- added gzerror()
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
Copyright notice:
|
||||
|
||||
(C) 1995-2022 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
|
|
@ -1,5 +1,5 @@
|
|||
# Makefile for zlib
|
||||
# Copyright (C) 1995-2016 Jean-loup Gailly, Mark Adler
|
||||
# Copyright (C) 1995-2017 Jean-loup Gailly, Mark Adler
|
||||
# For conditions of distribution and use, see copyright notice in zlib.h
|
||||
|
||||
# To compile and test, type:
|
||||
|
@ -7,10 +7,6 @@
|
|||
# Normally configure builds both a static and a shared library.
|
||||
# If you want to build just a static library, use: ./configure --static
|
||||
|
||||
# To use the asm code, type:
|
||||
# cp contrib/asm?86/match.S ./match.S
|
||||
# make LOC=-DASMV OBJA=match.o
|
||||
|
||||
# To install /usr/local/lib/libz.* and /usr/local/include/zlib.h, type:
|
||||
# make install
|
||||
# To install in $HOME instead of /usr/local, use:
|
||||
|
@ -26,13 +22,13 @@ CFLAGS=-O
|
|||
|
||||
SFLAGS=-O
|
||||
LDFLAGS=
|
||||
TEST_LDFLAGS=-L. libz.a
|
||||
TEST_LDFLAGS=$(LDFLAGS) -L. libz.a
|
||||
LDSHARED=$(CC)
|
||||
CPP=$(CC) -E
|
||||
|
||||
STATICLIB=libz.a
|
||||
SHAREDLIB=libz.so
|
||||
SHAREDLIBV=libz.so.1.2.10
|
||||
SHAREDLIBV=libz.so.1.2.13
|
||||
SHAREDLIBM=libz.so.1
|
||||
LIBS=$(STATICLIB) $(SHAREDLIBV)
|
||||
|
||||
|
@ -87,12 +83,12 @@ test: all teststatic testshared
|
|||
|
||||
teststatic: static
|
||||
@TMPST=tmpst_$$; \
|
||||
if echo hello world | ./minigzip | ./minigzip -d && ./example $$TMPST ; then \
|
||||
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
|
||||
fi
|
||||
@rm -f tmpst_$$
|
||||
|
||||
testshared: shared
|
||||
@LD_LIBRARY_PATH=`pwd`:$(LD_LIBRARY_PATH) ; export LD_LIBRARY_PATH; \
|
||||
|
@ -100,21 +96,21 @@ testshared: shared
|
|||
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 | ./minigzipsh | ./minigzipsh -d && ./examplesh $$TMPSH; then \
|
||||
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
|
||||
fi
|
||||
@rm -f tmpsh_$$
|
||||
|
||||
test64: all64
|
||||
@TMP64=tmp64_$$; \
|
||||
if echo hello world | ./minigzip64 | ./minigzip64 -d && ./example64 $$TMP64; then \
|
||||
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
|
||||
fi
|
||||
@rm -f tmp64_$$
|
||||
|
||||
infcover.o: $(SRCDIR)test/infcover.c $(SRCDIR)zlib.h zconf.h
|
||||
$(CC) $(CFLAGS) $(ZINCOUT) -c -o $@ $(SRCDIR)test/infcover.c
|
||||
|
@ -124,7 +120,7 @@ infcover: infcover.o libz.a
|
|||
|
||||
cover: infcover
|
||||
rm -f *.gcda
|
||||
./infcover
|
||||
${QEMU_RUN} ./infcover
|
||||
gcov inf*.c
|
||||
|
||||
libz.a: $(OBJS)
|
||||
|
@ -292,10 +288,10 @@ minigzip$(EXE): minigzip.o $(STATICLIB)
|
|||
$(CC) $(CFLAGS) -o $@ minigzip.o $(TEST_LDFLAGS)
|
||||
|
||||
examplesh$(EXE): example.o $(SHAREDLIBV)
|
||||
$(CC) $(CFLAGS) -o $@ example.o -L. $(SHAREDLIBV)
|
||||
$(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS) -L. $(SHAREDLIBV)
|
||||
|
||||
minigzipsh$(EXE): minigzip.o $(SHAREDLIBV)
|
||||
$(CC) $(CFLAGS) -o $@ minigzip.o -L. $(SHAREDLIBV)
|
||||
$(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS) -L. $(SHAREDLIBV)
|
||||
|
||||
example64$(EXE): example64.o $(STATICLIB)
|
||||
$(CC) $(CFLAGS) -o $@ example64.o $(TEST_LDFLAGS)
|
||||
|
@ -376,15 +372,13 @@ clean:
|
|||
rm -f contrib/infback9/*.gcda contrib/infback9/*.gcno contrib/infback9/*.gcov
|
||||
|
||||
maintainer-clean: distclean
|
||||
distclean: clean zconf zconf.h.cmakein docs
|
||||
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
|
||||
@if [ ! -f zconf.h.in ]; then rm -f zconf.h zconf.h.cmakein ; fi
|
||||
@if [ ! -f zlib.3 ]; then rm -f zlib.3.pdf ; fi
|
||||
|
||||
tags:
|
||||
etags $(SRCDIR)*.[ch]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
ZLIB DATA COMPRESSION LIBRARY
|
||||
|
||||
zlib 1.2.10 is a general purpose data compression library. All the code is
|
||||
zlib 1.2.13 is a general purpose data compression library. All the code is
|
||||
thread safe. The data format used by the zlib library is described by RFCs
|
||||
(Request for Comments) 1950 to 1952 in the files
|
||||
http://tools.ietf.org/html/rfc1950 (zlib format), rfc1951 (deflate format) and
|
||||
|
@ -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
|
||||
http://marknelson.us/1997/01/01/zlib-engine/ .
|
||||
|
||||
The changes made in version 1.2.10 are documented in the file ChangeLog.
|
||||
The changes made in version 1.2.13 are documented in the file ChangeLog.
|
||||
|
||||
Unsupported third party contributions are provided in directory contrib/ .
|
||||
|
||||
|
@ -84,7 +84,7 @@ Acknowledgments:
|
|||
|
||||
Copyright notice:
|
||||
|
||||
(C) 1995-2017 Jean-loup Gailly and Mark Adler
|
||||
(C) 1995-2022 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
|
||||
|
@ -108,7 +108,10 @@ Copyright notice:
|
|||
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.
|
||||
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
|
||||
|
|
|
@ -32,8 +32,11 @@ fi
|
|||
|
||||
# set command prefix for cross-compilation
|
||||
if [ -n "${CHOST}" ]; then
|
||||
uname="`echo "${CHOST}" | sed -e 's/^[^-]*-\([^-]*\)$/\1/' -e 's/^[^-]*-[^-]*-\([^-]*\)$/\1/' -e 's/^[^-]*-[^-]*-\([^-]*\)-.*$/\1/'`"
|
||||
uname=${CHOST}
|
||||
mname=${CHOST}
|
||||
CROSS_PREFIX="${CHOST}-"
|
||||
else
|
||||
mname=`(uname -a || echo unknown) 2>/dev/null`
|
||||
fi
|
||||
|
||||
# destination name for static library
|
||||
|
@ -87,6 +90,7 @@ build64=0
|
|||
gcc=0
|
||||
warn=0
|
||||
debug=0
|
||||
sanitize=0
|
||||
old_cc="$CC"
|
||||
old_cflags="$CFLAGS"
|
||||
OBJC='$(OBJZ) $(OBJG)'
|
||||
|
@ -137,6 +141,7 @@ case "$1" in
|
|||
-c* | --const) zconst=1; shift ;;
|
||||
-w* | --warn) warn=1; shift ;;
|
||||
-d* | --debug) debug=1; shift ;;
|
||||
--sanitize) sanitize=1; shift ;;
|
||||
*)
|
||||
echo "unknown option: $1" | tee -a configure.log
|
||||
echo "$0 --help for help" | tee -a configure.log
|
||||
|
@ -165,10 +170,17 @@ extern int getchar();
|
|||
int hello() {return getchar();}
|
||||
EOF
|
||||
|
||||
test -z "$CC" && echo Checking for ${CROSS_PREFIX}gcc... | tee -a configure.log
|
||||
cc=${CC-${CROSS_PREFIX}gcc}
|
||||
cflags=${CFLAGS-"-O3"}
|
||||
# to force the asm version use: CFLAGS="-O3 -DASMV" ./configure
|
||||
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 ;;
|
||||
*clang*) gcc=1 ;;
|
||||
|
@ -194,11 +206,14 @@ if test "$gcc" -eq 1 && ($cc -c $test.c) >> configure.log 2>&1; then
|
|||
fi
|
||||
if test "$warn" -eq 1; then
|
||||
if test "$zconst" -eq 1; then
|
||||
CFLAGS="${CFLAGS} -Wall -Wextra -Wcast-qual -pedantic -DZLIB_CONST"
|
||||
CFLAGS="${CFLAGS} -Wall -Wextra -Wcast-qual -DZLIB_CONST"
|
||||
else
|
||||
CFLAGS="${CFLAGS} -Wall -Wextra -pedantic"
|
||||
CFLAGS="${CFLAGS} -Wall -Wextra"
|
||||
fi
|
||||
fi
|
||||
if test $sanitize -eq 1; then
|
||||
CFLAGS="${CFLAGS} -g -fsanitize=address"
|
||||
fi
|
||||
if test $debug -eq 1; then
|
||||
CFLAGS="${CFLAGS} -DZLIB_DEBUG"
|
||||
SFLAGS="${SFLAGS} -DZLIB_DEBUG"
|
||||
|
@ -207,47 +222,52 @@ if test "$gcc" -eq 1 && ($cc -c $test.c) >> configure.log 2>&1; then
|
|||
uname=`(uname -s || echo unknown) 2>/dev/null`
|
||||
fi
|
||||
case "$uname" in
|
||||
Linux* | linux* | GNU | GNU/* | solaris*)
|
||||
Linux* | linux* | *-linux* | GNU | GNU/* | solaris*)
|
||||
case "$mname" in
|
||||
*sparc*)
|
||||
LDFLAGS="${LDFLAGS} -Wl,--no-warn-rwx-segments" ;;
|
||||
esac
|
||||
LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1,--version-script,${SRCDIR}zlib.map"} ;;
|
||||
*BSD | *bsd* | DragonFly)
|
||||
LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1,--version-script,${SRCDIR}zlib.map"}
|
||||
LDCONFIG="ldconfig -m" ;;
|
||||
CYGWIN* | Cygwin* | cygwin* | OS/2*)
|
||||
CYGWIN* | Cygwin* | cygwin* | *-cygwin* | OS/2*)
|
||||
EXE='.exe' ;;
|
||||
MINGW* | mingw*)
|
||||
# temporary bypass
|
||||
MINGW* | mingw* | *-mingw*)
|
||||
rm -f $test.[co] $test $test$shared_ext
|
||||
echo "Please use win32/Makefile.gcc instead." | tee -a configure.log
|
||||
leave 1
|
||||
echo "If this doesn't work for you, try win32/Makefile.gcc." | tee -a configure.log
|
||||
LDSHARED=${LDSHARED-"$cc -shared"}
|
||||
LDSHAREDLIBC=""
|
||||
EXE='.exe' ;;
|
||||
QNX*) # This is for QNX6. I suppose that the QNX rule below is for QNX2,QNX4
|
||||
# (alain.bonnefoy@icbt.com)
|
||||
LDSHARED=${LDSHARED-"$cc -shared -Wl,-hlibz.so.1"} ;;
|
||||
QNX*) # This is for QNX6. I suppose that the QNX rule below is for QNX2,QNX4
|
||||
# (alain.bonnefoy@icbt.com)
|
||||
LDSHARED=${LDSHARED-"$cc -shared -Wl,-hlibz.so.1"} ;;
|
||||
HP-UX*)
|
||||
LDSHARED=${LDSHARED-"$cc -shared $SFLAGS"}
|
||||
case `(uname -m || echo unknown) 2>/dev/null` in
|
||||
ia64)
|
||||
shared_ext='.so'
|
||||
SHAREDLIB='libz.so' ;;
|
||||
*)
|
||||
shared_ext='.sl'
|
||||
SHAREDLIB='libz.sl' ;;
|
||||
esac ;;
|
||||
Darwin* | darwin*)
|
||||
shared_ext='.dylib'
|
||||
SHAREDLIB=libz$shared_ext
|
||||
SHAREDLIBV=libz.$VER$shared_ext
|
||||
SHAREDLIBM=libz.$VER1$shared_ext
|
||||
LDSHARED=${LDSHARED-"$cc -dynamiclib -install_name $libdir/$SHAREDLIBM -compatibility_version $VER1 -current_version $VER3"}
|
||||
if libtool -V 2>&1 | grep Apple > /dev/null; then
|
||||
AR="libtool"
|
||||
else
|
||||
AR="/usr/bin/libtool"
|
||||
fi
|
||||
ARFLAGS="-o" ;;
|
||||
*) LDSHARED=${LDSHARED-"$cc -shared"} ;;
|
||||
LDSHARED=${LDSHARED-"$cc -shared $SFLAGS"}
|
||||
case `(uname -m || echo unknown) 2>/dev/null` in
|
||||
ia64)
|
||||
shared_ext='.so'
|
||||
SHAREDLIB='libz.so' ;;
|
||||
*)
|
||||
shared_ext='.sl'
|
||||
SHAREDLIB='libz.sl' ;;
|
||||
esac ;;
|
||||
AIX*)
|
||||
LDFLAGS="${LDFLAGS} -Wl,-brtl" ;;
|
||||
Darwin* | darwin* | *-darwin*)
|
||||
shared_ext='.dylib'
|
||||
SHAREDLIB=libz$shared_ext
|
||||
SHAREDLIBV=libz.$VER$shared_ext
|
||||
SHAREDLIBM=libz.$VER1$shared_ext
|
||||
LDSHARED=${LDSHARED-"$cc -dynamiclib -install_name $libdir/$SHAREDLIBM -compatibility_version $VER1 -current_version $VER3"}
|
||||
if libtool -V 2>&1 | grep Apple > /dev/null; then
|
||||
AR="libtool"
|
||||
else
|
||||
AR="/usr/bin/libtool"
|
||||
fi
|
||||
ARFLAGS="-o" ;;
|
||||
*)
|
||||
LDSHARED=${LDSHARED-"$cc -shared"} ;;
|
||||
esac
|
||||
else
|
||||
# find system name and corresponding cc options
|
||||
|
@ -367,8 +387,11 @@ else
|
|||
try()
|
||||
{
|
||||
show $*
|
||||
( $* ) >> configure.log 2>&1
|
||||
got=`( $* ) 2>&1`
|
||||
ret=$?
|
||||
if test "$got" != ""; then
|
||||
printf "%s\n" "$got" >> configure.log
|
||||
fi
|
||||
if test $ret -ne 0; then
|
||||
echo "(exit code "$ret")" >> configure.log
|
||||
fi
|
||||
|
@ -381,8 +404,11 @@ tryboth()
|
|||
show $*
|
||||
got=`( $* ) 2>&1`
|
||||
ret=$?
|
||||
printf %s "$got" >> configure.log
|
||||
if test "$got" != ""; then
|
||||
printf "%s\n" "$got" >> configure.log
|
||||
fi
|
||||
if test $ret -ne 0; then
|
||||
echo "(exit code "$ret")" >> configure.log
|
||||
return $ret
|
||||
fi
|
||||
test "$got" = ""
|
||||
|
@ -433,20 +459,6 @@ else
|
|||
TEST="all teststatic testshared"
|
||||
fi
|
||||
|
||||
# check for underscores in external names for use by assembler code
|
||||
CPP=${CPP-"$CC -E"}
|
||||
case $CFLAGS in
|
||||
*ASMV*)
|
||||
echo >> configure.log
|
||||
show "$NM $test.o | grep _hello"
|
||||
if test "`$NM $test.o | grep _hello | tee -a configure.log`" = ""; then
|
||||
CPP="$CPP -DNO_UNDERLINE"
|
||||
echo Checking for underline in external names... No. | tee -a configure.log
|
||||
else
|
||||
echo Checking for underline in external names... Yes. | tee -a configure.log
|
||||
fi ;;
|
||||
esac
|
||||
|
||||
echo >> configure.log
|
||||
|
||||
# check for size_t
|
||||
|
@ -457,17 +469,11 @@ size_t dummy = 0;
|
|||
EOF
|
||||
if try $CC -c $CFLAGS $test.c; then
|
||||
echo "Checking for size_t... Yes." | tee -a configure.log
|
||||
need_sizet=0
|
||||
else
|
||||
echo "Checking for size_t... No." | tee -a configure.log
|
||||
need_sizet=1
|
||||
fi
|
||||
|
||||
echo >> configure.log
|
||||
|
||||
# find the size_t integer type, if needed
|
||||
if test $need_sizet -eq 1; then
|
||||
cat > $test.c <<EOF
|
||||
# find a size_t integer type
|
||||
# check for long long
|
||||
cat > $test.c << EOF
|
||||
long long dummy = 0;
|
||||
EOF
|
||||
if try $CC -c $CFLAGS $test.c; then
|
||||
|
@ -495,17 +501,13 @@ EOF
|
|||
if try $CC $CFLAGS -o $test $test.c; then
|
||||
sizet=`./$test`
|
||||
echo "Checking for a pointer-size integer type..." $sizet"." | tee -a configure.log
|
||||
CFLAGS="${CFLAGS} -DNO_SIZE_T=${sizet}"
|
||||
SFLAGS="${SFLAGS} -DNO_SIZE_T=${sizet}"
|
||||
else
|
||||
echo "Failed to find a pointer-size integer type." | tee -a configure.log
|
||||
leave 1
|
||||
echo "Checking for a pointer-size integer type... not found." | tee -a configure.log
|
||||
fi
|
||||
fi
|
||||
|
||||
if test $need_sizet -eq 1; then
|
||||
CFLAGS="${CFLAGS} -DNO_SIZE_T=${sizet}"
|
||||
SFLAGS="${SFLAGS} -DNO_SIZE_T=${sizet}"
|
||||
fi
|
||||
|
||||
echo >> configure.log
|
||||
|
||||
# check for large file support, and if none, check for fseeko()
|
||||
|
@ -849,7 +851,6 @@ echo SHAREDLIBV = $SHAREDLIBV >> configure.log
|
|||
echo STATICLIB = $STATICLIB >> configure.log
|
||||
echo TEST = $TEST >> configure.log
|
||||
echo VER = $VER >> configure.log
|
||||
echo Z_U4 = $Z_U4 >> configure.log
|
||||
echo SRCDIR = $SRCDIR >> configure.log
|
||||
echo exec_prefix = $exec_prefix >> configure.log
|
||||
echo includedir = $includedir >> configure.log
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
All files under this contrib directory are UNSUPPORTED. There were
|
||||
All files under this contrib directory are UNSUPPORTED. They were
|
||||
provided by users of zlib and were not tested by the authors of zlib.
|
||||
Use at your own risk. Please contact the authors of the contributions
|
||||
for help about these, not the zlib authors. Thanks.
|
||||
|
@ -8,14 +8,6 @@ ada/ by Dmitriy Anisimkov <anisimkov@yahoo.com>
|
|||
Support for Ada
|
||||
See http://zlib-ada.sourceforge.net/
|
||||
|
||||
amd64/ by Mikhail Teterin <mi@ALDAN.algebra.com>
|
||||
asm code for AMD64
|
||||
See patch at http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/96393
|
||||
|
||||
asm686/ by Brian Raiter <breadbox@muppetlabs.com>
|
||||
asm code for Pentium and PPro/PII, using the AT&T (GNU as) syntax
|
||||
See http://www.muppetlabs.com/~breadbox/software/assembly.html
|
||||
|
||||
blast/ by Mark Adler <madler@alumni.caltech.edu>
|
||||
Decompressor for output of PKWare Data Compression Library (DCL)
|
||||
|
||||
|
@ -32,9 +24,6 @@ gcc_gvmat64/by Gilles Vollant <info@winimage.com>
|
|||
infback9/ by Mark Adler <madler@alumni.caltech.edu>
|
||||
Unsupported diffs to infback to decode the deflate64 format
|
||||
|
||||
inflate86/ by Chris Anderson <christop@charm.net>
|
||||
Tuned x86 gcc asm code to replace inflate_fast()
|
||||
|
||||
iostream/ by Kevin Ruland <kevin@rodin.wustl.edu>
|
||||
A C++ I/O streams interface to the zlib gz* functions
|
||||
|
||||
|
@ -45,16 +34,6 @@ iostream3/ by Ludwig Schwardt <schwardt@sun.ac.za>
|
|||
and Kevin Ruland <kevin@rodin.wustl.edu>
|
||||
Yet another C++ I/O streams interface
|
||||
|
||||
masmx64/ by Gilles Vollant <info@winimage.com>
|
||||
x86 64-bit (AMD64 and Intel EM64t) code for x64 assembler to
|
||||
replace longest_match() and inflate_fast(), also masm x86
|
||||
64-bits translation of Chris Anderson inflate_fast()
|
||||
|
||||
masmx86/ by Gilles Vollant <info@winimage.com>
|
||||
x86 asm code to replace longest_match() and inflate_fast(),
|
||||
for Visual C++ and MASM (32 bits).
|
||||
Based on Brian Raiter (asm686) and Chris Anderson (inflate86)
|
||||
|
||||
minizip/ by Gilles Vollant <info@winimage.com>
|
||||
Mini zip and unzip based on zlib
|
||||
Includes Zip64 support by Mathias Svensson <mathias@result42.com>
|
||||
|
|
|
@ -57,7 +57,7 @@ int blast(blast_in infun, void *inhow, blast_out outfun, void *outhow,
|
|||
* use by the application to pass an input descriptor to infun(), if desired.
|
||||
*
|
||||
* If left and in are not NULL and *left is not zero when blast() is called,
|
||||
* then the *left bytes are *in are consumed for input before infun() is used.
|
||||
* then the *left bytes at *in are consumed for input before infun() is used.
|
||||
*
|
||||
* The output function is invoked: err = outfun(how, buf, len), where the bytes
|
||||
* to be written are buf[0..len-1]. If err is not zero, then blast() returns
|
||||
|
|
|
@ -152,7 +152,7 @@ procedure DecompressToUserBuf(const InBuf: Pointer; InBytes: Integer;
|
|||
const OutBuf: Pointer; BufSize: Integer);
|
||||
|
||||
const
|
||||
zlib_version = '1.2.10';
|
||||
zlib_version = '1.2.13';
|
||||
|
||||
type
|
||||
EZlibError = class(Exception);
|
||||
|
|
|
@ -156,7 +156,7 @@ namespace DotZLibTests
|
|||
public void Info_Version()
|
||||
{
|
||||
Info info = new Info();
|
||||
Assert.AreEqual("1.2.10", Info.Version);
|
||||
Assert.AreEqual("1.2.13", Info.Version);
|
||||
Assert.AreEqual(32, info.SizeOfUInt);
|
||||
Assert.AreEqual(32, info.SizeOfULong);
|
||||
Assert.AreEqual(32, info.SizeOfPointer);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* inftree9.c -- generate Huffman trees for efficient decoding
|
||||
* Copyright (C) 1995-2017 Mark Adler
|
||||
* Copyright (C) 1995-2022 Mark Adler
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
|||
#define MAXBITS 15
|
||||
|
||||
const char inflate9_copyright[] =
|
||||
" inflate9 1.2.10 Copyright 1995-2017 Mark Adler ";
|
||||
" inflate9 1.2.13 Copyright 1995-2022 Mark Adler ";
|
||||
/*
|
||||
If you use the zlib library in a product, an acknowledgment is welcome
|
||||
in the documentation of your product. If for some reason you cannot
|
||||
|
@ -64,7 +64,7 @@ unsigned short FAR *work;
|
|||
static const unsigned short lext[31] = { /* Length codes 257..285 extra */
|
||||
128, 128, 128, 128, 128, 128, 128, 128, 129, 129, 129, 129,
|
||||
130, 130, 130, 130, 131, 131, 131, 131, 132, 132, 132, 132,
|
||||
133, 133, 133, 133, 144, 192, 202};
|
||||
133, 133, 133, 133, 144, 194, 65};
|
||||
static const unsigned short dbase[32] = { /* Distance codes 0..31 base */
|
||||
1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49,
|
||||
65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073,
|
||||
|
|
|
@ -38,7 +38,7 @@ typedef struct {
|
|||
/* Maximum size of the dynamic table. The maximum number of code structures is
|
||||
1446, which is the sum of 852 for literal/length codes and 594 for distance
|
||||
codes. These values were found by exhaustive searches using the program
|
||||
examples/enough.c found in the zlib distribtution. The arguments to that
|
||||
examples/enough.c found in the zlib distribution. The arguments to that
|
||||
program are the number of symbols, the initial root table size, and the
|
||||
maximum bit length of a code. "enough 286 9 15" for literal/length codes
|
||||
returns returns 852, and "enough 32 6 15" for distance codes returns 594.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
CC=cc
|
||||
CFLAGS=-O -I../..
|
||||
CFLAGS := $(CFLAGS) -O -I../..
|
||||
|
||||
UNZ_OBJS = miniunz.o unzip.o ioapi.o ../../libz.a
|
||||
ZIP_OBJS = minizip.o zip.o ioapi.o ../../libz.a
|
||||
|
@ -16,10 +16,14 @@ minizip: $(ZIP_OBJS)
|
|||
$(CC) $(CFLAGS) -o $@ $(ZIP_OBJS)
|
||||
|
||||
test: miniunz minizip
|
||||
./minizip test readme.txt
|
||||
@rm -f test.*
|
||||
@echo hello hello hello > test.txt
|
||||
./minizip test test.txt
|
||||
./miniunz -l test.zip
|
||||
mv readme.txt readme.old
|
||||
@mv test.txt test.old
|
||||
./miniunz test.zip
|
||||
@cmp test.txt test.old
|
||||
@rm -f test.*
|
||||
|
||||
clean:
|
||||
/bin/rm -f *.o *~ minizip miniunz
|
||||
/bin/rm -f *.o *~ minizip miniunz test.*
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# -*- Autoconf -*-
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_INIT([minizip], [1.2.10], [bugzilla.redhat.com])
|
||||
AC_INIT([minizip], [1.2.13], [bugzilla.redhat.com])
|
||||
AC_CONFIG_SRCDIR([minizip.c])
|
||||
AM_INIT_AUTOMAKE([foreign])
|
||||
LT_INIT
|
||||
|
|
|
@ -38,6 +38,7 @@ static int decrypt_byte(unsigned long* pkeys, const z_crc_t* pcrc_32_tab)
|
|||
* unpredictable manner on 16-bit systems; not a problem
|
||||
* with any known compiler so far, though */
|
||||
|
||||
(void)pcrc_32_tab;
|
||||
temp = ((unsigned)(*(pkeys+2)) & 0xffff) | 2;
|
||||
return (int)(((temp * (temp ^ 1)) >> 8) & 0xff);
|
||||
}
|
||||
|
@ -77,24 +78,24 @@ static void init_keys(const char* passwd,unsigned long* pkeys,const z_crc_t* pcr
|
|||
(update_keys(pkeys,pcrc_32_tab,c ^= decrypt_byte(pkeys,pcrc_32_tab)))
|
||||
|
||||
#define zencode(pkeys,pcrc_32_tab,c,t) \
|
||||
(t=decrypt_byte(pkeys,pcrc_32_tab), update_keys(pkeys,pcrc_32_tab,c), t^(c))
|
||||
(t=decrypt_byte(pkeys,pcrc_32_tab), update_keys(pkeys,pcrc_32_tab,c), (Byte)t^(c))
|
||||
|
||||
#ifdef INCLUDECRYPTINGCODE_IFCRYPTALLOWED
|
||||
|
||||
#define RAND_HEAD_LEN 12
|
||||
/* "last resort" source for second part of crypt seed pattern */
|
||||
# ifndef ZCR_SEED2
|
||||
# define ZCR_SEED2 3141592654UL /* use PI as default pattern */
|
||||
# define ZCR_SEED2 3141592654UL /* use PI as default pattern */
|
||||
# endif
|
||||
|
||||
static int crypthead(const char* passwd, /* password string */
|
||||
unsigned char* buf, /* where to write header */
|
||||
int bufSize,
|
||||
unsigned long* pkeys,
|
||||
const z_crc_t* pcrc_32_tab,
|
||||
unsigned long crcForCrypting)
|
||||
static unsigned crypthead(const char* passwd, /* password string */
|
||||
unsigned char* buf, /* where to write header */
|
||||
int bufSize,
|
||||
unsigned long* pkeys,
|
||||
const z_crc_t* pcrc_32_tab,
|
||||
unsigned long crcForCrypting)
|
||||
{
|
||||
int n; /* index in random header */
|
||||
unsigned n; /* index in random header */
|
||||
int t; /* temporary */
|
||||
int c; /* random byte */
|
||||
unsigned char header[RAND_HEAD_LEN-2]; /* random header */
|
||||
|
|
|
@ -58,7 +58,7 @@ ZPOS64_T call_ztell64 (const zlib_filefunc64_32_def* pfilefunc,voidpf filestream
|
|||
return (*(pfilefunc->zfile_func64.ztell64_file)) (pfilefunc->zfile_func64.opaque,filestream);
|
||||
else
|
||||
{
|
||||
uLong tell_uLong = (*(pfilefunc->ztell32_file))(pfilefunc->zfile_func64.opaque,filestream);
|
||||
uLong tell_uLong = (uLong)(*(pfilefunc->ztell32_file))(pfilefunc->zfile_func64.opaque,filestream);
|
||||
if ((tell_uLong) == MAXU32)
|
||||
return (ZPOS64_T)-1;
|
||||
else
|
||||
|
@ -96,6 +96,7 @@ static voidpf ZCALLBACK fopen_file_func (voidpf opaque, const char* filename, in
|
|||
{
|
||||
FILE* file = NULL;
|
||||
const char* mode_fopen = NULL;
|
||||
(void)opaque;
|
||||
if ((mode & ZLIB_FILEFUNC_MODE_READWRITEFILTER)==ZLIB_FILEFUNC_MODE_READ)
|
||||
mode_fopen = "rb";
|
||||
else
|
||||
|
@ -114,6 +115,7 @@ static voidpf ZCALLBACK fopen64_file_func (voidpf opaque, const void* filename,
|
|||
{
|
||||
FILE* file = NULL;
|
||||
const char* mode_fopen = NULL;
|
||||
(void)opaque;
|
||||
if ((mode & ZLIB_FILEFUNC_MODE_READWRITEFILTER)==ZLIB_FILEFUNC_MODE_READ)
|
||||
mode_fopen = "rb";
|
||||
else
|
||||
|
@ -132,6 +134,7 @@ static voidpf ZCALLBACK fopen64_file_func (voidpf opaque, const void* filename,
|
|||
static uLong ZCALLBACK fread_file_func (voidpf opaque, voidpf stream, void* buf, uLong size)
|
||||
{
|
||||
uLong ret;
|
||||
(void)opaque;
|
||||
ret = (uLong)fread(buf, 1, (size_t)size, (FILE *)stream);
|
||||
return ret;
|
||||
}
|
||||
|
@ -139,6 +142,7 @@ static uLong ZCALLBACK fread_file_func (voidpf opaque, voidpf stream, void* buf,
|
|||
static uLong ZCALLBACK fwrite_file_func (voidpf opaque, voidpf stream, const void* buf, uLong size)
|
||||
{
|
||||
uLong ret;
|
||||
(void)opaque;
|
||||
ret = (uLong)fwrite(buf, 1, (size_t)size, (FILE *)stream);
|
||||
return ret;
|
||||
}
|
||||
|
@ -146,6 +150,7 @@ static uLong ZCALLBACK fwrite_file_func (voidpf opaque, voidpf stream, const voi
|
|||
static long ZCALLBACK ftell_file_func (voidpf opaque, voidpf stream)
|
||||
{
|
||||
long ret;
|
||||
(void)opaque;
|
||||
ret = ftell((FILE *)stream);
|
||||
return ret;
|
||||
}
|
||||
|
@ -154,7 +159,8 @@ static long ZCALLBACK ftell_file_func (voidpf opaque, voidpf stream)
|
|||
static ZPOS64_T ZCALLBACK ftell64_file_func (voidpf opaque, voidpf stream)
|
||||
{
|
||||
ZPOS64_T ret;
|
||||
ret = FTELLO_FUNC((FILE *)stream);
|
||||
(void)opaque;
|
||||
ret = (ZPOS64_T)FTELLO_FUNC((FILE *)stream);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -162,6 +168,7 @@ static long ZCALLBACK fseek_file_func (voidpf opaque, voidpf stream, uLong offs
|
|||
{
|
||||
int fseek_origin=0;
|
||||
long ret;
|
||||
(void)opaque;
|
||||
switch (origin)
|
||||
{
|
||||
case ZLIB_FILEFUNC_SEEK_CUR :
|
||||
|
@ -176,7 +183,7 @@ static long ZCALLBACK fseek_file_func (voidpf opaque, voidpf stream, uLong offs
|
|||
default: return -1;
|
||||
}
|
||||
ret = 0;
|
||||
if (fseek((FILE *)stream, offset, fseek_origin) != 0)
|
||||
if (fseek((FILE *)stream, (long)offset, fseek_origin) != 0)
|
||||
ret = -1;
|
||||
return ret;
|
||||
}
|
||||
|
@ -185,6 +192,7 @@ static long ZCALLBACK fseek64_file_func (voidpf opaque, voidpf stream, ZPOS64_T
|
|||
{
|
||||
int fseek_origin=0;
|
||||
long ret;
|
||||
(void)opaque;
|
||||
switch (origin)
|
||||
{
|
||||
case ZLIB_FILEFUNC_SEEK_CUR :
|
||||
|
@ -200,7 +208,7 @@ static long ZCALLBACK fseek64_file_func (voidpf opaque, voidpf stream, ZPOS64_T
|
|||
}
|
||||
ret = 0;
|
||||
|
||||
if(FSEEKO_FUNC((FILE *)stream, offset, fseek_origin) != 0)
|
||||
if(FSEEKO_FUNC((FILE *)stream, (z_off_t)offset, fseek_origin) != 0)
|
||||
ret = -1;
|
||||
|
||||
return ret;
|
||||
|
@ -210,6 +218,7 @@ static long ZCALLBACK fseek64_file_func (voidpf opaque, voidpf stream, ZPOS64_T
|
|||
static int ZCALLBACK fclose_file_func (voidpf opaque, voidpf stream)
|
||||
{
|
||||
int ret;
|
||||
(void)opaque;
|
||||
ret = fclose((FILE *)stream);
|
||||
return ret;
|
||||
}
|
||||
|
@ -217,6 +226,7 @@ static int ZCALLBACK fclose_file_func (voidpf opaque, voidpf stream)
|
|||
static int ZCALLBACK ferror_file_func (voidpf opaque, voidpf stream)
|
||||
{
|
||||
int ret;
|
||||
(void)opaque;
|
||||
ret = ferror((FILE *)stream);
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
#define ftello64 ftell
|
||||
#define fseeko64 fseek
|
||||
#else
|
||||
#ifdef __FreeBSD__
|
||||
#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
|
||||
#define fopen64 fopen
|
||||
#define ftello64 ftello
|
||||
#define fseeko64 fseeko
|
||||
|
@ -91,8 +91,7 @@ typedef 64BIT_INT_CUSTOM_TYPE ZPOS64_T;
|
|||
typedef uint64_t ZPOS64_T;
|
||||
#else
|
||||
|
||||
/* Maximum unsigned 32-bit value used as placeholder for zip64 */
|
||||
#define MAXU32 0xffffffff
|
||||
|
||||
|
||||
#if defined(_MSC_VER) || defined(__BORLANDC__)
|
||||
typedef unsigned __int64 ZPOS64_T;
|
||||
|
@ -102,7 +101,10 @@ typedef unsigned long long int ZPOS64_T;
|
|||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
/* Maximum unsigned 32-bit value used as placeholder for zip64 */
|
||||
#ifndef MAXU32
|
||||
#define MAXU32 (0xffffffff)
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
|
|
@ -28,6 +28,11 @@
|
|||
|
||||
// see Include/shared/winapifamily.h in the Windows Kit
|
||||
#if defined(WINAPI_FAMILY_PARTITION) && (!(defined(IOWIN32_USING_WINRT_API)))
|
||||
|
||||
#if !defined(WINAPI_FAMILY_ONE_PARTITION)
|
||||
#define WINAPI_FAMILY_ONE_PARTITION(PartitionSet, Partition) ((WINAPI_FAMILY & PartitionSet) == Partition)
|
||||
#endif
|
||||
|
||||
#if WINAPI_FAMILY_ONE_PARTITION(WINAPI_FAMILY, WINAPI_PARTITION_APP)
|
||||
#define IOWIN32_USING_WINRT_API 1
|
||||
#endif
|
||||
|
|
|
@ -45,6 +45,7 @@
|
|||
#include <time.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
# include <direct.h>
|
||||
|
@ -80,7 +81,7 @@
|
|||
filename : the filename of the file where date/time must be modified
|
||||
dosdate : the new date at the MSDos format (4 bytes)
|
||||
tmu_date : the SAME new date at the tm_unz format */
|
||||
void change_file_date(filename,dosdate,tmu_date)
|
||||
static void change_file_date(filename,dosdate,tmu_date)
|
||||
const char *filename;
|
||||
uLong dosdate;
|
||||
tm_unz tmu_date;
|
||||
|
@ -97,7 +98,8 @@ void change_file_date(filename,dosdate,tmu_date)
|
|||
SetFileTime(hFile,&ftm,&ftLastAcc,&ftm);
|
||||
CloseHandle(hFile);
|
||||
#else
|
||||
#ifdef unix || __APPLE__
|
||||
#if defined(unix) || defined(__APPLE__)
|
||||
(void)dosdate;
|
||||
struct utimbuf ut;
|
||||
struct tm newdate;
|
||||
newdate.tm_sec = tmu_date.tm_sec;
|
||||
|
@ -121,7 +123,7 @@ void change_file_date(filename,dosdate,tmu_date)
|
|||
/* mymkdir and change_file_date are not 100 % portable
|
||||
As I don't know well Unix, I wait feedback for the unix portion */
|
||||
|
||||
int mymkdir(dirname)
|
||||
static int mymkdir(dirname)
|
||||
const char* dirname;
|
||||
{
|
||||
int ret=0;
|
||||
|
@ -135,14 +137,14 @@ int mymkdir(dirname)
|
|||
return ret;
|
||||
}
|
||||
|
||||
int makedir (newdir)
|
||||
char *newdir;
|
||||
static int makedir (newdir)
|
||||
const char *newdir;
|
||||
{
|
||||
char *buffer ;
|
||||
char *p;
|
||||
int len = (int)strlen(newdir);
|
||||
size_t len = strlen(newdir);
|
||||
|
||||
if (len <= 0)
|
||||
if (len == 0)
|
||||
return 0;
|
||||
|
||||
buffer = (char*)malloc(len+1);
|
||||
|
@ -185,13 +187,13 @@ int makedir (newdir)
|
|||
return 1;
|
||||
}
|
||||
|
||||
void do_banner()
|
||||
static void do_banner()
|
||||
{
|
||||
printf("MiniUnz 1.01b, demo of zLib + Unz package written by Gilles Vollant\n");
|
||||
printf("more info at http://www.winimage.com/zLibDll/unzip.html\n\n");
|
||||
}
|
||||
|
||||
void do_help()
|
||||
static void do_help()
|
||||
{
|
||||
printf("Usage : miniunz [-e] [-x] [-v] [-l] [-o] [-p password] file.zip [file_to_extr.] [-d extractdir]\n\n" \
|
||||
" -e Extract without pathname (junk paths)\n" \
|
||||
|
@ -203,7 +205,7 @@ void do_help()
|
|||
" -p extract crypted file using password\n\n");
|
||||
}
|
||||
|
||||
void Display64BitsSize(ZPOS64_T n, int size_char)
|
||||
static void Display64BitsSize(ZPOS64_T n, int size_char)
|
||||
{
|
||||
/* to avoid compatibility problem , we do here the conversion */
|
||||
char number[21];
|
||||
|
@ -231,7 +233,7 @@ void Display64BitsSize(ZPOS64_T n, int size_char)
|
|||
printf("%s",&number[pos_string]);
|
||||
}
|
||||
|
||||
int do_list(uf)
|
||||
static int do_list(uf)
|
||||
unzFile uf;
|
||||
{
|
||||
uLong i;
|
||||
|
@ -309,7 +311,7 @@ int do_list(uf)
|
|||
}
|
||||
|
||||
|
||||
int do_extract_currentfile(uf,popt_extract_without_path,popt_overwrite,password)
|
||||
static int do_extract_currentfile(uf,popt_extract_without_path,popt_overwrite,password)
|
||||
unzFile uf;
|
||||
const int* popt_extract_without_path;
|
||||
int* popt_overwrite;
|
||||
|
@ -324,7 +326,6 @@ int do_extract_currentfile(uf,popt_extract_without_path,popt_overwrite,password)
|
|||
uInt size_buf;
|
||||
|
||||
unz_file_info64 file_info;
|
||||
uLong ratio=0;
|
||||
err = unzGetCurrentFileInfo64(uf,&file_info,filename_inzip,sizeof(filename_inzip),NULL,0,NULL,0);
|
||||
|
||||
if (err!=UNZ_OK)
|
||||
|
@ -439,7 +440,7 @@ int do_extract_currentfile(uf,popt_extract_without_path,popt_overwrite,password)
|
|||
break;
|
||||
}
|
||||
if (err>0)
|
||||
if (fwrite(buf,err,1,fout)!=1)
|
||||
if (fwrite(buf,(unsigned)err,1,fout)!=1)
|
||||
{
|
||||
printf("error in writing extracted file\n");
|
||||
err=UNZ_ERRNO;
|
||||
|
@ -472,7 +473,7 @@ int do_extract_currentfile(uf,popt_extract_without_path,popt_overwrite,password)
|
|||
}
|
||||
|
||||
|
||||
int do_extract(uf,opt_extract_without_path,opt_overwrite,password)
|
||||
static int do_extract(uf,opt_extract_without_path,opt_overwrite,password)
|
||||
unzFile uf;
|
||||
int opt_extract_without_path;
|
||||
int opt_overwrite;
|
||||
|
@ -481,7 +482,6 @@ int do_extract(uf,opt_extract_without_path,opt_overwrite,password)
|
|||
uLong i;
|
||||
unz_global_info64 gi;
|
||||
int err;
|
||||
FILE* fout=NULL;
|
||||
|
||||
err = unzGetGlobalInfo64(uf,&gi);
|
||||
if (err!=UNZ_OK)
|
||||
|
@ -508,14 +508,13 @@ int do_extract(uf,opt_extract_without_path,opt_overwrite,password)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int do_extract_onefile(uf,filename,opt_extract_without_path,opt_overwrite,password)
|
||||
static int do_extract_onefile(uf,filename,opt_extract_without_path,opt_overwrite,password)
|
||||
unzFile uf;
|
||||
const char* filename;
|
||||
int opt_extract_without_path;
|
||||
int opt_overwrite;
|
||||
const char* password;
|
||||
{
|
||||
int err = UNZ_OK;
|
||||
if (unzLocateFile(uf,filename,CASESENSITIVITY)!=UNZ_OK)
|
||||
{
|
||||
printf("file %s not found in the zipfile\n",filename);
|
||||
|
@ -565,7 +564,7 @@ int main(argc,argv)
|
|||
|
||||
while ((*p)!='\0')
|
||||
{
|
||||
char c=*(p++);;
|
||||
char c=*(p++);
|
||||
if ((c=='l') || (c=='L'))
|
||||
opt_do_list = 1;
|
||||
if ((c=='v') || (c=='V'))
|
||||
|
|
|
@ -71,8 +71,8 @@
|
|||
#define MAXFILENAME (256)
|
||||
|
||||
#ifdef _WIN32
|
||||
uLong filetime(f, tmzip, dt)
|
||||
char *f; /* name of file to get info on */
|
||||
static int filetime(f, tmzip, dt)
|
||||
const char *f; /* name of file to get info on */
|
||||
tm_zip *tmzip; /* return value: access, modific. and creation times */
|
||||
uLong *dt; /* dostime */
|
||||
{
|
||||
|
@ -94,12 +94,13 @@ uLong filetime(f, tmzip, dt)
|
|||
return ret;
|
||||
}
|
||||
#else
|
||||
#ifdef unix || __APPLE__
|
||||
uLong filetime(f, tmzip, dt)
|
||||
char *f; /* name of file to get info on */
|
||||
#if defined(unix) || defined(__APPLE__)
|
||||
static int filetime(f, tmzip, dt)
|
||||
const char *f; /* name of file to get info on */
|
||||
tm_zip *tmzip; /* return value: access, modific. and creation times */
|
||||
uLong *dt; /* dostime */
|
||||
{
|
||||
(void)dt;
|
||||
int ret=0;
|
||||
struct stat s; /* results of stat() */
|
||||
struct tm* filedate;
|
||||
|
@ -108,7 +109,7 @@ uLong filetime(f, tmzip, dt)
|
|||
if (strcmp(f,"-")!=0)
|
||||
{
|
||||
char name[MAXFILENAME+1];
|
||||
int len = strlen(f);
|
||||
size_t len = strlen(f);
|
||||
if (len > MAXFILENAME)
|
||||
len = MAXFILENAME;
|
||||
|
||||
|
@ -138,7 +139,7 @@ uLong filetime(f, tmzip, dt)
|
|||
}
|
||||
#else
|
||||
uLong filetime(f, tmzip, dt)
|
||||
char *f; /* name of file to get info on */
|
||||
const char *f; /* name of file to get info on */
|
||||
tm_zip *tmzip; /* return value: access, modific. and creation times */
|
||||
uLong *dt; /* dostime */
|
||||
{
|
||||
|
@ -150,7 +151,7 @@ uLong filetime(f, tmzip, dt)
|
|||
|
||||
|
||||
|
||||
int check_exist_file(filename)
|
||||
static int check_exist_file(filename)
|
||||
const char* filename;
|
||||
{
|
||||
FILE* ftestexist;
|
||||
|
@ -163,13 +164,13 @@ int check_exist_file(filename)
|
|||
return ret;
|
||||
}
|
||||
|
||||
void do_banner()
|
||||
static void do_banner()
|
||||
{
|
||||
printf("MiniZip 1.1, demo of zLib + MiniZip64 package, written by Gilles Vollant\n");
|
||||
printf("more info on MiniZip at http://www.winimage.com/zLibDll/minizip.html\n\n");
|
||||
}
|
||||
|
||||
void do_help()
|
||||
static void do_help()
|
||||
{
|
||||
printf("Usage : minizip [-o] [-a] [-0 to -9] [-p password] [-j] file.zip [files_to_add]\n\n" \
|
||||
" -o Overwrite existing file.zip\n" \
|
||||
|
@ -182,14 +183,14 @@ void do_help()
|
|||
|
||||
/* calculate the CRC32 of a file,
|
||||
because to encrypt a file, we need known the CRC32 of the file before */
|
||||
int getFileCrc(const char* filenameinzip,void*buf,unsigned long size_buf,unsigned long* result_crc)
|
||||
static int getFileCrc(const char* filenameinzip,void*buf,unsigned long size_buf,unsigned long* result_crc)
|
||||
{
|
||||
unsigned long calculate_crc=0;
|
||||
int err=ZIP_OK;
|
||||
FILE * fin = FOPEN_FUNC(filenameinzip,"rb");
|
||||
|
||||
unsigned long size_read = 0;
|
||||
unsigned long total_read = 0;
|
||||
/* unsigned long total_read = 0; */
|
||||
if (fin==NULL)
|
||||
{
|
||||
err = ZIP_ERRNO;
|
||||
|
@ -199,7 +200,7 @@ int getFileCrc(const char* filenameinzip,void*buf,unsigned long size_buf,unsigne
|
|||
do
|
||||
{
|
||||
err = ZIP_OK;
|
||||
size_read = (int)fread(buf,1,size_buf,fin);
|
||||
size_read = fread(buf,1,size_buf,fin);
|
||||
if (size_read < size_buf)
|
||||
if (feof(fin)==0)
|
||||
{
|
||||
|
@ -208,8 +209,8 @@ int getFileCrc(const char* filenameinzip,void*buf,unsigned long size_buf,unsigne
|
|||
}
|
||||
|
||||
if (size_read>0)
|
||||
calculate_crc = crc32(calculate_crc,buf,size_read);
|
||||
total_read += size_read;
|
||||
calculate_crc = crc32_z(calculate_crc,buf,size_read);
|
||||
/* total_read += size_read; */
|
||||
|
||||
} while ((err == ZIP_OK) && (size_read>0));
|
||||
|
||||
|
@ -221,7 +222,7 @@ int getFileCrc(const char* filenameinzip,void*buf,unsigned long size_buf,unsigne
|
|||
return err;
|
||||
}
|
||||
|
||||
int isLargeFile(const char* filename)
|
||||
static int isLargeFile(const char* filename)
|
||||
{
|
||||
int largeFile = 0;
|
||||
ZPOS64_T pos = 0;
|
||||
|
@ -229,8 +230,8 @@ int isLargeFile(const char* filename)
|
|||
|
||||
if(pFile != NULL)
|
||||
{
|
||||
int n = FSEEKO_FUNC(pFile, 0, SEEK_END);
|
||||
pos = FTELLO_FUNC(pFile);
|
||||
FSEEKO_FUNC(pFile, 0, SEEK_END);
|
||||
pos = (ZPOS64_T)FTELLO_FUNC(pFile);
|
||||
|
||||
printf("File : %s is %lld bytes\n", filename, pos);
|
||||
|
||||
|
@ -255,7 +256,7 @@ int main(argc,argv)
|
|||
char filename_try[MAXFILENAME+16];
|
||||
int zipok;
|
||||
int err=0;
|
||||
int size_buf=0;
|
||||
size_t size_buf=0;
|
||||
void* buf=NULL;
|
||||
const char* password=NULL;
|
||||
|
||||
|
@ -276,7 +277,7 @@ int main(argc,argv)
|
|||
|
||||
while ((*p)!='\0')
|
||||
{
|
||||
char c=*(p++);;
|
||||
char c=*(p++);
|
||||
if ((c=='o') || (c=='O'))
|
||||
opt_overwrite = 1;
|
||||
if ((c=='a') || (c=='A'))
|
||||
|
@ -396,7 +397,7 @@ int main(argc,argv)
|
|||
(strlen(argv[i]) == 2)))
|
||||
{
|
||||
FILE * fin;
|
||||
int size_read;
|
||||
size_t size_read;
|
||||
const char* filenameinzip = argv[i];
|
||||
const char *savefilenameinzip;
|
||||
zip_fileinfo zi;
|
||||
|
@ -472,7 +473,7 @@ int main(argc,argv)
|
|||
do
|
||||
{
|
||||
err = ZIP_OK;
|
||||
size_read = (int)fread(buf,1,size_buf,fin);
|
||||
size_read = fread(buf,1,size_buf,fin);
|
||||
if (size_read < size_buf)
|
||||
if (feof(fin)==0)
|
||||
{
|
||||
|
@ -482,7 +483,7 @@ int main(argc,argv)
|
|||
|
||||
if (size_read>0)
|
||||
{
|
||||
err = zipWriteInFileInZip (zf,buf,size_read);
|
||||
err = zipWriteInFileInZip (zf,buf,(unsigned)size_read);
|
||||
if (err<0)
|
||||
{
|
||||
printf("error in writing %s in the zipfile\n",
|
||||
|
|
|
@ -112,7 +112,7 @@
|
|||
# define ALLOC(size) (malloc(size))
|
||||
#endif
|
||||
#ifndef TRYFREE
|
||||
# define TRYFREE(p) {if (p) free(p);}
|
||||
# define TRYFREE(p) { free(p);}
|
||||
#endif
|
||||
|
||||
#define SIZECENTRALDIRITEM (0x2e)
|
||||
|
@ -455,7 +455,7 @@ local ZPOS64_T unz64local_SearchCentralDir(const zlib_filefunc64_32_def* pzlib_f
|
|||
if (((*(buf+i))==0x50) && ((*(buf+i+1))==0x4b) &&
|
||||
((*(buf+i+2))==0x05) && ((*(buf+i+3))==0x06))
|
||||
{
|
||||
uPosFound = uReadPos+i;
|
||||
uPosFound = uReadPos+(unsigned)i;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -523,7 +523,7 @@ local ZPOS64_T unz64local_SearchCentralDir64(const zlib_filefunc64_32_def* pzlib
|
|||
if (((*(buf+i))==0x50) && ((*(buf+i+1))==0x4b) &&
|
||||
((*(buf+i+2))==0x06) && ((*(buf+i+3))==0x07))
|
||||
{
|
||||
uPosFound = uReadPos+i;
|
||||
uPosFound = uReadPos+(unsigned)i;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -853,13 +853,13 @@ local void unz64local_DosDateToTmuDate (ZPOS64_T ulDosDate, tm_unz* ptm)
|
|||
{
|
||||
ZPOS64_T uDate;
|
||||
uDate = (ZPOS64_T)(ulDosDate>>16);
|
||||
ptm->tm_mday = (uInt)(uDate&0x1f) ;
|
||||
ptm->tm_mon = (uInt)((((uDate)&0x1E0)/0x20)-1) ;
|
||||
ptm->tm_year = (uInt)(((uDate&0x0FE00)/0x0200)+1980) ;
|
||||
ptm->tm_mday = (int)(uDate&0x1f) ;
|
||||
ptm->tm_mon = (int)((((uDate)&0x1E0)/0x20)-1) ;
|
||||
ptm->tm_year = (int)(((uDate&0x0FE00)/0x0200)+1980) ;
|
||||
|
||||
ptm->tm_hour = (uInt) ((ulDosDate &0xF800)/0x800);
|
||||
ptm->tm_min = (uInt) ((ulDosDate&0x7E0)/0x20) ;
|
||||
ptm->tm_sec = (uInt) (2*(ulDosDate&0x1f)) ;
|
||||
ptm->tm_hour = (int) ((ulDosDate &0xF800)/0x800);
|
||||
ptm->tm_min = (int) ((ulDosDate&0x7E0)/0x20) ;
|
||||
ptm->tm_sec = (int) (2*(ulDosDate&0x1f)) ;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -993,7 +993,7 @@ local int unz64local_GetCurrentFileInfoInternal (unzFile file,
|
|||
|
||||
if (lSeek!=0)
|
||||
{
|
||||
if (ZSEEK64(s->z_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0)
|
||||
if (ZSEEK64(s->z_filefunc, s->filestream,(ZPOS64_T)lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0)
|
||||
lSeek=0;
|
||||
else
|
||||
err=UNZ_ERRNO;
|
||||
|
@ -1018,7 +1018,7 @@ local int unz64local_GetCurrentFileInfoInternal (unzFile file,
|
|||
|
||||
if (lSeek!=0)
|
||||
{
|
||||
if (ZSEEK64(s->z_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0)
|
||||
if (ZSEEK64(s->z_filefunc, s->filestream,(ZPOS64_T)lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0)
|
||||
lSeek=0;
|
||||
else
|
||||
err=UNZ_ERRNO;
|
||||
|
@ -1090,7 +1090,7 @@ local int unz64local_GetCurrentFileInfoInternal (unzFile file,
|
|||
|
||||
if (lSeek!=0)
|
||||
{
|
||||
if (ZSEEK64(s->z_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0)
|
||||
if (ZSEEK64(s->z_filefunc, s->filestream,(ZPOS64_T)lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0)
|
||||
lSeek=0;
|
||||
else
|
||||
err=UNZ_ERRNO;
|
||||
|
@ -1566,6 +1566,7 @@ extern int ZEXPORT unzOpenCurrentFile3 (unzFile file, int* method,
|
|||
pfile_in_zip_read_info->stream_initialised=Z_BZIP2ED;
|
||||
else
|
||||
{
|
||||
TRYFREE(pfile_in_zip_read_info->read_buffer);
|
||||
TRYFREE(pfile_in_zip_read_info);
|
||||
return err;
|
||||
}
|
||||
|
@ -1586,6 +1587,7 @@ extern int ZEXPORT unzOpenCurrentFile3 (unzFile file, int* method,
|
|||
pfile_in_zip_read_info->stream_initialised=Z_DEFLATED;
|
||||
else
|
||||
{
|
||||
TRYFREE(pfile_in_zip_read_info->read_buffer);
|
||||
TRYFREE(pfile_in_zip_read_info);
|
||||
return err;
|
||||
}
|
||||
|
@ -1767,7 +1769,7 @@ extern int ZEXPORT unzReadCurrentFile (unzFile file, voidp buf, unsigned len)
|
|||
|
||||
if ((pfile_in_zip_read_info->stream.avail_in == 0) &&
|
||||
(pfile_in_zip_read_info->rest_read_compressed == 0))
|
||||
return (iRead==0) ? UNZ_EOF : iRead;
|
||||
return (iRead==0) ? UNZ_EOF : (int)iRead;
|
||||
|
||||
if (pfile_in_zip_read_info->stream.avail_out <
|
||||
pfile_in_zip_read_info->stream.avail_in)
|
||||
|
@ -1857,6 +1859,9 @@ extern int ZEXPORT unzReadCurrentFile (unzFile file, voidp buf, unsigned len)
|
|||
err = Z_DATA_ERROR;
|
||||
|
||||
uTotalOutAfter = pfile_in_zip_read_info->stream.total_out;
|
||||
/* Detect overflow, because z_stream.total_out is uLong (32 bits) */
|
||||
if (uTotalOutAfter<uTotalOutBefore)
|
||||
uTotalOutAfter += 1LL << 32; /* Add maximum value of uLong + 1 */
|
||||
uOutThis = uTotalOutAfter-uTotalOutBefore;
|
||||
|
||||
pfile_in_zip_read_info->total_out_64 = pfile_in_zip_read_info->total_out_64 + uOutThis;
|
||||
|
@ -1871,14 +1876,14 @@ extern int ZEXPORT unzReadCurrentFile (unzFile file, voidp buf, unsigned len)
|
|||
iRead += (uInt)(uTotalOutAfter - uTotalOutBefore);
|
||||
|
||||
if (err==Z_STREAM_END)
|
||||
return (iRead==0) ? UNZ_EOF : iRead;
|
||||
return (iRead==0) ? UNZ_EOF : (int)iRead;
|
||||
if (err!=Z_OK)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (err==Z_OK)
|
||||
return iRead;
|
||||
return (int)iRead;
|
||||
return err;
|
||||
}
|
||||
|
||||
|
|
|
@ -83,12 +83,12 @@ typedef voidp unzFile;
|
|||
/* tm_unz contain date/time info */
|
||||
typedef struct tm_unz_s
|
||||
{
|
||||
uInt tm_sec; /* seconds after the minute - [0,59] */
|
||||
uInt tm_min; /* minutes after the hour - [0,59] */
|
||||
uInt tm_hour; /* hours since midnight - [0,23] */
|
||||
uInt tm_mday; /* day of the month - [1,31] */
|
||||
uInt tm_mon; /* months since January - [0,11] */
|
||||
uInt tm_year; /* years - [1980..2044] */
|
||||
int tm_sec; /* seconds after the minute - [0,59] */
|
||||
int tm_min; /* minutes after the hour - [0,59] */
|
||||
int tm_hour; /* hours since midnight - [0,23] */
|
||||
int tm_mday; /* day of the month - [1,31] */
|
||||
int tm_mon; /* months since January - [0,11] */
|
||||
int tm_year; /* years - [1980..2044] */
|
||||
} tm_unz;
|
||||
|
||||
/* unz_global_info structure contain global data about the ZIPfile
|
||||
|
|
|
@ -158,7 +158,7 @@ typedef struct
|
|||
#ifndef NOCRYPT
|
||||
unsigned long keys[3]; /* keys defining the pseudo-random sequence */
|
||||
const z_crc_t* pcrc_32_tab;
|
||||
int crypt_header_size;
|
||||
unsigned crypt_header_size;
|
||||
#endif
|
||||
} curfile64_info;
|
||||
|
||||
|
@ -301,7 +301,7 @@ local int zip64local_putValue (const zlib_filefunc64_32_def* pzlib_filefunc_def,
|
|||
}
|
||||
}
|
||||
|
||||
if (ZWRITE64(*pzlib_filefunc_def,filestream,buf,nbByte)!=(uLong)nbByte)
|
||||
if (ZWRITE64(*pzlib_filefunc_def,filestream,buf,(uLong)nbByte)!=(uLong)nbByte)
|
||||
return ZIP_ERRNO;
|
||||
else
|
||||
return ZIP_OK;
|
||||
|
@ -337,8 +337,8 @@ local uLong zip64local_TmzDateToDosDate(const tm_zip* ptm)
|
|||
else if (year>=80)
|
||||
year-=80;
|
||||
return
|
||||
(uLong) (((ptm->tm_mday) + (32 * (ptm->tm_mon+1)) + (512 * year)) << 16) |
|
||||
((ptm->tm_sec/2) + (32* ptm->tm_min) + (2048 * (uLong)ptm->tm_hour));
|
||||
(uLong) (((uLong)(ptm->tm_mday) + (32 * (uLong)(ptm->tm_mon+1)) + (512 * year)) << 16) |
|
||||
(((uLong)ptm->tm_sec/2) + (32 * (uLong)ptm->tm_min) + (2048 * (uLong)ptm->tm_hour));
|
||||
}
|
||||
|
||||
|
||||
|
@ -522,12 +522,12 @@ local ZPOS64_T zip64local_SearchCentralDir(const zlib_filefunc64_32_def* pzlib_f
|
|||
if (((*(buf+i))==0x50) && ((*(buf+i+1))==0x4b) &&
|
||||
((*(buf+i+2))==0x05) && ((*(buf+i+3))==0x06))
|
||||
{
|
||||
uPosFound = uReadPos+i;
|
||||
uPosFound = uReadPos+(unsigned)i;
|
||||
break;
|
||||
}
|
||||
|
||||
if (uPosFound!=0)
|
||||
break;
|
||||
if (uPosFound!=0)
|
||||
break;
|
||||
}
|
||||
TRYFREE(buf);
|
||||
return uPosFound;
|
||||
|
@ -586,7 +586,7 @@ local ZPOS64_T zip64local_SearchCentralDir64(const zlib_filefunc64_32_def* pzlib
|
|||
// Signature "0x07064b50" Zip64 end of central directory locater
|
||||
if (((*(buf+i))==0x50) && ((*(buf+i+1))==0x4b) && ((*(buf+i+2))==0x06) && ((*(buf+i+3))==0x07))
|
||||
{
|
||||
uPosFound = uReadPos+i;
|
||||
uPosFound = uReadPos+(unsigned)i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -637,7 +637,7 @@ local ZPOS64_T zip64local_SearchCentralDir64(const zlib_filefunc64_32_def* pzlib
|
|||
return relativeOffset;
|
||||
}
|
||||
|
||||
int LoadCentralDirectoryRecord(zip64_internal* pziinit)
|
||||
local int LoadCentralDirectoryRecord(zip64_internal* pziinit)
|
||||
{
|
||||
int err=ZIP_OK;
|
||||
ZPOS64_T byte_before_the_zipfile;/* byte before the zipfile, (>0 for sfx)*/
|
||||
|
@ -955,7 +955,7 @@ extern zipFile ZEXPORT zipOpen64 (const void* pathname, int append)
|
|||
return zipOpen3(pathname,append,NULL,NULL);
|
||||
}
|
||||
|
||||
int Write_LocalFileHeader(zip64_internal* zi, const char* filename, uInt size_extrafield_local, const void* extrafield_local)
|
||||
local int Write_LocalFileHeader(zip64_internal* zi, const char* filename, uInt size_extrafield_local, const void* extrafield_local)
|
||||
{
|
||||
/* write the local header */
|
||||
int err;
|
||||
|
@ -1034,8 +1034,8 @@ int Write_LocalFileHeader(zip64_internal* zi, const char* filename, uInt size_ex
|
|||
// Remember position of Zip64 extended info for the local file header. (needed when we update size after done with file)
|
||||
zi->ci.pos_zip64extrainfo = ZTELL64(zi->z_filefunc,zi->filestream);
|
||||
|
||||
err = zip64local_putValue(&zi->z_filefunc, zi->filestream, (short)HeaderID,2);
|
||||
err = zip64local_putValue(&zi->z_filefunc, zi->filestream, (short)DataSize,2);
|
||||
err = zip64local_putValue(&zi->z_filefunc, zi->filestream, (ZPOS64_T)HeaderID,2);
|
||||
err = zip64local_putValue(&zi->z_filefunc, zi->filestream, (ZPOS64_T)DataSize,2);
|
||||
|
||||
err = zip64local_putValue(&zi->z_filefunc, zi->filestream, (ZPOS64_T)UncompressedSize,8);
|
||||
err = zip64local_putValue(&zi->z_filefunc, zi->filestream, (ZPOS64_T)CompressedSize,8);
|
||||
|
@ -1471,11 +1471,6 @@ extern int ZEXPORT zipWriteInFileInZip (zipFile file,const void* buf,unsigned in
|
|||
{
|
||||
uLong uTotalOutBefore = zi->ci.stream.total_out;
|
||||
err=deflate(&zi->ci.stream, Z_NO_FLUSH);
|
||||
if(uTotalOutBefore > zi->ci.stream.total_out)
|
||||
{
|
||||
int bBreak = 0;
|
||||
bBreak++;
|
||||
}
|
||||
|
||||
zi->ci.pos_in_buffered_data += (uInt)(zi->ci.stream.total_out - uTotalOutBefore) ;
|
||||
}
|
||||
|
@ -1516,7 +1511,7 @@ extern int ZEXPORT zipCloseFileInZipRaw64 (zipFile file, ZPOS64_T uncompressed_s
|
|||
zip64_internal* zi;
|
||||
ZPOS64_T compressed_size;
|
||||
uLong invalidValue = 0xffffffff;
|
||||
short datasize = 0;
|
||||
unsigned datasize = 0;
|
||||
int err=ZIP_OK;
|
||||
|
||||
if (file == NULL)
|
||||
|
@ -1752,7 +1747,7 @@ extern int ZEXPORT zipCloseFileInZip (zipFile file)
|
|||
return zipCloseFileInZipRaw (file,0,0);
|
||||
}
|
||||
|
||||
int Write_Zip64EndOfCentralDirectoryLocator(zip64_internal* zi, ZPOS64_T zip64eocd_pos_inzip)
|
||||
local int Write_Zip64EndOfCentralDirectoryLocator(zip64_internal* zi, ZPOS64_T zip64eocd_pos_inzip)
|
||||
{
|
||||
int err = ZIP_OK;
|
||||
ZPOS64_T pos = zip64eocd_pos_inzip - zi->add_position_when_writing_offset;
|
||||
|
@ -1774,7 +1769,7 @@ int Write_Zip64EndOfCentralDirectoryLocator(zip64_internal* zi, ZPOS64_T zip64eo
|
|||
return err;
|
||||
}
|
||||
|
||||
int Write_Zip64EndOfCentralDirectoryRecord(zip64_internal* zi, uLong size_centraldir, ZPOS64_T centraldir_pos_inzip)
|
||||
local int Write_Zip64EndOfCentralDirectoryRecord(zip64_internal* zi, uLong size_centraldir, ZPOS64_T centraldir_pos_inzip)
|
||||
{
|
||||
int err = ZIP_OK;
|
||||
|
||||
|
@ -1813,7 +1808,7 @@ int Write_Zip64EndOfCentralDirectoryRecord(zip64_internal* zi, uLong size_centra
|
|||
}
|
||||
return err;
|
||||
}
|
||||
int Write_EndOfCentralDirectoryRecord(zip64_internal* zi, uLong size_centraldir, ZPOS64_T centraldir_pos_inzip)
|
||||
local int Write_EndOfCentralDirectoryRecord(zip64_internal* zi, uLong size_centraldir, ZPOS64_T centraldir_pos_inzip)
|
||||
{
|
||||
int err = ZIP_OK;
|
||||
|
||||
|
@ -1861,7 +1856,7 @@ int Write_EndOfCentralDirectoryRecord(zip64_internal* zi, uLong size_centraldir,
|
|||
return err;
|
||||
}
|
||||
|
||||
int Write_GlobalComment(zip64_internal* zi, const char* global_comment)
|
||||
local int Write_GlobalComment(zip64_internal* zi, const char* global_comment)
|
||||
{
|
||||
int err = ZIP_OK;
|
||||
uInt size_global_comment = 0;
|
||||
|
@ -1959,10 +1954,10 @@ extern int ZEXPORT zipRemoveExtraInfoBlock (char* pData, int* dataLen, short sHe
|
|||
|
||||
int retVal = ZIP_OK;
|
||||
|
||||
if(pData == NULL || *dataLen < 4)
|
||||
if(pData == NULL || dataLen == NULL || *dataLen < 4)
|
||||
return ZIP_PARAMERROR;
|
||||
|
||||
pNewHeader = (char*)ALLOC(*dataLen);
|
||||
pNewHeader = (char*)ALLOC((unsigned)*dataLen);
|
||||
pTmp = pNewHeader;
|
||||
|
||||
while(p < (pData + *dataLen))
|
||||
|
|
|
@ -88,12 +88,12 @@ typedef voidp zipFile;
|
|||
/* tm_zip contain date/time info */
|
||||
typedef struct tm_zip_s
|
||||
{
|
||||
uInt tm_sec; /* seconds after the minute - [0,59] */
|
||||
uInt tm_min; /* minutes after the hour - [0,59] */
|
||||
uInt tm_hour; /* hours since midnight - [0,23] */
|
||||
uInt tm_mday; /* day of the month - [1,31] */
|
||||
uInt tm_mon; /* months since January - [0,11] */
|
||||
uInt tm_year; /* years - [1980..2044] */
|
||||
int tm_sec; /* seconds after the minute - [0,59] */
|
||||
int tm_min; /* minutes after the hour - [0,59] */
|
||||
int tm_hour; /* hours since midnight - [0,23] */
|
||||
int tm_mday; /* day of the month - [1,31] */
|
||||
int tm_mon; /* months since January - [0,11] */
|
||||
int tm_year; /* years - [1980..2044] */
|
||||
} tm_zip;
|
||||
|
||||
typedef struct
|
||||
|
@ -144,6 +144,11 @@ extern zipFile ZEXPORT zipOpen2_64 OF((const void *pathname,
|
|||
zipcharpc* globalcomment,
|
||||
zlib_filefunc64_def* pzlib_filefunc_def));
|
||||
|
||||
extern zipFile ZEXPORT zipOpen3 OF((const void *pathname,
|
||||
int append,
|
||||
zipcharpc* globalcomment,
|
||||
zlib_filefunc64_32_def* pzlib_filefunc64_32_def));
|
||||
|
||||
extern int ZEXPORT zipOpenNewFileInZip OF((zipFile file,
|
||||
const char* filename,
|
||||
const zip_fileinfo* zipfi,
|
||||
|
|
|
@ -10,7 +10,7 @@ unit zlibpas;
|
|||
interface
|
||||
|
||||
const
|
||||
ZLIB_VERSION = '1.2.10';
|
||||
ZLIB_VERSION = '1.2.13';
|
||||
ZLIB_VERNUM = $12a0;
|
||||
|
||||
type
|
||||
|
|
|
@ -38,7 +38,7 @@ Then you can call puff() to decompress a deflate stream that is in memory in
|
|||
its entirety at source, to a sufficiently sized block of memory for the
|
||||
decompressed data at dest. puff() is the only external symbol in puff.c The
|
||||
only C library functions that puff.c needs are setjmp() and longjmp(), which
|
||||
are used to simplify error checking in the code to improve readabilty. puff.c
|
||||
are used to simplify error checking in the code to improve readability. puff.c
|
||||
does no memory allocation, and uses less than 2K bytes off of the stack.
|
||||
|
||||
If destlen is not enough space for the uncompressed data, then inflate will
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
* - Use pointers instead of long to specify source and
|
||||
* destination sizes to avoid arbitrary 4 GB limits
|
||||
* 1.2 17 Mar 2002 - Add faster version of decode(), doubles speed (!),
|
||||
* but leave simple version for readabilty
|
||||
* but leave simple version for readability
|
||||
* - Make sure invalid distances detected if pointers
|
||||
* are 16 bits
|
||||
* - Fix fixed codes table error
|
||||
|
@ -624,7 +624,7 @@ local int fixed(struct state *s)
|
|||
* are themselves compressed using Huffman codes and run-length encoding. In
|
||||
* the list of code lengths, a 0 symbol means no code, a 1..15 symbol means
|
||||
* that length, and the symbols 16, 17, and 18 are run-length instructions.
|
||||
* Each of 16, 17, and 18 are follwed by extra bits to define the length of
|
||||
* Each of 16, 17, and 18 are followed by extra bits to define the length of
|
||||
* the run. 16 copies the last length 3 to 6 times. 17 represents 3 to 10
|
||||
* zero lengths, and 18 represents 11 to 138 zero lengths. Unused symbols
|
||||
* are common, hence the special coding for zero lengths.
|
||||
|
|
|
@ -143,7 +143,7 @@ int main(int argc, char **argv)
|
|||
len - sourcelen);
|
||||
}
|
||||
|
||||
/* if requested, inflate again and write decompressd data to stdout */
|
||||
/* if requested, inflate again and write decompressed data to stdout */
|
||||
if (put && ret == 0) {
|
||||
if (fail)
|
||||
destlen >>= 1;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Building instructions for the DLL versions of Zlib 1.2.10
|
||||
Building instructions for the DLL versions of Zlib 1.2.13
|
||||
========================================================
|
||||
|
||||
This directory contains projects that build zlib and minizip using
|
||||
|
@ -17,9 +17,6 @@ More information can be found at this site.
|
|||
Build instructions for Visual Studio 2008 (32 bits or 64 bits)
|
||||
--------------------------------------------------------------
|
||||
- Decompress current zlib, including all contrib/* files
|
||||
- Compile assembly code (with Visual Studio Command Prompt) by running:
|
||||
bld_ml64.bat (in contrib\masmx64)
|
||||
bld_ml32.bat (in contrib\masmx86)
|
||||
- Open contrib\vstudio\vc9\zlibvc.sln with Microsoft Visual C++ 2008
|
||||
- Or run: vcbuild /rebuild contrib\vstudio\vc9\zlibvc.sln "Release|Win32"
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{048af943-022b-4db6-beeb-a54c34774ee2}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm</Extensions>
|
||||
<Extensions>cpp;c;cxx;def;odl;idl;hpj;bat</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{c1d600d2-888f-4aea-b73e-8b0dd9befa0c}</UniqueIdentifier>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{c0419b40-bf50-40da-b153-ff74215b79de}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm</Extensions>
|
||||
<Extensions>cpp;c;cxx;def;odl;idl;hpj;bat</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{bb87b070-735b-478e-92ce-7383abb2f36c}</UniqueIdentifier>
|
||||
|
|
|
@ -181,7 +181,7 @@
|
|||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ASMV;ASMINF;WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
|
@ -194,7 +194,7 @@
|
|||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)testzlib.exe</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(OutDir)testzlib.pdb</ProgramDatabaseFile>
|
||||
|
@ -241,7 +241,7 @@
|
|||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ASMV;ASMINF;WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
|
@ -254,7 +254,7 @@
|
|||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)testzlib.exe</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -269,14 +269,14 @@
|
|||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ASMV;ASMINF;WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">
|
||||
|
@ -352,14 +352,14 @@
|
|||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ASMV;ASMINF;WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">
|
||||
|
@ -398,14 +398,6 @@
|
|||
<ClCompile Include="..\..\..\crc32.c" />
|
||||
<ClCompile Include="..\..\..\deflate.c" />
|
||||
<ClCompile Include="..\..\..\infback.c" />
|
||||
<ClCompile Include="..\..\masmx64\inffas8664.c">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\inffast.c" />
|
||||
<ClCompile Include="..\..\..\inflate.c" />
|
||||
<ClCompile Include="..\..\..\inftrees.c" />
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{c1f6a2e3-5da5-4955-8653-310d3efe05a9}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm</Extensions>
|
||||
<Extensions>cpp;c;cxx;def;odl;idl;hpj;bat</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{c2aaffdc-2c95-4d6f-8466-4bec5890af2c}</UniqueIdentifier>
|
||||
|
@ -30,9 +30,6 @@
|
|||
<ClCompile Include="..\..\..\infback.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\masmx64\inffas8664.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\inffast.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{fa61a89f-93fc-4c89-b29e-36224b7592f4}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm</Extensions>
|
||||
<Extensions>cpp;c;cxx;def;odl;idl;hpj;bat</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{d4b85da0-2ba2-4934-b57f-e2584e3848ee}</UniqueIdentifier>
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
#define IDR_VERSION1 1
|
||||
IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE
|
||||
FILEVERSION 1, 2, 10, 0
|
||||
PRODUCTVERSION 1, 2, 10, 0
|
||||
FILEVERSION 1, 2, 13, 0
|
||||
PRODUCTVERSION 1, 2, 13, 0
|
||||
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||
FILEFLAGS 0
|
||||
FILEOS VOS_DOS_WINDOWS32
|
||||
|
@ -17,12 +17,12 @@ BEGIN
|
|||
|
||||
BEGIN
|
||||
VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0"
|
||||
VALUE "FileVersion", "1.2.10\0"
|
||||
VALUE "FileVersion", "1.2.13\0"
|
||||
VALUE "InternalName", "zlib\0"
|
||||
VALUE "OriginalFilename", "zlibwapi.dll\0"
|
||||
VALUE "ProductName", "ZLib.DLL\0"
|
||||
VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0"
|
||||
VALUE "LegalCopyright", "(C) 1995-2017 Jean-loup Gailly & Mark Adler\0"
|
||||
VALUE "LegalCopyright", "(C) 1995-2022 Jean-loup Gailly & Mark Adler\0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
|
|
@ -160,7 +160,7 @@
|
|||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
|
@ -182,16 +182,12 @@
|
|||
<OutputFile>$(OutDir)zlibstat.lib</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
</Lib>
|
||||
<PreBuildEvent>
|
||||
<Command>cd ..\..\masmx86
|
||||
bld_ml32.bat</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ASMV;ASMINF;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
|
@ -210,19 +206,15 @@ bld_ml32.bat</Command>
|
|||
</ResourceCompile>
|
||||
<Lib>
|
||||
<AdditionalOptions>/MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)zlibstat.lib</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
</Lib>
|
||||
<PreBuildEvent>
|
||||
<Command>cd ..\..\masmx86
|
||||
bld_ml32.bat</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
|
@ -252,7 +244,7 @@ bld_ml32.bat</Command>
|
|||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
|
@ -274,10 +266,6 @@ bld_ml32.bat</Command>
|
|||
<OutputFile>$(OutDir)zlibstat.lib</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
</Lib>
|
||||
<PreBuildEvent>
|
||||
<Command>cd ..\..\masmx64
|
||||
bld_ml64.bat</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">
|
||||
<Midl>
|
||||
|
@ -285,7 +273,7 @@ bld_ml64.bat</Command>
|
|||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
|
@ -314,8 +302,8 @@ bld_ml64.bat</Command>
|
|||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
|
@ -334,14 +322,10 @@ bld_ml64.bat</Command>
|
|||
</ResourceCompile>
|
||||
<Lib>
|
||||
<AdditionalOptions>/MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalDependencies>..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)zlibstat.lib</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
</Lib>
|
||||
<PreBuildEvent>
|
||||
<Command>cd ..\..\masmx64
|
||||
bld_ml64.bat</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">
|
||||
<Midl>
|
||||
|
@ -349,7 +333,7 @@ bld_ml64.bat</Command>
|
|||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
|
@ -379,7 +363,7 @@ bld_ml64.bat</Command>
|
|||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
|
@ -409,7 +393,7 @@ bld_ml64.bat</Command>
|
|||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
|
@ -443,14 +427,6 @@ bld_ml64.bat</Command>
|
|||
<ClCompile Include="..\..\..\gzread.c" />
|
||||
<ClCompile Include="..\..\..\gzwrite.c" />
|
||||
<ClCompile Include="..\..\..\infback.c" />
|
||||
<ClCompile Include="..\..\masmx64\inffas8664.c">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\inffast.c" />
|
||||
<ClCompile Include="..\..\..\inflate.c" />
|
||||
<ClCompile Include="..\..\..\inftrees.c" />
|
||||
|
|
|
@ -33,9 +33,6 @@
|
|||
<ClCompile Include="..\..\..\infback.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\masmx64\inffas8664.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\inffast.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
|
|
|
@ -151,3 +151,8 @@ EXPORTS
|
|||
deflateGetDictionary @173
|
||||
adler32_z @174
|
||||
crc32_z @175
|
||||
|
||||
; zlib1 v1.2.12 added:
|
||||
crc32_combine_gen @176
|
||||
crc32_combine_gen64 @177
|
||||
crc32_combine_op @178
|
||||
|
|
|
@ -197,8 +197,8 @@
|
|||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
|
@ -219,7 +219,7 @@
|
|||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
|
@ -229,10 +229,6 @@
|
|||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>cd ..\..\masmx86
|
||||
bld_ml32.bat</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">
|
||||
<Midl>
|
||||
|
@ -244,7 +240,7 @@ bld_ml32.bat</Command>
|
|||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
|
@ -288,8 +284,8 @@ bld_ml32.bat</Command>
|
|||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
|
@ -312,7 +308,7 @@ bld_ml32.bat</Command>
|
|||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
|
||||
<ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
|
||||
|
@ -322,10 +318,6 @@ bld_ml32.bat</Command>
|
|||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>cd ..\..\masmx86
|
||||
bld_ml32.bat</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Midl>
|
||||
|
@ -337,8 +329,8 @@ bld_ml32.bat</Command>
|
|||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
|
@ -358,7 +350,7 @@ bld_ml32.bat</Command>
|
|||
<Culture>0x040c</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
|
@ -366,10 +358,6 @@ bld_ml32.bat</Command>
|
|||
<SubSystem>Windows</SubSystem>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>cd ..\..\masmx64
|
||||
bld_ml64.bat</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">
|
||||
<Midl>
|
||||
|
@ -381,7 +369,7 @@ bld_ml64.bat</Command>
|
|||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
|
@ -424,7 +412,7 @@ bld_ml64.bat</Command>
|
|||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
|
@ -465,7 +453,7 @@ bld_ml64.bat</Command>
|
|||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
|
@ -510,8 +498,8 @@ bld_ml64.bat</Command>
|
|||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
|
@ -533,7 +521,7 @@ bld_ml64.bat</Command>
|
|||
<Culture>0x040c</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
|
||||
<ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
|
||||
|
@ -541,10 +529,6 @@ bld_ml64.bat</Command>
|
|||
<SubSystem>Windows</SubSystem>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>cd ..\..\masmx64
|
||||
bld_ml64.bat</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">
|
||||
<Midl>
|
||||
|
@ -556,7 +540,7 @@ bld_ml64.bat</Command>
|
|||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
|
@ -601,14 +585,6 @@ bld_ml64.bat</Command>
|
|||
<ClCompile Include="..\..\..\gzread.c" />
|
||||
<ClCompile Include="..\..\..\gzwrite.c" />
|
||||
<ClCompile Include="..\..\..\infback.c" />
|
||||
<ClCompile Include="..\..\masmx64\inffas8664.c">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\inffast.c" />
|
||||
<ClCompile Include="..\..\..\inflate.c" />
|
||||
<ClCompile Include="..\..\..\inftrees.c" />
|
||||
|
|
|
@ -42,9 +42,6 @@
|
|||
<ClCompile Include="..\..\..\infback.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\masmx64\inffas8664.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\inffast.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
|
|
|
@ -187,7 +187,7 @@
|
|||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ASMV;ASMINF;WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
|
@ -200,7 +200,7 @@
|
|||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)testzlib.exe</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(OutDir)testzlib.pdb</ProgramDatabaseFile>
|
||||
|
@ -247,7 +247,7 @@
|
|||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ASMV;ASMINF;WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
|
@ -260,7 +260,7 @@
|
|||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)testzlib.exe</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -275,14 +275,14 @@
|
|||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ASMV;ASMINF;WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">
|
||||
|
@ -358,14 +358,14 @@
|
|||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ASMV;ASMINF;WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">
|
||||
|
@ -404,14 +404,6 @@
|
|||
<ClCompile Include="..\..\..\crc32.c" />
|
||||
<ClCompile Include="..\..\..\deflate.c" />
|
||||
<ClCompile Include="..\..\..\infback.c" />
|
||||
<ClCompile Include="..\..\masmx64\inffas8664.c">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\inffast.c" />
|
||||
<ClCompile Include="..\..\..\inflate.c" />
|
||||
<ClCompile Include="..\..\..\inftrees.c" />
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
#define IDR_VERSION1 1
|
||||
IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE
|
||||
FILEVERSION 1, 2, 10, 0
|
||||
PRODUCTVERSION 1, 2, 10, 0
|
||||
FILEVERSION 1, 2, 13, 0
|
||||
PRODUCTVERSION 1, 2, 13, 0
|
||||
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||
FILEFLAGS 0
|
||||
FILEOS VOS_DOS_WINDOWS32
|
||||
|
@ -17,12 +17,12 @@ BEGIN
|
|||
|
||||
BEGIN
|
||||
VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0"
|
||||
VALUE "FileVersion", "1.2.10\0"
|
||||
VALUE "FileVersion", "1.2.13\0"
|
||||
VALUE "InternalName", "zlib\0"
|
||||
VALUE "OriginalFilename", "zlibwapi.dll\0"
|
||||
VALUE "ProductName", "ZLib.DLL\0"
|
||||
VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0"
|
||||
VALUE "LegalCopyright", "(C) 1995-2017 Jean-loup Gailly & Mark Adler\0"
|
||||
VALUE "LegalCopyright", "(C) 1995-2022 Jean-loup Gailly & Mark Adler\0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
|
|
@ -167,7 +167,7 @@
|
|||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
|
@ -193,8 +193,8 @@
|
|||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ASMV;ASMINF;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
|
@ -213,7 +213,7 @@
|
|||
</ResourceCompile>
|
||||
<Lib>
|
||||
<AdditionalOptions>/MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)zlibstat.lib</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
</Lib>
|
||||
|
@ -221,7 +221,7 @@
|
|||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
|
@ -251,7 +251,7 @@
|
|||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
|
@ -280,7 +280,7 @@
|
|||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
|
@ -309,8 +309,8 @@
|
|||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
|
@ -329,7 +329,7 @@
|
|||
</ResourceCompile>
|
||||
<Lib>
|
||||
<AdditionalOptions>/MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalDependencies>..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)zlibstat.lib</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
</Lib>
|
||||
|
@ -340,7 +340,7 @@
|
|||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
|
@ -370,7 +370,7 @@
|
|||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
|
@ -400,7 +400,7 @@
|
|||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
|
@ -434,14 +434,6 @@
|
|||
<ClCompile Include="..\..\..\gzread.c" />
|
||||
<ClCompile Include="..\..\..\gzwrite.c" />
|
||||
<ClCompile Include="..\..\..\infback.c" />
|
||||
<ClCompile Include="..\..\masmx64\inffas8664.c">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\inffast.c" />
|
||||
<ClCompile Include="..\..\..\inflate.c" />
|
||||
<ClCompile Include="..\..\..\inftrees.c" />
|
||||
|
|
|
@ -151,3 +151,8 @@ EXPORTS
|
|||
deflateGetDictionary @173
|
||||
adler32_z @174
|
||||
crc32_z @175
|
||||
|
||||
; zlib1 v1.2.12 added:
|
||||
crc32_combine_gen @176
|
||||
crc32_combine_gen64 @177
|
||||
crc32_combine_op @178
|
||||
|
|
|
@ -204,8 +204,8 @@
|
|||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
|
@ -226,7 +226,7 @@
|
|||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
|
||||
|
@ -240,10 +240,6 @@
|
|||
</DataExecutionPrevention>
|
||||
<ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>cd ..\..\masmx86
|
||||
bld_ml32.bat</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">
|
||||
<Midl>
|
||||
|
@ -255,7 +251,7 @@ bld_ml32.bat</Command>
|
|||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
|
@ -303,8 +299,8 @@ bld_ml32.bat</Command>
|
|||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
|
@ -327,7 +323,7 @@ bld_ml32.bat</Command>
|
|||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
|
||||
|
@ -341,10 +337,6 @@ bld_ml32.bat</Command>
|
|||
</DataExecutionPrevention>
|
||||
<ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>cd ..\..\masmx86
|
||||
bld_ml32.bat</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Midl>
|
||||
|
@ -356,8 +348,8 @@ bld_ml32.bat</Command>
|
|||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
|
@ -377,7 +369,7 @@ bld_ml32.bat</Command>
|
|||
<Culture>0x040c</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
|
||||
|
@ -389,10 +381,6 @@ bld_ml32.bat</Command>
|
|||
<ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>cd ..\..\contrib\masmx64
|
||||
bld_ml64.bat</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">
|
||||
<Midl>
|
||||
|
@ -404,7 +392,7 @@ bld_ml64.bat</Command>
|
|||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
|
@ -447,7 +435,7 @@ bld_ml64.bat</Command>
|
|||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
|
@ -492,7 +480,7 @@ bld_ml64.bat</Command>
|
|||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
|
@ -537,8 +525,8 @@ bld_ml64.bat</Command>
|
|||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
|
@ -560,7 +548,7 @@ bld_ml64.bat</Command>
|
|||
<Culture>0x040c</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
|
||||
|
@ -572,10 +560,6 @@ bld_ml64.bat</Command>
|
|||
<ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>cd ..\..\masmx64
|
||||
bld_ml64.bat</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">
|
||||
<Midl>
|
||||
|
@ -587,7 +571,7 @@ bld_ml64.bat</Command>
|
|||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
|
@ -632,14 +616,6 @@ bld_ml64.bat</Command>
|
|||
<ClCompile Include="..\..\..\gzread.c" />
|
||||
<ClCompile Include="..\..\..\gzwrite.c" />
|
||||
<ClCompile Include="..\..\..\infback.c" />
|
||||
<ClCompile Include="..\..\masmx64\inffas8664.c">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\inffast.c" />
|
||||
<ClCompile Include="..\..\..\inflate.c" />
|
||||
<ClCompile Include="..\..\..\inftrees.c" />
|
||||
|
|
|
@ -190,7 +190,7 @@
|
|||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ASMV;ASMINF;WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
|
@ -203,7 +203,7 @@
|
|||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)testzlib.exe</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(OutDir)testzlib.pdb</ProgramDatabaseFile>
|
||||
|
@ -250,7 +250,7 @@
|
|||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ASMV;ASMINF;WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
|
@ -263,7 +263,7 @@
|
|||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)testzlib.exe</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -279,14 +279,14 @@
|
|||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ASMV;ASMINF;WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">
|
||||
|
@ -362,14 +362,14 @@
|
|||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ASMV;ASMINF;WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">
|
||||
|
@ -408,14 +408,6 @@
|
|||
<ClCompile Include="..\..\..\crc32.c" />
|
||||
<ClCompile Include="..\..\..\deflate.c" />
|
||||
<ClCompile Include="..\..\..\infback.c" />
|
||||
<ClCompile Include="..\..\masmx64\inffas8664.c">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\inffast.c" />
|
||||
<ClCompile Include="..\..\..\inflate.c" />
|
||||
<ClCompile Include="..\..\..\inftrees.c" />
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
#define IDR_VERSION1 1
|
||||
IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE
|
||||
FILEVERSION 1, 2, 10, 0
|
||||
PRODUCTVERSION 1, 2, 10, 0
|
||||
FILEVERSION 1, 2, 13, 0
|
||||
PRODUCTVERSION 1, 2, 13, 0
|
||||
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||
FILEFLAGS 0
|
||||
FILEOS VOS_DOS_WINDOWS32
|
||||
|
@ -17,12 +17,12 @@ BEGIN
|
|||
|
||||
BEGIN
|
||||
VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0"
|
||||
VALUE "FileVersion", "1.2.10\0"
|
||||
VALUE "FileVersion", "1.2.13\0"
|
||||
VALUE "InternalName", "zlib\0"
|
||||
VALUE "OriginalFilename", "zlibwapi.dll\0"
|
||||
VALUE "ProductName", "ZLib.DLL\0"
|
||||
VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0"
|
||||
VALUE "LegalCopyright", "(C) 1995-2017 Jean-loup Gailly & Mark Adler\0"
|
||||
VALUE "LegalCopyright", "(C) 1995-2022 Jean-loup Gailly & Mark Adler\0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
|
|
@ -170,7 +170,7 @@
|
|||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
|
@ -196,8 +196,8 @@
|
|||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ASMV;ASMINF;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
|
@ -216,7 +216,7 @@
|
|||
</ResourceCompile>
|
||||
<Lib>
|
||||
<AdditionalOptions>/MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)zlibstat.lib</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
</Lib>
|
||||
|
@ -224,7 +224,7 @@
|
|||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
|
@ -254,7 +254,7 @@
|
|||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
|
@ -283,7 +283,7 @@
|
|||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
|
@ -312,8 +312,8 @@
|
|||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
|
@ -332,7 +332,7 @@
|
|||
</ResourceCompile>
|
||||
<Lib>
|
||||
<AdditionalOptions>/MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalDependencies>..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)zlibstat.lib</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
</Lib>
|
||||
|
@ -343,7 +343,7 @@
|
|||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
|
@ -373,7 +373,7 @@
|
|||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
|
@ -403,7 +403,7 @@
|
|||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
|
@ -437,14 +437,6 @@
|
|||
<ClCompile Include="..\..\..\gzread.c" />
|
||||
<ClCompile Include="..\..\..\gzwrite.c" />
|
||||
<ClCompile Include="..\..\..\infback.c" />
|
||||
<ClCompile Include="..\..\masmx64\inffas8664.c">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\inffast.c" />
|
||||
<ClCompile Include="..\..\..\inflate.c" />
|
||||
<ClCompile Include="..\..\..\inftrees.c" />
|
||||
|
|
|
@ -151,3 +151,8 @@ EXPORTS
|
|||
deflateGetDictionary @173
|
||||
adler32_z @174
|
||||
crc32_z @175
|
||||
|
||||
; zlib1 v1.2.12 added:
|
||||
crc32_combine_gen @176
|
||||
crc32_combine_gen64 @177
|
||||
crc32_combine_op @178
|
||||
|
|
|
@ -207,8 +207,8 @@
|
|||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
|
@ -229,7 +229,7 @@
|
|||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
|
||||
|
@ -243,10 +243,6 @@
|
|||
</DataExecutionPrevention>
|
||||
<ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>cd ..\..\masmx86
|
||||
bld_ml32.bat</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">
|
||||
<Midl>
|
||||
|
@ -258,7 +254,7 @@ bld_ml32.bat</Command>
|
|||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
|
@ -306,8 +302,8 @@ bld_ml32.bat</Command>
|
|||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
|
@ -330,7 +326,7 @@ bld_ml32.bat</Command>
|
|||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
|
||||
|
@ -345,10 +341,6 @@ bld_ml32.bat</Command>
|
|||
<ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
|
||||
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>cd ..\..\masmx86
|
||||
bld_ml32.bat</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Midl>
|
||||
|
@ -360,8 +352,8 @@ bld_ml32.bat</Command>
|
|||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
|
@ -381,7 +373,7 @@ bld_ml32.bat</Command>
|
|||
<Culture>0x040c</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
|
||||
|
@ -393,10 +385,6 @@ bld_ml32.bat</Command>
|
|||
<ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>cd ..\..\contrib\masmx64
|
||||
bld_ml64.bat</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">
|
||||
<Midl>
|
||||
|
@ -408,7 +396,7 @@ bld_ml64.bat</Command>
|
|||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
|
@ -451,7 +439,7 @@ bld_ml64.bat</Command>
|
|||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
|
@ -496,7 +484,7 @@ bld_ml64.bat</Command>
|
|||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
|
@ -541,8 +529,8 @@ bld_ml64.bat</Command>
|
|||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
|
@ -564,7 +552,7 @@ bld_ml64.bat</Command>
|
|||
<Culture>0x040c</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
|
||||
|
@ -576,10 +564,6 @@ bld_ml64.bat</Command>
|
|||
<ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>cd ..\..\masmx64
|
||||
bld_ml64.bat</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">
|
||||
<Midl>
|
||||
|
@ -591,7 +575,7 @@ bld_ml64.bat</Command>
|
|||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
|
@ -636,14 +620,6 @@ bld_ml64.bat</Command>
|
|||
<ClCompile Include="..\..\..\gzread.c" />
|
||||
<ClCompile Include="..\..\..\gzwrite.c" />
|
||||
<ClCompile Include="..\..\..\infback.c" />
|
||||
<ClCompile Include="..\..\masmx64\inffas8664.c">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\inffast.c" />
|
||||
<ClCompile Include="..\..\..\inflate.c" />
|
||||
<ClCompile Include="..\..\..\inftrees.c" />
|
||||
|
|
|
@ -190,7 +190,7 @@
|
|||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ASMV;ASMINF;WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
|
@ -203,7 +203,7 @@
|
|||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)testzlib.exe</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(OutDir)testzlib.pdb</ProgramDatabaseFile>
|
||||
|
@ -250,7 +250,7 @@
|
|||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ASMV;ASMINF;WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
|
@ -263,7 +263,7 @@
|
|||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)testzlib.exe</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -279,14 +279,14 @@
|
|||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ASMV;ASMINF;WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">
|
||||
|
@ -362,14 +362,14 @@
|
|||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ASMV;ASMINF;WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">
|
||||
|
@ -408,14 +408,6 @@
|
|||
<ClCompile Include="..\..\..\crc32.c" />
|
||||
<ClCompile Include="..\..\..\deflate.c" />
|
||||
<ClCompile Include="..\..\..\infback.c" />
|
||||
<ClCompile Include="..\..\masmx64\inffas8664.c">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\inffast.c" />
|
||||
<ClCompile Include="..\..\..\inflate.c" />
|
||||
<ClCompile Include="..\..\..\inftrees.c" />
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
#define IDR_VERSION1 1
|
||||
IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE
|
||||
FILEVERSION 1, 2, 10, 0
|
||||
PRODUCTVERSION 1, 2, 10, 0
|
||||
FILEVERSION 1, 2, 13, 0
|
||||
PRODUCTVERSION 1, 2, 13, 0
|
||||
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||
FILEFLAGS 0
|
||||
FILEOS VOS_DOS_WINDOWS32
|
||||
|
@ -17,12 +17,12 @@ BEGIN
|
|||
|
||||
BEGIN
|
||||
VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0"
|
||||
VALUE "FileVersion", "1.2.10\0"
|
||||
VALUE "FileVersion", "1.2.13\0"
|
||||
VALUE "InternalName", "zlib\0"
|
||||
VALUE "OriginalFilename", "zlibwapi.dll\0"
|
||||
VALUE "ProductName", "ZLib.DLL\0"
|
||||
VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0"
|
||||
VALUE "LegalCopyright", "(C) 1995-2017 Jean-loup Gailly & Mark Adler\0"
|
||||
VALUE "LegalCopyright", "(C) 1995-2022 Jean-loup Gailly & Mark Adler\0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
|
|
@ -170,7 +170,7 @@
|
|||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
|
@ -196,8 +196,8 @@
|
|||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ASMV;ASMINF;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
|
@ -216,7 +216,7 @@
|
|||
</ResourceCompile>
|
||||
<Lib>
|
||||
<AdditionalOptions>/MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)zlibstat.lib</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
</Lib>
|
||||
|
@ -224,7 +224,7 @@
|
|||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
|
@ -254,7 +254,7 @@
|
|||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
|
@ -283,7 +283,7 @@
|
|||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
|
@ -312,8 +312,8 @@
|
|||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
|
@ -332,7 +332,7 @@
|
|||
</ResourceCompile>
|
||||
<Lib>
|
||||
<AdditionalOptions>/MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalDependencies>..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)zlibstat.lib</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
</Lib>
|
||||
|
@ -343,7 +343,7 @@
|
|||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
|
@ -373,7 +373,7 @@
|
|||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
|
@ -403,7 +403,7 @@
|
|||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
|
@ -437,14 +437,6 @@
|
|||
<ClCompile Include="..\..\..\gzread.c" />
|
||||
<ClCompile Include="..\..\..\gzwrite.c" />
|
||||
<ClCompile Include="..\..\..\infback.c" />
|
||||
<ClCompile Include="..\..\masmx64\inffas8664.c">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\inffast.c" />
|
||||
<ClCompile Include="..\..\..\inflate.c" />
|
||||
<ClCompile Include="..\..\..\inftrees.c" />
|
||||
|
|
|
@ -151,3 +151,8 @@ EXPORTS
|
|||
deflateGetDictionary @173
|
||||
adler32_z @174
|
||||
crc32_z @175
|
||||
|
||||
; zlib1 v1.2.12 added:
|
||||
crc32_combine_gen @176
|
||||
crc32_combine_gen64 @177
|
||||
crc32_combine_op @178
|
||||
|
|
|
@ -207,8 +207,8 @@
|
|||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
|
@ -229,7 +229,7 @@
|
|||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
|
||||
|
@ -243,10 +243,6 @@
|
|||
</DataExecutionPrevention>
|
||||
<ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>cd ..\..\masmx86
|
||||
bld_ml32.bat</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">
|
||||
<Midl>
|
||||
|
@ -258,7 +254,7 @@ bld_ml32.bat</Command>
|
|||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
|
@ -306,8 +302,8 @@ bld_ml32.bat</Command>
|
|||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
|
@ -330,7 +326,7 @@ bld_ml32.bat</Command>
|
|||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
|
||||
|
@ -345,10 +341,6 @@ bld_ml32.bat</Command>
|
|||
<ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
|
||||
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>cd ..\..\masmx86
|
||||
bld_ml32.bat</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Midl>
|
||||
|
@ -360,8 +352,8 @@ bld_ml32.bat</Command>
|
|||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
|
@ -381,7 +373,7 @@ bld_ml32.bat</Command>
|
|||
<Culture>0x040c</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
|
||||
|
@ -393,10 +385,6 @@ bld_ml32.bat</Command>
|
|||
<ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>cd ..\..\contrib\masmx64
|
||||
bld_ml64.bat</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">
|
||||
<Midl>
|
||||
|
@ -408,7 +396,7 @@ bld_ml64.bat</Command>
|
|||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
|
@ -451,7 +439,7 @@ bld_ml64.bat</Command>
|
|||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
|
@ -496,7 +484,7 @@ bld_ml64.bat</Command>
|
|||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
|
@ -541,8 +529,8 @@ bld_ml64.bat</Command>
|
|||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
|
@ -564,7 +552,7 @@ bld_ml64.bat</Command>
|
|||
<Culture>0x040c</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
|
||||
|
@ -576,10 +564,6 @@ bld_ml64.bat</Command>
|
|||
<ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>cd ..\..\masmx64
|
||||
bld_ml64.bat</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">
|
||||
<Midl>
|
||||
|
@ -591,7 +575,7 @@ bld_ml64.bat</Command>
|
|||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
|
@ -636,14 +620,6 @@ bld_ml64.bat</Command>
|
|||
<ClCompile Include="..\..\..\gzread.c" />
|
||||
<ClCompile Include="..\..\..\gzwrite.c" />
|
||||
<ClCompile Include="..\..\..\infback.c" />
|
||||
<ClCompile Include="..\..\masmx64\inffas8664.c">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\inffast.c" />
|
||||
<ClCompile Include="..\..\..\inflate.c" />
|
||||
<ClCompile Include="..\..\..\inftrees.c" />
|
||||
|
|
|
@ -542,7 +542,7 @@
|
|||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\minizip\miniunz.c"
|
||||
|
|
|
@ -539,7 +539,7 @@
|
|||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\minizip\minizip.c"
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\.."
|
||||
PreprocessorDefinitions="ASMV;ASMINF;WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS"
|
||||
PreprocessorDefinitions="WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="0"
|
||||
RuntimeLibrary="1"
|
||||
|
@ -71,7 +71,6 @@
|
|||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="..\..\masmx86\match686.obj ..\..\masmx86\inffas32.obj"
|
||||
OutputFile="$(OutDir)/testzlib.exe"
|
||||
LinkIncremental="2"
|
||||
GenerateManifest="false"
|
||||
|
@ -128,7 +127,7 @@
|
|||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\.."
|
||||
PreprocessorDefinitions="ASMV;ASMINF;WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS"
|
||||
PreprocessorDefinitions="WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS"
|
||||
BasicRuntimeChecks="0"
|
||||
RuntimeLibrary="3"
|
||||
BufferSecurityCheck="false"
|
||||
|
@ -145,7 +144,6 @@
|
|||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="..\..\masmx64\gvmat64.obj ..\..\masmx64\inffasx64.obj"
|
||||
GenerateManifest="false"
|
||||
/>
|
||||
<Tool
|
||||
|
@ -517,7 +515,7 @@
|
|||
InlineFunctionExpansion="1"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories="..\..\.."
|
||||
PreprocessorDefinitions="ASMV;ASMINF;WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS"
|
||||
PreprocessorDefinitions="WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS"
|
||||
StringPooling="true"
|
||||
BasicRuntimeChecks="0"
|
||||
RuntimeLibrary="0"
|
||||
|
@ -540,7 +538,6 @@
|
|||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="..\..\masmx86\match686.obj ..\..\masmx86\inffas32.obj"
|
||||
OutputFile="$(OutDir)/testzlib.exe"
|
||||
LinkIncremental="1"
|
||||
GenerateManifest="false"
|
||||
|
@ -600,7 +597,7 @@
|
|||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\.."
|
||||
PreprocessorDefinitions="ASMV;ASMINF;WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS"
|
||||
PreprocessorDefinitions="WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS"
|
||||
BasicRuntimeChecks="0"
|
||||
RuntimeLibrary="0"
|
||||
BufferSecurityCheck="false"
|
||||
|
@ -617,7 +614,6 @@
|
|||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="..\..\masmx64\gvmat64.obj ..\..\masmx64\inffasx64.obj"
|
||||
GenerateManifest="false"
|
||||
/>
|
||||
<Tool
|
||||
|
@ -733,7 +729,7 @@
|
|||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\..\adler32.c"
|
||||
|
@ -755,58 +751,6 @@
|
|||
RelativePath="..\..\..\infback.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\masmx64\inffas8664.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Itanium"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="ReleaseWithoutAsm|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="ReleaseWithoutAsm|Itanium"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Itanium"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\inffast.c"
|
||||
>
|
||||
|
|
|
@ -542,7 +542,7 @@
|
|||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\testzlib\testzlib.c"
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
#define IDR_VERSION1 1
|
||||
IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE
|
||||
FILEVERSION 1, 2, 10, 0
|
||||
PRODUCTVERSION 1, 2, 10, 0
|
||||
FILEVERSION 1, 2, 13, 0
|
||||
PRODUCTVERSION 1, 2, 13, 0
|
||||
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||
FILEFLAGS 0
|
||||
FILEOS VOS_DOS_WINDOWS32
|
||||
|
@ -17,12 +17,12 @@ BEGIN
|
|||
|
||||
BEGIN
|
||||
VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0"
|
||||
VALUE "FileVersion", "1.2.10\0"
|
||||
VALUE "FileVersion", "1.2.13\0"
|
||||
VALUE "InternalName", "zlib\0"
|
||||
VALUE "OriginalFilename", "zlibwapi.dll\0"
|
||||
VALUE "ProductName", "ZLib.DLL\0"
|
||||
VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0"
|
||||
VALUE "LegalCopyright", "(C) 1995-2017 Jean-loup Gailly & Mark Adler\0"
|
||||
VALUE "LegalCopyright", "(C) 1995-2022 Jean-loup Gailly & Mark Adler\0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
|
||||
AdditionalIncludeDirectories="..\..\.."
|
||||
PreprocessorDefinitions="WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS"
|
||||
ExceptionHandling="0"
|
||||
RuntimeLibrary="1"
|
||||
|
@ -121,7 +121,7 @@
|
|||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
|
||||
AdditionalIncludeDirectories="..\..\.."
|
||||
PreprocessorDefinitions="ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64"
|
||||
ExceptionHandling="0"
|
||||
RuntimeLibrary="3"
|
||||
|
@ -195,7 +195,7 @@
|
|||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
|
||||
AdditionalIncludeDirectories="..\..\.."
|
||||
PreprocessorDefinitions="ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64"
|
||||
ExceptionHandling="0"
|
||||
RuntimeLibrary="3"
|
||||
|
@ -268,8 +268,8 @@
|
|||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
|
||||
PreprocessorDefinitions="WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ASMV;ASMINF"
|
||||
AdditionalIncludeDirectories="..\..\.."
|
||||
PreprocessorDefinitions="WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="0"
|
||||
RuntimeLibrary="0"
|
||||
|
@ -295,7 +295,6 @@
|
|||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
AdditionalOptions="/MACHINE:X86 /NODEFAULTLIB"
|
||||
AdditionalDependencies="..\..\masmx86\match686.obj ..\..\masmx86\inffas32.obj "
|
||||
OutputFile="$(OutDir)\zlibstat.lib"
|
||||
SuppressStartupBanner="true"
|
||||
/>
|
||||
|
@ -343,8 +342,8 @@
|
|||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
|
||||
PreprocessorDefinitions="ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ASMV;ASMINF;WIN64"
|
||||
AdditionalIncludeDirectories="..\..\.."
|
||||
PreprocessorDefinitions="ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="0"
|
||||
RuntimeLibrary="2"
|
||||
|
@ -370,7 +369,6 @@
|
|||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
AdditionalOptions="/MACHINE:AMD64 /NODEFAULTLIB"
|
||||
AdditionalDependencies="..\..\masmx64\gvmat64.obj ..\..\masmx64\inffasx64.obj "
|
||||
OutputFile="$(OutDir)\zlibstat.lib"
|
||||
SuppressStartupBanner="true"
|
||||
/>
|
||||
|
@ -418,7 +416,7 @@
|
|||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
|
||||
AdditionalIncludeDirectories="..\..\.."
|
||||
PreprocessorDefinitions="ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="0"
|
||||
|
@ -491,7 +489,7 @@
|
|||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
|
||||
AdditionalIncludeDirectories="..\..\.."
|
||||
PreprocessorDefinitions="WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="0"
|
||||
|
@ -565,7 +563,7 @@
|
|||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
|
||||
AdditionalIncludeDirectories="..\..\.."
|
||||
PreprocessorDefinitions="ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="0"
|
||||
|
@ -639,7 +637,7 @@
|
|||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
|
||||
AdditionalIncludeDirectories="..\..\.."
|
||||
PreprocessorDefinitions="ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="0"
|
||||
|
@ -732,58 +730,6 @@
|
|||
RelativePath="..\..\..\infback.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\masmx64\inffas8664.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Itanium"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Itanium"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="ReleaseWithoutAsm|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="ReleaseWithoutAsm|Itanium"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\inffast.c"
|
||||
>
|
||||
|
|
|
@ -151,3 +151,8 @@ EXPORTS
|
|||
deflateGetDictionary @173
|
||||
adler32_z @174
|
||||
crc32_z @175
|
||||
|
||||
; zlib1 v1.2.12 added:
|
||||
crc32_combine_gen @176
|
||||
crc32_combine_gen64 @177
|
||||
crc32_combine_op @178
|
||||
|
|
|
@ -53,8 +53,8 @@
|
|||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
|
||||
PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF"
|
||||
AdditionalIncludeDirectories="..\..\.."
|
||||
PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI"
|
||||
ExceptionHandling="0"
|
||||
RuntimeLibrary="1"
|
||||
BufferSecurityCheck="false"
|
||||
|
@ -81,7 +81,6 @@
|
|||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalOptions="/MACHINE:I386"
|
||||
AdditionalDependencies="..\..\masmx86\match686.obj ..\..\masmx86\inffas32.obj"
|
||||
OutputFile="$(OutDir)\zlibwapi.dll"
|
||||
LinkIncremental="2"
|
||||
SuppressStartupBanner="true"
|
||||
|
@ -150,8 +149,8 @@
|
|||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
|
||||
PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;WIN64"
|
||||
AdditionalIncludeDirectories="..\..\.."
|
||||
PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64"
|
||||
ExceptionHandling="0"
|
||||
RuntimeLibrary="3"
|
||||
BufferSecurityCheck="false"
|
||||
|
@ -177,7 +176,6 @@
|
|||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="..\..\masmx64\gvmat64.obj ..\..\masmx64\inffasx64.obj "
|
||||
OutputFile="$(OutDir)\zlibwapi.dll"
|
||||
LinkIncremental="2"
|
||||
SuppressStartupBanner="true"
|
||||
|
@ -245,7 +243,7 @@
|
|||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
|
||||
AdditionalIncludeDirectories="..\..\.."
|
||||
PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64"
|
||||
ExceptionHandling="0"
|
||||
RuntimeLibrary="3"
|
||||
|
@ -340,7 +338,7 @@
|
|||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
|
||||
AdditionalIncludeDirectories="..\..\.."
|
||||
PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="0"
|
||||
|
@ -440,7 +438,7 @@
|
|||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
|
||||
AdditionalIncludeDirectories="..\..\.."
|
||||
PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="0"
|
||||
|
@ -538,7 +536,7 @@
|
|||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
|
||||
AdditionalIncludeDirectories="..\..\.."
|
||||
PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="0"
|
||||
|
@ -636,8 +634,8 @@
|
|||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
|
||||
PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF"
|
||||
AdditionalIncludeDirectories="..\..\.."
|
||||
PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="0"
|
||||
RuntimeLibrary="0"
|
||||
|
@ -666,7 +664,6 @@
|
|||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalOptions="/MACHINE:I386"
|
||||
AdditionalDependencies="..\..\masmx86\match686.obj ..\..\masmx86\inffas32.obj "
|
||||
OutputFile="$(OutDir)\zlibwapi.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
|
@ -737,8 +734,8 @@
|
|||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
|
||||
PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;WIN64"
|
||||
AdditionalIncludeDirectories="..\..\.."
|
||||
PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="0"
|
||||
RuntimeLibrary="2"
|
||||
|
@ -766,7 +763,6 @@
|
|||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="..\..\masmx64\gvmat64.obj ..\..\masmx64\inffasx64.obj "
|
||||
OutputFile="$(OutDir)\zlibwapi.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
|
@ -836,7 +832,7 @@
|
|||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
|
||||
AdditionalIncludeDirectories="..\..\.."
|
||||
PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="0"
|
||||
|
@ -949,58 +945,6 @@
|
|||
RelativePath="..\..\..\infback.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\masmx64\inffas8664.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Itanium"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="ReleaseWithoutAsm|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="ReleaseWithoutAsm|Itanium"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Itanium"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\inffast.c"
|
||||
>
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
@ -38,15 +38,15 @@ The Algorithm
|
|||
|
||||
The algorithm works by dividing the set of bytecodes [0..255] into three
|
||||
categories:
|
||||
- The white list of textual bytecodes:
|
||||
- The allow list of textual bytecodes:
|
||||
9 (TAB), 10 (LF), 13 (CR), 32 (SPACE) to 255.
|
||||
- The gray list of tolerated bytecodes:
|
||||
7 (BEL), 8 (BS), 11 (VT), 12 (FF), 26 (SUB), 27 (ESC).
|
||||
- The black list of undesired, non-textual bytecodes:
|
||||
- The block list of undesired, non-textual bytecodes:
|
||||
0 (NUL) to 6, 14 to 31.
|
||||
|
||||
If a file contains at least one byte that belongs to the white list and
|
||||
no byte that belongs to the black list, then the file is categorized as
|
||||
If a file contains at least one byte that belongs to the allow list and
|
||||
no byte that belongs to the block list, then the file is categorized as
|
||||
plain text; otherwise, it is categorized as binary. (The boundary case,
|
||||
when the file is empty, automatically falls into the latter category.)
|
||||
|
||||
|
@ -84,9 +84,9 @@ consistent results, regardless what alphabet encoding is being used.
|
|||
results on a text encoded, say, using ISO-8859-16 versus UTF-8.)
|
||||
|
||||
There is an extra category of plain text files that are "polluted" with
|
||||
one or more black-listed codes, either by mistake or by peculiar design
|
||||
one or more block-listed codes, either by mistake or by peculiar design
|
||||
considerations. In such cases, a scheme that tolerates a small fraction
|
||||
of black-listed codes would provide an increased recall (i.e. more true
|
||||
of block-listed codes would provide an increased recall (i.e. more true
|
||||
positives). This, however, incurs a reduced precision overall, since
|
||||
false positives are more likely to appear in binary files that contain
|
||||
large chunks of textual data. Furthermore, "polluted" plain text should
|
||||
|
|
|
@ -34,6 +34,10 @@ gzlog.h
|
|||
and deflateSetDictionary()
|
||||
- illustrates use of a gzip header extra field
|
||||
|
||||
gznorm.c
|
||||
normalize a gzip file by combining members into a single member
|
||||
- demonstrates how to concatenate deflate streams using Z_BLOCK
|
||||
|
||||
zlib_how.html
|
||||
painfully comprehensive description of zpipe.c (see below)
|
||||
- describes in excruciating detail the use of deflate() and inflate()
|
||||
|
@ -44,6 +48,7 @@ zpipe.c
|
|||
- deeply commented in zlib_how.html (see above)
|
||||
|
||||
zran.c
|
||||
zran.h
|
||||
index a zlib or gzip stream and randomly access it
|
||||
- illustrates the use of Z_BLOCK, inflatePrime(), and
|
||||
inflateSetDictionary() to provide random access
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* enough.c -- determine the maximum size of inflate's Huffman code tables over
|
||||
* all possible valid and complete Huffman codes, subject to a length limit.
|
||||
* Copyright (C) 2007, 2008, 2012 Mark Adler
|
||||
* Version 1.4 18 August 2012 Mark Adler
|
||||
* all possible valid and complete prefix codes, subject to a length limit.
|
||||
* Copyright (C) 2007, 2008, 2012, 2018 Mark Adler
|
||||
* Version 1.5 5 August 2018 Mark Adler
|
||||
*/
|
||||
|
||||
/* Version history:
|
||||
|
@ -17,101 +17,107 @@
|
|||
1.4 18 Aug 2012 Avoid shifts more than bits in type (caused endless loop!)
|
||||
Clean up comparisons of different types
|
||||
Clean up code indentation
|
||||
1.5 5 Aug 2018 Clean up code style, formatting, and comments
|
||||
Show all the codes for the maximum, and only the maximum
|
||||
*/
|
||||
|
||||
/*
|
||||
Examine all possible Huffman codes for a given number of symbols and a
|
||||
maximum code length in bits to determine the maximum table size for zilb's
|
||||
inflate. Only complete Huffman codes are counted.
|
||||
Examine all possible prefix codes for a given number of symbols and a
|
||||
maximum code length in bits to determine the maximum table size for zlib's
|
||||
inflate. Only complete prefix codes are counted.
|
||||
|
||||
Two codes are considered distinct if the vectors of the number of codes per
|
||||
length are not identical. So permutations of the symbol assignments result
|
||||
length are not identical. So permutations of the symbol assignments result
|
||||
in the same code for the counting, as do permutations of the assignments of
|
||||
the bit values to the codes (i.e. only canonical codes are counted).
|
||||
|
||||
We build a code from shorter to longer lengths, determining how many symbols
|
||||
are coded at each length. At each step, we have how many symbols remain to
|
||||
are coded at each length. At each step, we have how many symbols remain to
|
||||
be coded, what the last code length used was, and how many bit patterns of
|
||||
that length remain unused. Then we add one to the code length and double the
|
||||
number of unused patterns to graduate to the next code length. We then
|
||||
number of unused patterns to graduate to the next code length. We then
|
||||
assign all portions of the remaining symbols to that code length that
|
||||
preserve the properties of a correct and eventually complete code. Those
|
||||
preserve the properties of a correct and eventually complete code. Those
|
||||
properties are: we cannot use more bit patterns than are available; and when
|
||||
all the symbols are used, there are exactly zero possible bit patterns
|
||||
remaining.
|
||||
all the symbols are used, there are exactly zero possible bit patterns left
|
||||
unused.
|
||||
|
||||
The inflate Huffman decoding algorithm uses two-level lookup tables for
|
||||
speed. There is a single first-level table to decode codes up to root bits
|
||||
in length (root == 9 in the current inflate implementation). The table
|
||||
has 1 << root entries and is indexed by the next root bits of input. Codes
|
||||
shorter than root bits have replicated table entries, so that the correct
|
||||
entry is pointed to regardless of the bits that follow the short code. If
|
||||
the code is longer than root bits, then the table entry points to a second-
|
||||
level table. The size of that table is determined by the longest code with
|
||||
that root-bit prefix. If that longest code has length len, then the table
|
||||
has size 1 << (len - root), to index the remaining bits in that set of
|
||||
codes. Each subsequent root-bit prefix then has its own sub-table. The
|
||||
total number of table entries required by the code is calculated
|
||||
incrementally as the number of codes at each bit length is populated. When
|
||||
all of the codes are shorter than root bits, then root is reduced to the
|
||||
longest code length, resulting in a single, smaller, one-level table.
|
||||
speed. There is a single first-level table to decode codes up to root bits
|
||||
in length (root == 9 for literal/length codes and root == 6 for distance
|
||||
codes, in the current inflate implementation). The base table has 1 << root
|
||||
entries and is indexed by the next root bits of input. Codes shorter than
|
||||
root bits have replicated table entries, so that the correct entry is
|
||||
pointed to regardless of the bits that follow the short code. If the code is
|
||||
longer than root bits, then the table entry points to a second-level table.
|
||||
The size of that table is determined by the longest code with that root-bit
|
||||
prefix. If that longest code has length len, then the table has size 1 <<
|
||||
(len - root), to index the remaining bits in that set of codes. Each
|
||||
subsequent root-bit prefix then has its own sub-table. The total number of
|
||||
table entries required by the code is calculated incrementally as the number
|
||||
of codes at each bit length is populated. When all of the codes are shorter
|
||||
than root bits, then root is reduced to the longest code length, resulting
|
||||
in a single, smaller, one-level table.
|
||||
|
||||
The inflate algorithm also provides for small values of root (relative to
|
||||
the log2 of the number of symbols), where the shortest code has more bits
|
||||
than root. In that case, root is increased to the length of the shortest
|
||||
code. This program, by design, does not handle that case, so it is verified
|
||||
that the number of symbols is less than 2^(root + 1).
|
||||
than root. In that case, root is increased to the length of the shortest
|
||||
code. This program, by design, does not handle that case, so it is verified
|
||||
that the number of symbols is less than 1 << (root + 1).
|
||||
|
||||
In order to speed up the examination (by about ten orders of magnitude for
|
||||
the default arguments), the intermediate states in the build-up of a code
|
||||
are remembered and previously visited branches are pruned. The memory
|
||||
are remembered and previously visited branches are pruned. The memory
|
||||
required for this will increase rapidly with the total number of symbols and
|
||||
the maximum code length in bits. However this is a very small price to pay
|
||||
the maximum code length in bits. However this is a very small price to pay
|
||||
for the vast speedup.
|
||||
|
||||
First, all of the possible Huffman codes are counted, and reachable
|
||||
First, all of the possible prefix codes are counted, and reachable
|
||||
intermediate states are noted by a non-zero count in a saved-results array.
|
||||
Second, the intermediate states that lead to (root + 1) bit or longer codes
|
||||
are used to look at all sub-codes from those junctures for their inflate
|
||||
memory usage. (The amount of memory used is not affected by the number of
|
||||
memory usage. (The amount of memory used is not affected by the number of
|
||||
codes of root bits or less in length.) Third, the visited states in the
|
||||
construction of those sub-codes and the associated calculation of the table
|
||||
size is recalled in order to avoid recalculating from the same juncture.
|
||||
Beginning the code examination at (root + 1) bit codes, which is enabled by
|
||||
identifying the reachable nodes, accounts for about six of the orders of
|
||||
magnitude of improvement for the default arguments. About another four
|
||||
orders of magnitude come from not revisiting previous states. Out of
|
||||
approximately 2x10^16 possible Huffman codes, only about 2x10^6 sub-codes
|
||||
magnitude of improvement for the default arguments. About another four
|
||||
orders of magnitude come from not revisiting previous states. Out of
|
||||
approximately 2x10^16 possible prefix codes, only about 2x10^6 sub-codes
|
||||
need to be examined to cover all of the possible table memory usage cases
|
||||
for the default arguments of 286 symbols limited to 15-bit codes.
|
||||
|
||||
Note that an unsigned long long type is used for counting. It is quite easy
|
||||
to exceed the capacity of an eight-byte integer with a large number of
|
||||
symbols and a large maximum code length, so multiple-precision arithmetic
|
||||
would need to replace the unsigned long long arithmetic in that case. This
|
||||
program will abort if an overflow occurs. The big_t type identifies where
|
||||
the counting takes place.
|
||||
Note that the uintmax_t type is used for counting. It is quite easy to
|
||||
exceed the capacity of an eight-byte integer with a large number of symbols
|
||||
and a large maximum code length, so multiple-precision arithmetic would need
|
||||
to replace the integer arithmetic in that case. This program will abort if
|
||||
an overflow occurs. The big_t type identifies where the counting takes
|
||||
place.
|
||||
|
||||
An unsigned long long type is also used for calculating the number of
|
||||
possible codes remaining at the maximum length. This limits the maximum
|
||||
code length to the number of bits in a long long minus the number of bits
|
||||
needed to represent the symbols in a flat code. The code_t type identifies
|
||||
where the bit pattern counting takes place.
|
||||
The uintmax_t type is also used for calculating the number of possible codes
|
||||
remaining at the maximum length. This limits the maximum code length to the
|
||||
number of bits in a long long minus the number of bits needed to represent
|
||||
the symbols in a flat code. The code_t type identifies where the bit-pattern
|
||||
counting takes place.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdint.h>
|
||||
#include <assert.h>
|
||||
|
||||
#define local static
|
||||
|
||||
/* special data types */
|
||||
typedef unsigned long long big_t; /* type for code counting */
|
||||
typedef unsigned long long code_t; /* type for bit pattern counting */
|
||||
struct tab { /* type for been here check */
|
||||
size_t len; /* length of bit vector in char's */
|
||||
char *vec; /* allocated bit vector */
|
||||
// Special data types.
|
||||
typedef uintmax_t big_t; // type for code counting
|
||||
#define PRIbig "ju" // printf format for big_t
|
||||
typedef uintmax_t code_t; // type for bit pattern counting
|
||||
struct tab { // type for been-here check
|
||||
size_t len; // allocated length of bit vector in octets
|
||||
char *vec; // allocated bit vector
|
||||
};
|
||||
|
||||
/* The array for saving results, num[], is indexed with this triplet:
|
||||
|
@ -126,447 +132,466 @@ struct tab { /* type for been here check */
|
|||
left: 2..syms - 1, but only the evens (so syms == 8 -> 2, 4, 6)
|
||||
len: 1..max - 1 (max == maximum code length in bits)
|
||||
|
||||
syms == 2 is not saved since that immediately leads to a single code. left
|
||||
syms == 2 is not saved since that immediately leads to a single code. left
|
||||
must be even, since it represents the number of available bit patterns at
|
||||
the current length, which is double the number at the previous length.
|
||||
left ends at syms-1 since left == syms immediately results in a single code.
|
||||
the current length, which is double the number at the previous length. left
|
||||
ends at syms-1 since left == syms immediately results in a single code.
|
||||
(left > sym is not allowed since that would result in an incomplete code.)
|
||||
len is less than max, since the code completes immediately when len == max.
|
||||
|
||||
The offset into the array is calculated for the three indices with the
|
||||
first one (syms) being outermost, and the last one (len) being innermost.
|
||||
We build the array with length max-1 lists for the len index, with syms-3
|
||||
of those for each symbol. There are totsym-2 of those, with each one
|
||||
varying in length as a function of sym. See the calculation of index in
|
||||
count() for the index, and the calculation of size in main() for the size
|
||||
of the array.
|
||||
The offset into the array is calculated for the three indices with the first
|
||||
one (syms) being outermost, and the last one (len) being innermost. We build
|
||||
the array with length max-1 lists for the len index, with syms-3 of those
|
||||
for each symbol. There are totsym-2 of those, with each one varying in
|
||||
length as a function of sym. See the calculation of index in map() for the
|
||||
index, and the calculation of size in main() for the size of the array.
|
||||
|
||||
For the deflate example of 286 symbols limited to 15-bit codes, the array
|
||||
has 284,284 entries, taking up 2.17 MB for an 8-byte big_t. More than
|
||||
half of the space allocated for saved results is actually used -- not all
|
||||
possible triplets are reached in the generation of valid Huffman codes.
|
||||
has 284,284 entries, taking up 2.17 MB for an 8-byte big_t. More than half
|
||||
of the space allocated for saved results is actually used -- not all
|
||||
possible triplets are reached in the generation of valid prefix codes.
|
||||
*/
|
||||
|
||||
/* The array for tracking visited states, done[], is itself indexed identically
|
||||
to the num[] array as described above for the (syms, left, len) triplet.
|
||||
Each element in the array is further indexed by the (mem, rem) doublet,
|
||||
where mem is the amount of inflate table space used so far, and rem is the
|
||||
remaining unused entries in the current inflate sub-table. Each indexed
|
||||
remaining unused entries in the current inflate sub-table. Each indexed
|
||||
element is simply one bit indicating whether the state has been visited or
|
||||
not. Since the ranges for mem and rem are not known a priori, each bit
|
||||
not. Since the ranges for mem and rem are not known a priori, each bit
|
||||
vector is of a variable size, and grows as needed to accommodate the visited
|
||||
states. mem and rem are used to calculate a single index in a triangular
|
||||
array. Since the range of mem is expected in the default case to be about
|
||||
states. mem and rem are used to calculate a single index in a triangular
|
||||
array. Since the range of mem is expected in the default case to be about
|
||||
ten times larger than the range of rem, the array is skewed to reduce the
|
||||
memory usage, with eight times the range for mem than for rem. See the
|
||||
calculations for offset and bit in beenhere() for the details.
|
||||
memory usage, with eight times the range for mem than for rem. See the
|
||||
calculations for offset and bit in been_here() for the details.
|
||||
|
||||
For the deflate example of 286 symbols limited to 15-bit codes, the bit
|
||||
vectors grow to total approximately 21 MB, in addition to the 4.3 MB done[]
|
||||
array itself.
|
||||
vectors grow to total 5.5 MB, in addition to the 4.3 MB done array itself.
|
||||
*/
|
||||
|
||||
/* Globals to avoid propagating constants or constant pointers recursively */
|
||||
local int max; /* maximum allowed bit length for the codes */
|
||||
local int root; /* size of base code table in bits */
|
||||
local int large; /* largest code table so far */
|
||||
local size_t size; /* number of elements in num and done */
|
||||
local int *code; /* number of symbols assigned to each bit length */
|
||||
local big_t *num; /* saved results array for code counting */
|
||||
local struct tab *done; /* states already evaluated array */
|
||||
// Type for a variable-length, allocated string.
|
||||
typedef struct {
|
||||
char *str; // pointer to allocated string
|
||||
size_t size; // size of allocation
|
||||
size_t len; // length of string, not including terminating zero
|
||||
} string_t;
|
||||
|
||||
/* Index function for num[] and done[] */
|
||||
#define INDEX(i,j,k) (((size_t)((i-1)>>1)*((i-2)>>1)+(j>>1)-1)*(max-1)+k-1)
|
||||
|
||||
/* Free allocated space. Uses globals code, num, and done. */
|
||||
local void cleanup(void)
|
||||
{
|
||||
size_t n;
|
||||
|
||||
if (done != NULL) {
|
||||
for (n = 0; n < size; n++)
|
||||
if (done[n].len)
|
||||
free(done[n].vec);
|
||||
free(done);
|
||||
}
|
||||
if (num != NULL)
|
||||
free(num);
|
||||
if (code != NULL)
|
||||
free(code);
|
||||
// Clear a string_t.
|
||||
local void string_clear(string_t *s) {
|
||||
s->str[0] = 0;
|
||||
s->len = 0;
|
||||
}
|
||||
|
||||
/* Return the number of possible Huffman codes using bit patterns of lengths
|
||||
len through max inclusive, coding syms symbols, with left bit patterns of
|
||||
length len unused -- return -1 if there is an overflow in the counting.
|
||||
Keep a record of previous results in num to prevent repeating the same
|
||||
calculation. Uses the globals max and num. */
|
||||
local big_t count(int syms, int len, int left)
|
||||
{
|
||||
big_t sum; /* number of possible codes from this juncture */
|
||||
big_t got; /* value returned from count() */
|
||||
int least; /* least number of syms to use at this juncture */
|
||||
int most; /* most number of syms to use at this juncture */
|
||||
int use; /* number of bit patterns to use in next call */
|
||||
size_t index; /* index of this case in *num */
|
||||
// Initialize a string_t.
|
||||
local void string_init(string_t *s) {
|
||||
s->size = 16;
|
||||
s->str = malloc(s->size);
|
||||
assert(s->str != NULL && "out of memory");
|
||||
string_clear(s);
|
||||
}
|
||||
|
||||
/* see if only one possible code */
|
||||
// Release the allocation of a string_t.
|
||||
local void string_free(string_t *s) {
|
||||
free(s->str);
|
||||
s->str = NULL;
|
||||
s->size = 0;
|
||||
s->len = 0;
|
||||
}
|
||||
|
||||
// Save the results of printf with fmt and the subsequent argument list to s.
|
||||
// Each call appends to s. The allocated space for s is increased as needed.
|
||||
local void string_printf(string_t *s, char *fmt, ...) {
|
||||
va_list ap;
|
||||
va_start(ap, fmt);
|
||||
size_t len = s->len;
|
||||
int ret = vsnprintf(s->str + len, s->size - len, fmt, ap);
|
||||
assert(ret >= 0 && "out of memory");
|
||||
s->len += ret;
|
||||
if (s->size < s->len + 1) {
|
||||
do {
|
||||
s->size <<= 1;
|
||||
assert(s->size != 0 && "overflow");
|
||||
} while (s->size < s->len + 1);
|
||||
s->str = realloc(s->str, s->size);
|
||||
assert(s->str != NULL && "out of memory");
|
||||
vsnprintf(s->str + len, s->size - len, fmt, ap);
|
||||
}
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
// Globals to avoid propagating constants or constant pointers recursively.
|
||||
struct {
|
||||
int max; // maximum allowed bit length for the codes
|
||||
int root; // size of base code table in bits
|
||||
int large; // largest code table so far
|
||||
size_t size; // number of elements in num and done
|
||||
big_t tot; // total number of codes with maximum tables size
|
||||
string_t out; // display of subcodes for maximum tables size
|
||||
int *code; // number of symbols assigned to each bit length
|
||||
big_t *num; // saved results array for code counting
|
||||
struct tab *done; // states already evaluated array
|
||||
} g;
|
||||
|
||||
// Index function for num[] and done[].
|
||||
local inline size_t map(int syms, int left, int len) {
|
||||
return ((size_t)((syms - 1) >> 1) * ((syms - 2) >> 1) +
|
||||
(left >> 1) - 1) * (g.max - 1) +
|
||||
len - 1;
|
||||
}
|
||||
|
||||
// Free allocated space in globals.
|
||||
local void cleanup(void) {
|
||||
if (g.done != NULL) {
|
||||
for (size_t n = 0; n < g.size; n++)
|
||||
if (g.done[n].len)
|
||||
free(g.done[n].vec);
|
||||
g.size = 0;
|
||||
free(g.done); g.done = NULL;
|
||||
}
|
||||
free(g.num); g.num = NULL;
|
||||
free(g.code); g.code = NULL;
|
||||
string_free(&g.out);
|
||||
}
|
||||
|
||||
// Return the number of possible prefix codes using bit patterns of lengths len
|
||||
// through max inclusive, coding syms symbols, with left bit patterns of length
|
||||
// len unused -- return -1 if there is an overflow in the counting. Keep a
|
||||
// record of previous results in num to prevent repeating the same calculation.
|
||||
local big_t count(int syms, int left, int len) {
|
||||
// see if only one possible code
|
||||
if (syms == left)
|
||||
return 1;
|
||||
|
||||
/* note and verify the expected state */
|
||||
assert(syms > left && left > 0 && len < max);
|
||||
// note and verify the expected state
|
||||
assert(syms > left && left > 0 && len < g.max);
|
||||
|
||||
/* see if we've done this one already */
|
||||
index = INDEX(syms, left, len);
|
||||
got = num[index];
|
||||
// see if we've done this one already
|
||||
size_t index = map(syms, left, len);
|
||||
big_t got = g.num[index];
|
||||
if (got)
|
||||
return got; /* we have -- return the saved result */
|
||||
return got; // we have -- return the saved result
|
||||
|
||||
/* we need to use at least this many bit patterns so that the code won't be
|
||||
incomplete at the next length (more bit patterns than symbols) */
|
||||
least = (left << 1) - syms;
|
||||
// we need to use at least this many bit patterns so that the code won't be
|
||||
// incomplete at the next length (more bit patterns than symbols)
|
||||
int least = (left << 1) - syms;
|
||||
if (least < 0)
|
||||
least = 0;
|
||||
|
||||
/* we can use at most this many bit patterns, lest there not be enough
|
||||
available for the remaining symbols at the maximum length (if there were
|
||||
no limit to the code length, this would become: most = left - 1) */
|
||||
most = (((code_t)left << (max - len)) - syms) /
|
||||
(((code_t)1 << (max - len)) - 1);
|
||||
// we can use at most this many bit patterns, lest there not be enough
|
||||
// available for the remaining symbols at the maximum length (if there were
|
||||
// no limit to the code length, this would become: most = left - 1)
|
||||
int most = (((code_t)left << (g.max - len)) - syms) /
|
||||
(((code_t)1 << (g.max - len)) - 1);
|
||||
|
||||
/* count all possible codes from this juncture and add them up */
|
||||
sum = 0;
|
||||
for (use = least; use <= most; use++) {
|
||||
got = count(syms - use, len + 1, (left - use) << 1);
|
||||
// count all possible codes from this juncture and add them up
|
||||
big_t sum = 0;
|
||||
for (int use = least; use <= most; use++) {
|
||||
got = count(syms - use, (left - use) << 1, len + 1);
|
||||
sum += got;
|
||||
if (got == (big_t)0 - 1 || sum < got) /* overflow */
|
||||
return (big_t)0 - 1;
|
||||
if (got == (big_t)-1 || sum < got) // overflow
|
||||
return (big_t)-1;
|
||||
}
|
||||
|
||||
/* verify that all recursive calls are productive */
|
||||
// verify that all recursive calls are productive
|
||||
assert(sum != 0);
|
||||
|
||||
/* save the result and return it */
|
||||
num[index] = sum;
|
||||
// save the result and return it
|
||||
g.num[index] = sum;
|
||||
return sum;
|
||||
}
|
||||
|
||||
/* Return true if we've been here before, set to true if not. Set a bit in a
|
||||
bit vector to indicate visiting this state. Each (syms,len,left) state
|
||||
has a variable size bit vector indexed by (mem,rem). The bit vector is
|
||||
lengthened if needed to allow setting the (mem,rem) bit. */
|
||||
local int beenhere(int syms, int len, int left, int mem, int rem)
|
||||
{
|
||||
size_t index; /* index for this state's bit vector */
|
||||
size_t offset; /* offset in this state's bit vector */
|
||||
int bit; /* mask for this state's bit */
|
||||
size_t length; /* length of the bit vector in bytes */
|
||||
char *vector; /* new or enlarged bit vector */
|
||||
|
||||
/* point to vector for (syms,left,len), bit in vector for (mem,rem) */
|
||||
index = INDEX(syms, left, len);
|
||||
mem -= 1 << root;
|
||||
offset = (mem >> 3) + rem;
|
||||
// Return true if we've been here before, set to true if not. Set a bit in a
|
||||
// bit vector to indicate visiting this state. Each (syms,len,left) state has a
|
||||
// variable size bit vector indexed by (mem,rem). The bit vector is lengthened
|
||||
// as needed to allow setting the (mem,rem) bit.
|
||||
local int been_here(int syms, int left, int len, int mem, int rem) {
|
||||
// point to vector for (syms,left,len), bit in vector for (mem,rem)
|
||||
size_t index = map(syms, left, len);
|
||||
mem -= 1 << g.root; // mem always includes the root table
|
||||
mem >>= 1; // mem and rem are always even
|
||||
rem >>= 1;
|
||||
size_t offset = (mem >> 3) + rem;
|
||||
offset = ((offset * (offset + 1)) >> 1) + rem;
|
||||
bit = 1 << (mem & 7);
|
||||
int bit = 1 << (mem & 7);
|
||||
|
||||
/* see if we've been here */
|
||||
length = done[index].len;
|
||||
if (offset < length && (done[index].vec[offset] & bit) != 0)
|
||||
return 1; /* done this! */
|
||||
// see if we've been here
|
||||
size_t length = g.done[index].len;
|
||||
if (offset < length && (g.done[index].vec[offset] & bit) != 0)
|
||||
return 1; // done this!
|
||||
|
||||
/* we haven't been here before -- set the bit to show we have now */
|
||||
// we haven't been here before -- set the bit to show we have now
|
||||
|
||||
/* see if we need to lengthen the vector in order to set the bit */
|
||||
// see if we need to lengthen the vector in order to set the bit
|
||||
if (length <= offset) {
|
||||
/* if we have one already, enlarge it, zero out the appended space */
|
||||
// if we have one already, enlarge it, zero out the appended space
|
||||
char *vector;
|
||||
if (length) {
|
||||
do {
|
||||
length <<= 1;
|
||||
} while (length <= offset);
|
||||
vector = realloc(done[index].vec, length);
|
||||
if (vector != NULL)
|
||||
memset(vector + done[index].len, 0, length - done[index].len);
|
||||
vector = realloc(g.done[index].vec, length);
|
||||
assert(vector != NULL && "out of memory");
|
||||
memset(vector + g.done[index].len, 0, length - g.done[index].len);
|
||||
}
|
||||
|
||||
/* otherwise we need to make a new vector and zero it out */
|
||||
// otherwise we need to make a new vector and zero it out
|
||||
else {
|
||||
length = 1 << (len - root);
|
||||
length = 16;
|
||||
while (length <= offset)
|
||||
length <<= 1;
|
||||
vector = calloc(length, sizeof(char));
|
||||
vector = calloc(length, 1);
|
||||
assert(vector != NULL && "out of memory");
|
||||
}
|
||||
|
||||
/* in either case, bail if we can't get the memory */
|
||||
if (vector == NULL) {
|
||||
fputs("abort: unable to allocate enough memory\n", stderr);
|
||||
cleanup();
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/* install the new vector */
|
||||
done[index].len = length;
|
||||
done[index].vec = vector;
|
||||
// install the new vector
|
||||
g.done[index].len = length;
|
||||
g.done[index].vec = vector;
|
||||
}
|
||||
|
||||
/* set the bit */
|
||||
done[index].vec[offset] |= bit;
|
||||
// set the bit
|
||||
g.done[index].vec[offset] |= bit;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Examine all possible codes from the given node (syms, len, left). Compute
|
||||
the amount of memory required to build inflate's decoding tables, where the
|
||||
number of code structures used so far is mem, and the number remaining in
|
||||
the current sub-table is rem. Uses the globals max, code, root, large, and
|
||||
done. */
|
||||
local void examine(int syms, int len, int left, int mem, int rem)
|
||||
{
|
||||
int least; /* least number of syms to use at this juncture */
|
||||
int most; /* most number of syms to use at this juncture */
|
||||
int use; /* number of bit patterns to use in next call */
|
||||
|
||||
/* see if we have a complete code */
|
||||
// Examine all possible codes from the given node (syms, len, left). Compute
|
||||
// the amount of memory required to build inflate's decoding tables, where the
|
||||
// number of code structures used so far is mem, and the number remaining in
|
||||
// the current sub-table is rem.
|
||||
local void examine(int syms, int left, int len, int mem, int rem) {
|
||||
// see if we have a complete code
|
||||
if (syms == left) {
|
||||
/* set the last code entry */
|
||||
code[len] = left;
|
||||
// set the last code entry
|
||||
g.code[len] = left;
|
||||
|
||||
/* complete computation of memory used by this code */
|
||||
// complete computation of memory used by this code
|
||||
while (rem < left) {
|
||||
left -= rem;
|
||||
rem = 1 << (len - root);
|
||||
rem = 1 << (len - g.root);
|
||||
mem += rem;
|
||||
}
|
||||
assert(rem == left);
|
||||
|
||||
/* if this is a new maximum, show the entries used and the sub-code */
|
||||
if (mem > large) {
|
||||
large = mem;
|
||||
printf("max %d: ", mem);
|
||||
for (use = root + 1; use <= max; use++)
|
||||
if (code[use])
|
||||
printf("%d[%d] ", code[use], use);
|
||||
putchar('\n');
|
||||
fflush(stdout);
|
||||
// if this is at the maximum, show the sub-code
|
||||
if (mem >= g.large) {
|
||||
// if this is a new maximum, update the maximum and clear out the
|
||||
// printed sub-codes from the previous maximum
|
||||
if (mem > g.large) {
|
||||
g.large = mem;
|
||||
string_clear(&g.out);
|
||||
}
|
||||
|
||||
// compute the starting state for this sub-code
|
||||
syms = 0;
|
||||
left = 1 << g.max;
|
||||
for (int bits = g.max; bits > g.root; bits--) {
|
||||
syms += g.code[bits];
|
||||
left -= g.code[bits];
|
||||
assert((left & 1) == 0);
|
||||
left >>= 1;
|
||||
}
|
||||
|
||||
// print the starting state and the resulting sub-code to g.out
|
||||
string_printf(&g.out, "<%u, %u, %u>:",
|
||||
syms, g.root + 1, ((1 << g.root) - left) << 1);
|
||||
for (int bits = g.root + 1; bits <= g.max; bits++)
|
||||
if (g.code[bits])
|
||||
string_printf(&g.out, " %d[%d]", g.code[bits], bits);
|
||||
string_printf(&g.out, "\n");
|
||||
}
|
||||
|
||||
/* remove entries as we drop back down in the recursion */
|
||||
code[len] = 0;
|
||||
// remove entries as we drop back down in the recursion
|
||||
g.code[len] = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
/* prune the tree if we can */
|
||||
if (beenhere(syms, len, left, mem, rem))
|
||||
// prune the tree if we can
|
||||
if (been_here(syms, left, len, mem, rem))
|
||||
return;
|
||||
|
||||
/* we need to use at least this many bit patterns so that the code won't be
|
||||
incomplete at the next length (more bit patterns than symbols) */
|
||||
least = (left << 1) - syms;
|
||||
// we need to use at least this many bit patterns so that the code won't be
|
||||
// incomplete at the next length (more bit patterns than symbols)
|
||||
int least = (left << 1) - syms;
|
||||
if (least < 0)
|
||||
least = 0;
|
||||
|
||||
/* we can use at most this many bit patterns, lest there not be enough
|
||||
available for the remaining symbols at the maximum length (if there were
|
||||
no limit to the code length, this would become: most = left - 1) */
|
||||
most = (((code_t)left << (max - len)) - syms) /
|
||||
(((code_t)1 << (max - len)) - 1);
|
||||
// we can use at most this many bit patterns, lest there not be enough
|
||||
// available for the remaining symbols at the maximum length (if there were
|
||||
// no limit to the code length, this would become: most = left - 1)
|
||||
int most = (((code_t)left << (g.max - len)) - syms) /
|
||||
(((code_t)1 << (g.max - len)) - 1);
|
||||
|
||||
/* occupy least table spaces, creating new sub-tables as needed */
|
||||
use = least;
|
||||
// occupy least table spaces, creating new sub-tables as needed
|
||||
int use = least;
|
||||
while (rem < use) {
|
||||
use -= rem;
|
||||
rem = 1 << (len - root);
|
||||
rem = 1 << (len - g.root);
|
||||
mem += rem;
|
||||
}
|
||||
rem -= use;
|
||||
|
||||
/* examine codes from here, updating table space as we go */
|
||||
// examine codes from here, updating table space as we go
|
||||
for (use = least; use <= most; use++) {
|
||||
code[len] = use;
|
||||
examine(syms - use, len + 1, (left - use) << 1,
|
||||
mem + (rem ? 1 << (len - root) : 0), rem << 1);
|
||||
g.code[len] = use;
|
||||
examine(syms - use, (left - use) << 1, len + 1,
|
||||
mem + (rem ? 1 << (len - g.root) : 0), rem << 1);
|
||||
if (rem == 0) {
|
||||
rem = 1 << (len - root);
|
||||
rem = 1 << (len - g.root);
|
||||
mem += rem;
|
||||
}
|
||||
rem--;
|
||||
}
|
||||
|
||||
/* remove entries as we drop back down in the recursion */
|
||||
code[len] = 0;
|
||||
// remove entries as we drop back down in the recursion
|
||||
g.code[len] = 0;
|
||||
}
|
||||
|
||||
/* Look at all sub-codes starting with root + 1 bits. Look at only the valid
|
||||
intermediate code states (syms, left, len). For each completed code,
|
||||
calculate the amount of memory required by inflate to build the decoding
|
||||
tables. Find the maximum amount of memory required and show the code that
|
||||
requires that maximum. Uses the globals max, root, and num. */
|
||||
local void enough(int syms)
|
||||
{
|
||||
int n; /* number of remaing symbols for this node */
|
||||
int left; /* number of unused bit patterns at this length */
|
||||
size_t index; /* index of this case in *num */
|
||||
// Look at all sub-codes starting with root + 1 bits. Look at only the valid
|
||||
// intermediate code states (syms, left, len). For each completed code,
|
||||
// calculate the amount of memory required by inflate to build the decoding
|
||||
// tables. Find the maximum amount of memory required and show the codes that
|
||||
// require that maximum.
|
||||
local void enough(int syms) {
|
||||
// clear code
|
||||
for (int n = 0; n <= g.max; n++)
|
||||
g.code[n] = 0;
|
||||
|
||||
/* clear code */
|
||||
for (n = 0; n <= max; n++)
|
||||
code[n] = 0;
|
||||
// look at all (root + 1) bit and longer codes
|
||||
string_clear(&g.out); // empty saved results
|
||||
g.large = 1 << g.root; // base table
|
||||
if (g.root < g.max) // otherwise, there's only a base table
|
||||
for (int n = 3; n <= syms; n++)
|
||||
for (int left = 2; left < n; left += 2) {
|
||||
// look at all reachable (root + 1) bit nodes, and the
|
||||
// resulting codes (complete at root + 2 or more)
|
||||
size_t index = map(n, left, g.root + 1);
|
||||
if (g.root + 1 < g.max && g.num[index]) // reachable node
|
||||
examine(n, left, g.root + 1, 1 << g.root, 0);
|
||||
|
||||
/* look at all (root + 1) bit and longer codes */
|
||||
large = 1 << root; /* base table */
|
||||
if (root < max) /* otherwise, there's only a base table */
|
||||
for (n = 3; n <= syms; n++)
|
||||
for (left = 2; left < n; left += 2)
|
||||
{
|
||||
/* look at all reachable (root + 1) bit nodes, and the
|
||||
resulting codes (complete at root + 2 or more) */
|
||||
index = INDEX(n, left, root + 1);
|
||||
if (root + 1 < max && num[index]) /* reachable node */
|
||||
examine(n, root + 1, left, 1 << root, 0);
|
||||
|
||||
/* also look at root bit codes with completions at root + 1
|
||||
bits (not saved in num, since complete), just in case */
|
||||
if (num[index - 1] && n <= left << 1)
|
||||
examine((n - left) << 1, root + 1, (n - left) << 1,
|
||||
1 << root, 0);
|
||||
// also look at root bit codes with completions at root + 1
|
||||
// bits (not saved in num, since complete), just in case
|
||||
if (g.num[index - 1] && n <= left << 1)
|
||||
examine((n - left) << 1, (n - left) << 1, g.root + 1,
|
||||
1 << g.root, 0);
|
||||
}
|
||||
|
||||
/* done */
|
||||
printf("done: maximum of %d table entries\n", large);
|
||||
// done
|
||||
printf("maximum of %d table entries for root = %d\n", g.large, g.root);
|
||||
fputs(g.out.str, stdout);
|
||||
}
|
||||
|
||||
/*
|
||||
Examine and show the total number of possible Huffman codes for a given
|
||||
maximum number of symbols, initial root table size, and maximum code length
|
||||
in bits -- those are the command arguments in that order. The default
|
||||
values are 286, 9, and 15 respectively, for the deflate literal/length code.
|
||||
The possible codes are counted for each number of coded symbols from two to
|
||||
the maximum. The counts for each of those and the total number of codes are
|
||||
shown. The maximum number of inflate table entires is then calculated
|
||||
across all possible codes. Each new maximum number of table entries and the
|
||||
associated sub-code (starting at root + 1 == 10 bits) is shown.
|
||||
// Examine and show the total number of possible prefix codes for a given
|
||||
// maximum number of symbols, initial root table size, and maximum code length
|
||||
// in bits -- those are the command arguments in that order. The default values
|
||||
// are 286, 9, and 15 respectively, for the deflate literal/length code. The
|
||||
// possible codes are counted for each number of coded symbols from two to the
|
||||
// maximum. The counts for each of those and the total number of codes are
|
||||
// shown. The maximum number of inflate table entries is then calculated across
|
||||
// all possible codes. Each new maximum number of table entries and the
|
||||
// associated sub-code (starting at root + 1 == 10 bits) is shown.
|
||||
//
|
||||
// To count and examine prefix codes that are not length-limited, provide a
|
||||
// maximum length equal to the number of symbols minus one.
|
||||
//
|
||||
// For the deflate literal/length code, use "enough". For the deflate distance
|
||||
// code, use "enough 30 6".
|
||||
int main(int argc, char **argv) {
|
||||
// set up globals for cleanup()
|
||||
g.code = NULL;
|
||||
g.num = NULL;
|
||||
g.done = NULL;
|
||||
string_init(&g.out);
|
||||
|
||||
To count and examine Huffman codes that are not length-limited, provide a
|
||||
maximum length equal to the number of symbols minus one.
|
||||
|
||||
For the deflate literal/length code, use "enough". For the deflate distance
|
||||
code, use "enough 30 6".
|
||||
|
||||
This uses the %llu printf format to print big_t numbers, which assumes that
|
||||
big_t is an unsigned long long. If the big_t type is changed (for example
|
||||
to a multiple precision type), the method of printing will also need to be
|
||||
updated.
|
||||
*/
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
int syms; /* total number of symbols to code */
|
||||
int n; /* number of symbols to code for this run */
|
||||
big_t got; /* return value of count() */
|
||||
big_t sum; /* accumulated number of codes over n */
|
||||
code_t word; /* for counting bits in code_t */
|
||||
|
||||
/* set up globals for cleanup() */
|
||||
code = NULL;
|
||||
num = NULL;
|
||||
done = NULL;
|
||||
|
||||
/* get arguments -- default to the deflate literal/length code */
|
||||
syms = 286;
|
||||
root = 9;
|
||||
max = 15;
|
||||
// get arguments -- default to the deflate literal/length code
|
||||
int syms = 286;
|
||||
g.root = 9;
|
||||
g.max = 15;
|
||||
if (argc > 1) {
|
||||
syms = atoi(argv[1]);
|
||||
if (argc > 2) {
|
||||
root = atoi(argv[2]);
|
||||
g.root = atoi(argv[2]);
|
||||
if (argc > 3)
|
||||
max = atoi(argv[3]);
|
||||
g.max = atoi(argv[3]);
|
||||
}
|
||||
}
|
||||
if (argc > 4 || syms < 2 || root < 1 || max < 1) {
|
||||
if (argc > 4 || syms < 2 || g.root < 1 || g.max < 1) {
|
||||
fputs("invalid arguments, need: [sym >= 2 [root >= 1 [max >= 1]]]\n",
|
||||
stderr);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* if not restricting the code length, the longest is syms - 1 */
|
||||
if (max > syms - 1)
|
||||
max = syms - 1;
|
||||
// if not restricting the code length, the longest is syms - 1
|
||||
if (g.max > syms - 1)
|
||||
g.max = syms - 1;
|
||||
|
||||
/* determine the number of bits in a code_t */
|
||||
for (n = 0, word = 1; word; n++, word <<= 1)
|
||||
;
|
||||
// determine the number of bits in a code_t
|
||||
int bits = 0;
|
||||
for (code_t word = 1; word; word <<= 1)
|
||||
bits++;
|
||||
|
||||
/* make sure that the calculation of most will not overflow */
|
||||
if (max > n || (code_t)(syms - 2) >= (((code_t)0 - 1) >> (max - 1))) {
|
||||
// make sure that the calculation of most will not overflow
|
||||
if (g.max > bits || (code_t)(syms - 2) >= ((code_t)-1 >> (g.max - 1))) {
|
||||
fputs("abort: code length too long for internal types\n", stderr);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* reject impossible code requests */
|
||||
if ((code_t)(syms - 1) > ((code_t)1 << max) - 1) {
|
||||
// reject impossible code requests
|
||||
if ((code_t)(syms - 1) > ((code_t)1 << g.max) - 1) {
|
||||
fprintf(stderr, "%d symbols cannot be coded in %d bits\n",
|
||||
syms, max);
|
||||
syms, g.max);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* allocate code vector */
|
||||
code = calloc(max + 1, sizeof(int));
|
||||
if (code == NULL) {
|
||||
fputs("abort: unable to allocate enough memory\n", stderr);
|
||||
return 1;
|
||||
}
|
||||
// allocate code vector
|
||||
g.code = calloc(g.max + 1, sizeof(int));
|
||||
assert(g.code != NULL && "out of memory");
|
||||
|
||||
/* determine size of saved results array, checking for overflows,
|
||||
allocate and clear the array (set all to zero with calloc()) */
|
||||
if (syms == 2) /* iff max == 1 */
|
||||
num = NULL; /* won't be saving any results */
|
||||
// determine size of saved results array, checking for overflows,
|
||||
// allocate and clear the array (set all to zero with calloc())
|
||||
if (syms == 2) // iff max == 1
|
||||
g.num = NULL; // won't be saving any results
|
||||
else {
|
||||
size = syms >> 1;
|
||||
if (size > ((size_t)0 - 1) / (n = (syms - 1) >> 1) ||
|
||||
(size *= n, size > ((size_t)0 - 1) / (n = max - 1)) ||
|
||||
(size *= n, size > ((size_t)0 - 1) / sizeof(big_t)) ||
|
||||
(num = calloc(size, sizeof(big_t))) == NULL) {
|
||||
fputs("abort: unable to allocate enough memory\n", stderr);
|
||||
cleanup();
|
||||
return 1;
|
||||
}
|
||||
g.size = syms >> 1;
|
||||
int n = (syms - 1) >> 1;
|
||||
assert(g.size <= (size_t)-1 / n && "overflow");
|
||||
g.size *= n;
|
||||
n = g.max - 1;
|
||||
assert(g.size <= (size_t)-1 / n && "overflow");
|
||||
g.size *= n;
|
||||
g.num = calloc(g.size, sizeof(big_t));
|
||||
assert(g.num != NULL && "out of memory");
|
||||
}
|
||||
|
||||
/* count possible codes for all numbers of symbols, add up counts */
|
||||
sum = 0;
|
||||
for (n = 2; n <= syms; n++) {
|
||||
got = count(n, 1, 2);
|
||||
// count possible codes for all numbers of symbols, add up counts
|
||||
big_t sum = 0;
|
||||
for (int n = 2; n <= syms; n++) {
|
||||
big_t got = count(n, 2, 1);
|
||||
sum += got;
|
||||
if (got == (big_t)0 - 1 || sum < got) { /* overflow */
|
||||
fputs("abort: can't count that high!\n", stderr);
|
||||
cleanup();
|
||||
return 1;
|
||||
}
|
||||
printf("%llu %d-codes\n", got, n);
|
||||
assert(got != (big_t)-1 && sum >= got && "overflow");
|
||||
}
|
||||
printf("%llu total codes for 2 to %d symbols", sum, syms);
|
||||
if (max < syms - 1)
|
||||
printf(" (%d-bit length limit)\n", max);
|
||||
printf("%"PRIbig" total codes for 2 to %d symbols", sum, syms);
|
||||
if (g.max < syms - 1)
|
||||
printf(" (%d-bit length limit)\n", g.max);
|
||||
else
|
||||
puts(" (no length limit)");
|
||||
|
||||
/* allocate and clear done array for beenhere() */
|
||||
// allocate and clear done array for been_here()
|
||||
if (syms == 2)
|
||||
done = NULL;
|
||||
else if (size > ((size_t)0 - 1) / sizeof(struct tab) ||
|
||||
(done = calloc(size, sizeof(struct tab))) == NULL) {
|
||||
fputs("abort: unable to allocate enough memory\n", stderr);
|
||||
cleanup();
|
||||
return 1;
|
||||
g.done = NULL;
|
||||
else {
|
||||
g.done = calloc(g.size, sizeof(struct tab));
|
||||
assert(g.done != NULL && "out of memory");
|
||||
}
|
||||
|
||||
/* find and show maximum inflate table usage */
|
||||
if (root > max) /* reduce root to max length */
|
||||
root = max;
|
||||
if ((code_t)syms < ((code_t)1 << (root + 1)))
|
||||
// find and show maximum inflate table usage
|
||||
if (g.root > g.max) // reduce root to max length
|
||||
g.root = g.max;
|
||||
if ((code_t)syms < ((code_t)1 << (g.root + 1)))
|
||||
enough(syms);
|
||||
else
|
||||
puts("cannot handle minimum code lengths > root");
|
||||
fputs("cannot handle minimum code lengths > root", stderr);
|
||||
|
||||
/* done */
|
||||
// done
|
||||
cleanup();
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
data in order to determine how much of that input will compress to
|
||||
nearly the requested output block size. The first pass generates
|
||||
enough deflate blocks to produce output to fill the requested
|
||||
output size plus a specfied excess amount (see the EXCESS define
|
||||
output size plus a specified excess amount (see the EXCESS define
|
||||
below). The last deflate block may go quite a bit past that, but
|
||||
is discarded. The second pass decompresses and recompresses just
|
||||
the compressed data that fit in the requested plus excess sized
|
||||
|
@ -109,7 +109,7 @@ local int recompress(z_streamp inf, z_streamp def)
|
|||
if (ret == Z_MEM_ERROR)
|
||||
return ret;
|
||||
|
||||
/* compress what was decompresed until done or no room */
|
||||
/* compress what was decompressed until done or no room */
|
||||
def->avail_in = RAWLEN - inf->avail_out;
|
||||
def->next_in = raw;
|
||||
if (inf->avail_out != 0)
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
gun will also decompress files made by Unix compress, which uses LZW
|
||||
compression. These files are automatically detected by virtue of their
|
||||
magic header bytes. Since the end of Unix compress stream is marked by the
|
||||
end-of-file, they cannot be concantenated. If a Unix compress stream is
|
||||
end-of-file, they cannot be concatenated. If a Unix compress stream is
|
||||
encountered in an input file, it is the last stream in that file.
|
||||
|
||||
Like gunzip and uncompress, the file attributes of the original compressed
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
* - Add L to constants in lseek() calls
|
||||
* - Remove some debugging information in error messages
|
||||
* - Use new data_type definition for zlib 1.2.1
|
||||
* - Simplfy and unify file operations
|
||||
* - Simplify and unify file operations
|
||||
* - Finish off gzip file in gztack()
|
||||
* - Use deflatePrime() instead of adding empty blocks
|
||||
* - Keep gzip file clean on appended file read errors
|
||||
|
@ -54,7 +54,7 @@
|
|||
block boundary to facilitate locating and modifying the last block bit at
|
||||
the start of the final deflate block. Also whether using Z_BLOCK or not,
|
||||
another required feature of zlib 1.2.x is that inflate() now provides the
|
||||
number of unusued bits in the last input byte used. gzappend will not work
|
||||
number of unused bits in the last input byte used. gzappend will not work
|
||||
with versions of zlib earlier than 1.2.1.
|
||||
|
||||
gzappend first decompresses the gzip file internally, discarding all but
|
||||
|
@ -137,7 +137,7 @@ local void rotate(unsigned char *list, unsigned len, unsigned rot)
|
|||
/* do simple left shift by one */
|
||||
if (rot == 1) {
|
||||
tmp = *list;
|
||||
memcpy(list, list + 1, len - 1);
|
||||
memmove(list, list + 1, len - 1);
|
||||
*last = tmp;
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/*
|
||||
* gzlog.c
|
||||
* Copyright (C) 2004, 2008, 2012, 2016 Mark Adler, all rights reserved
|
||||
* Copyright (C) 2004, 2008, 2012, 2016, 2019 Mark Adler, all rights reserved
|
||||
* For conditions of distribution and use, see copyright notice in gzlog.h
|
||||
* version 2.2, 14 Aug 2012
|
||||
* version 2.3, 25 May 2019
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -756,12 +756,14 @@ local int log_recover(struct log *log, int op)
|
|||
return -2;
|
||||
}
|
||||
if ((fd = open(log->path, O_RDONLY, 0)) < 0) {
|
||||
free(data);
|
||||
log_log(log, op, ".add file read failure");
|
||||
return -1;
|
||||
}
|
||||
ret = (size_t)read(fd, data, len) != len;
|
||||
close(fd);
|
||||
if (ret) {
|
||||
free(data);
|
||||
log_log(log, op, ".add file read failure");
|
||||
return -1;
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
its new size at that time. After each write operation, the log file is a
|
||||
valid gzip file that can decompressed to recover what was written.
|
||||
|
||||
The gzlog operations can be interupted at any point due to an application or
|
||||
The gzlog operations can be interrupted at any point due to an application or
|
||||
system crash, and the log file will be recovered the next time the log is
|
||||
opened with gzlog_open().
|
||||
*/
|
||||
|
|
|
@ -0,0 +1,470 @@
|
|||
/* gznorm.c -- normalize a gzip stream
|
||||
* Copyright (C) 2018 Mark Adler
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
* Version 1.0 7 Oct 2018 Mark Adler */
|
||||
|
||||
// gznorm takes a gzip stream, potentially containing multiple members, and
|
||||
// converts it to a gzip stream with a single member. In addition the gzip
|
||||
// header is normalized, removing the file name and time stamp, and setting the
|
||||
// other header contents (XFL, OS) to fixed values. gznorm does not recompress
|
||||
// the data, so it is fast, but no advantage is gained from the history that
|
||||
// could be available across member boundaries.
|
||||
|
||||
#include <stdio.h> // fread, fwrite, putc, fflush, ferror, fprintf,
|
||||
// vsnprintf, stdout, stderr, NULL, FILE
|
||||
#include <stdlib.h> // malloc, free
|
||||
#include <string.h> // strerror
|
||||
#include <errno.h> // errno
|
||||
#include <stdarg.h> // va_list, va_start, va_end
|
||||
#include "zlib.h" // inflateInit2, inflate, inflateReset, inflateEnd,
|
||||
// z_stream, z_off_t, crc32_combine, Z_NULL, Z_BLOCK,
|
||||
// Z_OK, Z_STREAM_END, Z_BUF_ERROR, Z_DATA_ERROR,
|
||||
// Z_MEM_ERROR
|
||||
|
||||
#if defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(__CYGWIN__)
|
||||
# include <fcntl.h>
|
||||
# include <io.h>
|
||||
# define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY)
|
||||
#else
|
||||
# define SET_BINARY_MODE(file)
|
||||
#endif
|
||||
|
||||
#define local static
|
||||
|
||||
// printf to an allocated string. Return the string, or NULL if the printf or
|
||||
// allocation fails.
|
||||
local char *aprintf(char *fmt, ...) {
|
||||
// Get the length of the result of the printf.
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
int len = vsnprintf(NULL, 0, fmt, args);
|
||||
va_end(args);
|
||||
if (len < 0)
|
||||
return NULL;
|
||||
|
||||
// Allocate the required space and printf to it.
|
||||
char *str = malloc(len + 1);
|
||||
if (str == NULL)
|
||||
return NULL;
|
||||
va_start(args, fmt);
|
||||
vsnprintf(str, len + 1, fmt, args);
|
||||
va_end(args);
|
||||
return str;
|
||||
}
|
||||
|
||||
// Return with an error, putting an allocated error message in *err. Doing an
|
||||
// inflateEnd() on an already ended state, or one with state set to Z_NULL, is
|
||||
// permitted.
|
||||
#define BYE(...) \
|
||||
do { \
|
||||
inflateEnd(&strm); \
|
||||
*err = aprintf(__VA_ARGS__); \
|
||||
return 1; \
|
||||
} while (0)
|
||||
|
||||
// Chunk size for buffered reads and for decompression. Twice this many bytes
|
||||
// will be allocated on the stack by gzip_normalize(). Must fit in an unsigned.
|
||||
#define CHUNK 16384
|
||||
|
||||
// Read a gzip stream from in and write an equivalent normalized gzip stream to
|
||||
// out. If given no input, an empty gzip stream will be written. If successful,
|
||||
// 0 is returned, and *err is set to NULL. On error, 1 is returned, where the
|
||||
// details of the error are returned in *err, a pointer to an allocated string.
|
||||
//
|
||||
// The input may be a stream with multiple gzip members, which is converted to
|
||||
// a single gzip member on the output. Each gzip member is decompressed at the
|
||||
// level of deflate blocks. This enables clearing the last-block bit, shifting
|
||||
// the compressed data to concatenate to the previous member's compressed data,
|
||||
// which can end at an arbitrary bit boundary, and identifying stored blocks in
|
||||
// order to resynchronize those to byte boundaries. The deflate compressed data
|
||||
// is terminated with a 10-bit empty fixed block. If any members on the input
|
||||
// end with a 10-bit empty fixed block, then that block is excised from the
|
||||
// stream. This avoids appending empty fixed blocks for every normalization,
|
||||
// and assures that gzip_normalize applied a second time will not change the
|
||||
// input. The pad bits after stored block headers and after the final deflate
|
||||
// block are all forced to zeros.
|
||||
local int gzip_normalize(FILE *in, FILE *out, char **err) {
|
||||
// initialize the inflate engine to process a gzip member
|
||||
z_stream strm;
|
||||
strm.zalloc = Z_NULL;
|
||||
strm.zfree = Z_NULL;
|
||||
strm.opaque = Z_NULL;
|
||||
strm.avail_in = 0;
|
||||
strm.next_in = Z_NULL;
|
||||
if (inflateInit2(&strm, 15 + 16) != Z_OK)
|
||||
BYE("out of memory");
|
||||
|
||||
// State while processing the input gzip stream.
|
||||
enum { // BETWEEN -> HEAD -> BLOCK -> TAIL -> BETWEEN -> ...
|
||||
BETWEEN, // between gzip members (must end in this state)
|
||||
HEAD, // reading a gzip header
|
||||
BLOCK, // reading deflate blocks
|
||||
TAIL // reading a gzip trailer
|
||||
} state = BETWEEN; // current component being processed
|
||||
unsigned long crc = 0; // accumulated CRC of uncompressed data
|
||||
unsigned long len = 0; // accumulated length of uncompressed data
|
||||
unsigned long buf = 0; // deflate stream bit buffer of num bits
|
||||
int num = 0; // number of bits in buf (at bottom)
|
||||
|
||||
// Write a canonical gzip header (no mod time, file name, comment, extra
|
||||
// block, or extra flags, and OS is marked as unknown).
|
||||
fwrite("\x1f\x8b\x08\0\0\0\0\0\0\xff", 1, 10, out);
|
||||
|
||||
// Process the gzip stream from in until reaching the end of the input,
|
||||
// encountering invalid input, or experiencing an i/o error.
|
||||
int more; // true if not at the end of the input
|
||||
do {
|
||||
// State inside this loop.
|
||||
unsigned char *put; // next input buffer location to process
|
||||
int prev; // number of bits from previous block in
|
||||
// the bit buffer, or -1 if not at the
|
||||
// start of a block
|
||||
unsigned long long memb; // uncompressed length of member
|
||||
size_t tail; // number of trailer bytes read (0..8)
|
||||
unsigned long part; // accumulated trailer component
|
||||
|
||||
// Get the next chunk of input from in.
|
||||
unsigned char dat[CHUNK];
|
||||
strm.avail_in = fread(dat, 1, CHUNK, in);
|
||||
if (strm.avail_in == 0)
|
||||
break;
|
||||
more = strm.avail_in == CHUNK;
|
||||
strm.next_in = put = dat;
|
||||
|
||||
// Run that chunk of input through the inflate engine to exhaustion.
|
||||
do {
|
||||
// At this point it is assured that strm.avail_in > 0.
|
||||
|
||||
// Inflate until the end of a gzip component (header, deflate
|
||||
// block, trailer) is reached, or until all of the chunk is
|
||||
// consumed. The resulting decompressed data is discarded, though
|
||||
// the total size of the decompressed data in each member is
|
||||
// tracked, for the calculation of the total CRC.
|
||||
do {
|
||||
// inflate and handle any errors
|
||||
unsigned char scrap[CHUNK];
|
||||
strm.avail_out = CHUNK;
|
||||
strm.next_out = scrap;
|
||||
int ret = inflate(&strm, Z_BLOCK);
|
||||
if (ret == Z_MEM_ERROR)
|
||||
BYE("out of memory");
|
||||
if (ret == Z_DATA_ERROR)
|
||||
BYE("input invalid: %s", strm.msg);
|
||||
if (ret != Z_OK && ret != Z_BUF_ERROR && ret != Z_STREAM_END)
|
||||
BYE("internal error");
|
||||
|
||||
// Update the number of uncompressed bytes generated in this
|
||||
// member. The actual count (not modulo 2^32) is required to
|
||||
// correctly compute the total CRC.
|
||||
unsigned got = CHUNK - strm.avail_out;
|
||||
memb += got;
|
||||
if (memb < got)
|
||||
BYE("overflow error");
|
||||
|
||||
// Continue to process this chunk until it is consumed, or
|
||||
// until the end of a component (header, deflate block, or
|
||||
// trailer) is reached.
|
||||
} while (strm.avail_out == 0 && (strm.data_type & 0x80) == 0);
|
||||
|
||||
// Since strm.avail_in was > 0 for the inflate call, some input was
|
||||
// just consumed. It is therefore assured that put < strm.next_in.
|
||||
|
||||
// Disposition the consumed component or part of a component.
|
||||
switch (state) {
|
||||
case BETWEEN:
|
||||
state = HEAD;
|
||||
// Fall through to HEAD when some or all of the header is
|
||||
// processed.
|
||||
|
||||
case HEAD:
|
||||
// Discard the header.
|
||||
if (strm.data_type & 0x80) {
|
||||
// End of header reached -- deflate blocks follow.
|
||||
put = strm.next_in;
|
||||
prev = num;
|
||||
memb = 0;
|
||||
state = BLOCK;
|
||||
}
|
||||
break;
|
||||
|
||||
case BLOCK:
|
||||
// Copy the deflate stream to the output, but with the
|
||||
// last-block-bit cleared. Re-synchronize stored block
|
||||
// headers to the output byte boundaries. The bytes at
|
||||
// put..strm.next_in-1 is the compressed data that has been
|
||||
// processed and is ready to be copied to the output.
|
||||
|
||||
// At this point, it is assured that new compressed data is
|
||||
// available, i.e., put < strm.next_in. If prev is -1, then
|
||||
// that compressed data starts in the middle of a deflate
|
||||
// block. If prev is not -1, then the bits in the bit
|
||||
// buffer, possibly combined with the bits in *put, contain
|
||||
// the three-bit header of the new deflate block. In that
|
||||
// case, prev is the number of bits from the previous block
|
||||
// that remain in the bit buffer. Since num is the number
|
||||
// of bits in the bit buffer, we have that num - prev is
|
||||
// the number of bits from the new block currently in the
|
||||
// bit buffer.
|
||||
|
||||
// If strm.data_type & 0xc0 is 0x80, then the last byte of
|
||||
// the available compressed data includes the last bits of
|
||||
// the end of a deflate block. In that case, that last byte
|
||||
// also has strm.data_type & 0x1f bits of the next deflate
|
||||
// block, in the range 0..7. If strm.data_type & 0xc0 is
|
||||
// 0xc0, then the last byte of the compressed data is the
|
||||
// end of the deflate stream, followed by strm.data_type &
|
||||
// 0x1f pad bits, also in the range 0..7.
|
||||
|
||||
// Set bits to the number of bits not yet consumed from the
|
||||
// last byte. If we are at the end of the block, bits is
|
||||
// either the number of bits in the last byte belonging to
|
||||
// the next block, or the number of pad bits after the
|
||||
// final block. In either of those cases, bits is in the
|
||||
// range 0..7.
|
||||
; // (required due to C syntax oddity)
|
||||
int bits = strm.data_type & 0x1f;
|
||||
|
||||
if (prev != -1) {
|
||||
// We are at the start of a new block. Clear the last
|
||||
// block bit, and check for special cases. If it is a
|
||||
// stored block, then emit the header and pad to the
|
||||
// next byte boundary. If it is a final, empty fixed
|
||||
// block, then excise it.
|
||||
|
||||
// Some or all of the three header bits for this block
|
||||
// may already be in the bit buffer. Load any remaining
|
||||
// header bits into the bit buffer.
|
||||
if (num - prev < 3) {
|
||||
buf += (unsigned long)*put++ << num;
|
||||
num += 8;
|
||||
}
|
||||
|
||||
// Set last to have a 1 in the position of the last
|
||||
// block bit in the bit buffer.
|
||||
unsigned long last = (unsigned long)1 << prev;
|
||||
|
||||
if (((buf >> prev) & 7) == 3) {
|
||||
// This is a final fixed block. Load at least ten
|
||||
// bits from this block, including the header, into
|
||||
// the bit buffer. We already have at least three,
|
||||
// so at most one more byte needs to be loaded.
|
||||
if (num - prev < 10) {
|
||||
if (put == strm.next_in)
|
||||
// Need to go get and process more input.
|
||||
// We'll end up back here to finish this.
|
||||
break;
|
||||
buf += (unsigned long)*put++ << num;
|
||||
num += 8;
|
||||
}
|
||||
if (((buf >> prev) & 0x3ff) == 3) {
|
||||
// That final fixed block is empty. Delete it
|
||||
// to avoid adding an empty block every time a
|
||||
// gzip stream is normalized.
|
||||
num = prev;
|
||||
buf &= last - 1; // zero the pad bits
|
||||
}
|
||||
}
|
||||
else if (((buf >> prev) & 6) == 0) {
|
||||
// This is a stored block. Flush to the next
|
||||
// byte boundary after the three-bit header.
|
||||
num = (prev + 10) & ~7;
|
||||
buf &= last - 1; // zero the pad bits
|
||||
}
|
||||
|
||||
// Clear the last block bit.
|
||||
buf &= ~last;
|
||||
|
||||
// Write out complete bytes in the bit buffer.
|
||||
while (num >= 8) {
|
||||
putc(buf, out);
|
||||
buf >>= 8;
|
||||
num -= 8;
|
||||
}
|
||||
|
||||
// If no more bytes left to process, then we have
|
||||
// consumed the byte that had bits from the next block.
|
||||
if (put == strm.next_in)
|
||||
bits = 0;
|
||||
}
|
||||
|
||||
// We are done handling the deflate block header. Now copy
|
||||
// all or almost all of the remaining compressed data that
|
||||
// has been processed so far. Don't copy one byte at the
|
||||
// end if it contains bits from the next deflate block or
|
||||
// pad bits at the end of a deflate block.
|
||||
|
||||
// mix is 1 if we are at the end of a deflate block, and if
|
||||
// some of the bits in the last byte follow this block. mix
|
||||
// is 0 if we are in the middle of a deflate block, if the
|
||||
// deflate block ended on a byte boundary, or if all of the
|
||||
// compressed data processed so far has been consumed.
|
||||
int mix = (strm.data_type & 0x80) && bits;
|
||||
|
||||
// Copy all of the processed compressed data to the output,
|
||||
// except for the last byte if it contains bits from the
|
||||
// next deflate block or pad bits at the end of the deflate
|
||||
// stream. Copy the data after shifting in num bits from
|
||||
// buf in front of it, leaving num bits from the end of the
|
||||
// compressed data in buf when done.
|
||||
unsigned char *end = strm.next_in - mix;
|
||||
if (put < end) {
|
||||
if (num)
|
||||
// Insert num bits from buf before the data being
|
||||
// copied.
|
||||
do {
|
||||
buf += (unsigned)(*put++) << num;
|
||||
putc(buf, out);
|
||||
buf >>= 8;
|
||||
} while (put < end);
|
||||
else {
|
||||
// No shifting needed -- write directly.
|
||||
fwrite(put, 1, end - put, out);
|
||||
put = end;
|
||||
}
|
||||
}
|
||||
|
||||
// Process the last processed byte if it wasn't written.
|
||||
if (mix) {
|
||||
// Load the last byte into the bit buffer.
|
||||
buf += (unsigned)(*put++) << num;
|
||||
num += 8;
|
||||
|
||||
if (strm.data_type & 0x40) {
|
||||
// We are at the end of the deflate stream and
|
||||
// there are bits pad bits. Discard the pad bits
|
||||
// and write a byte to the output, if available.
|
||||
// Leave the num bits left over in buf to prepend
|
||||
// to the next deflate stream.
|
||||
num -= bits;
|
||||
if (num >= 8) {
|
||||
putc(buf, out);
|
||||
num -= 8;
|
||||
buf >>= 8;
|
||||
}
|
||||
|
||||
// Force the pad bits in the bit buffer to zeros.
|
||||
buf &= ((unsigned long)1 << num) - 1;
|
||||
|
||||
// Don't need to set prev here since going to TAIL.
|
||||
}
|
||||
else
|
||||
// At the end of an internal deflate block. Leave
|
||||
// the last byte in the bit buffer to examine on
|
||||
// the next entry to BLOCK, when more bits from the
|
||||
// next block will be available.
|
||||
prev = num - bits; // number of bits in buffer
|
||||
// from current block
|
||||
}
|
||||
|
||||
// Don't have a byte left over, so we are in the middle of
|
||||
// a deflate block, or the deflate block ended on a byte
|
||||
// boundary. Set prev appropriately for the next entry into
|
||||
// BLOCK.
|
||||
else if (strm.data_type & 0x80)
|
||||
// The block ended on a byte boundary, so no header
|
||||
// bits are in the bit buffer.
|
||||
prev = num;
|
||||
else
|
||||
// In the middle of a deflate block, so no header here.
|
||||
prev = -1;
|
||||
|
||||
// Check for the end of the deflate stream.
|
||||
if ((strm.data_type & 0xc0) == 0xc0) {
|
||||
// That ends the deflate stream on the input side, the
|
||||
// pad bits were discarded, and any remaining bits from
|
||||
// the last block in the stream are saved in the bit
|
||||
// buffer to prepend to the next stream. Process the
|
||||
// gzip trailer next.
|
||||
tail = 0;
|
||||
part = 0;
|
||||
state = TAIL;
|
||||
}
|
||||
break;
|
||||
|
||||
case TAIL:
|
||||
// Accumulate available trailer bytes to update the total
|
||||
// CRC and the total uncompressed length.
|
||||
do {
|
||||
part = (part >> 8) + ((unsigned long)(*put++) << 24);
|
||||
tail++;
|
||||
if (tail == 4) {
|
||||
// Update the total CRC.
|
||||
z_off_t len2 = memb;
|
||||
if (len2 < 0 || (unsigned long long)len2 != memb)
|
||||
BYE("overflow error");
|
||||
crc = crc ? crc32_combine(crc, part, len2) : part;
|
||||
part = 0;
|
||||
}
|
||||
else if (tail == 8) {
|
||||
// Update the total uncompressed length. (It's ok
|
||||
// if this sum is done modulo 2^32.)
|
||||
len += part;
|
||||
|
||||
// At the end of a member. Set up to inflate an
|
||||
// immediately following gzip member. (If we made
|
||||
// it this far, then the trailer was valid.)
|
||||
if (inflateReset(&strm) != Z_OK)
|
||||
BYE("internal error");
|
||||
state = BETWEEN;
|
||||
break;
|
||||
}
|
||||
} while (put < strm.next_in);
|
||||
break;
|
||||
}
|
||||
|
||||
// Process the input buffer until completely consumed.
|
||||
} while (strm.avail_in > 0);
|
||||
|
||||
// Process input until end of file, invalid input, or i/o error.
|
||||
} while (more);
|
||||
|
||||
// Done with the inflate engine.
|
||||
inflateEnd(&strm);
|
||||
|
||||
// Verify the validity of the input.
|
||||
if (state != BETWEEN)
|
||||
BYE("input invalid: incomplete gzip stream");
|
||||
|
||||
// Write the remaining deflate stream bits, followed by a terminating
|
||||
// deflate fixed block.
|
||||
buf += (unsigned long)3 << num;
|
||||
putc(buf, out);
|
||||
putc(buf >> 8, out);
|
||||
if (num > 6)
|
||||
putc(0, out);
|
||||
|
||||
// Write the gzip trailer, which is the CRC and the uncompressed length
|
||||
// modulo 2^32, both in little-endian order.
|
||||
putc(crc, out);
|
||||
putc(crc >> 8, out);
|
||||
putc(crc >> 16, out);
|
||||
putc(crc >> 24, out);
|
||||
putc(len, out);
|
||||
putc(len >> 8, out);
|
||||
putc(len >> 16, out);
|
||||
putc(len >> 24, out);
|
||||
fflush(out);
|
||||
|
||||
// Check for any i/o errors.
|
||||
if (ferror(in) || ferror(out))
|
||||
BYE("i/o error: %s", strerror(errno));
|
||||
|
||||
// All good!
|
||||
*err = NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Normalize the gzip stream on stdin, writing the result to stdout.
|
||||
int main(void) {
|
||||
// Avoid end-of-line conversions on evil operating systems.
|
||||
SET_BINARY_MODE(stdin);
|
||||
SET_BINARY_MODE(stdout);
|
||||
|
||||
// Normalize from stdin to stdout, returning 1 on error, 0 if ok.
|
||||
char *err;
|
||||
int ret = gzip_normalize(stdin, stdout, &err);
|
||||
if (ret)
|
||||
fprintf(stderr, "gznorm error: %s\n", err);
|
||||
free(err);
|
||||
return ret;
|
||||
}
|
|
@ -1,11 +1,13 @@
|
|||
/* zran.c -- example of zlib/gzip stream indexing and random access
|
||||
* Copyright (C) 2005, 2012 Mark Adler
|
||||
* Copyright (C) 2005, 2012, 2018 Mark Adler
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
Version 1.1 29 Sep 2012 Mark Adler */
|
||||
* Version 1.2 14 Oct 2018 Mark Adler */
|
||||
|
||||
/* Version History:
|
||||
1.0 29 May 2005 First version
|
||||
1.1 29 Sep 2012 Fix memory reallocation error
|
||||
1.2 14 Oct 2018 Handle gzip streams with multiple members
|
||||
Add a header file to facilitate usage in applications
|
||||
*/
|
||||
|
||||
/* Illustrate the use of Z_BLOCK, inflatePrime(), and inflateSetDictionary()
|
||||
|
@ -19,12 +21,12 @@
|
|||
An access point can be created at the start of any deflate block, by saving
|
||||
the starting file offset and bit of that block, and the 32K bytes of
|
||||
uncompressed data that precede that block. Also the uncompressed offset of
|
||||
that block is saved to provide a referece for locating a desired starting
|
||||
point in the uncompressed stream. build_index() works by decompressing the
|
||||
input zlib or gzip stream a block at a time, and at the end of each block
|
||||
deciding if enough uncompressed data has gone by to justify the creation of
|
||||
a new access point. If so, that point is saved in a data structure that
|
||||
grows as needed to accommodate the points.
|
||||
that block is saved to provide a reference for locating a desired starting
|
||||
point in the uncompressed stream. deflate_index_build() works by
|
||||
decompressing the input zlib or gzip stream a block at a time, and at the
|
||||
end of each block deciding if enough uncompressed data has gone by to
|
||||
justify the creation of a new access point. If so, that point is saved in a
|
||||
data structure that grows as needed to accommodate the points.
|
||||
|
||||
To use the index, an offset in the uncompressed data is provided, for which
|
||||
the latest access point at or preceding that offset is located in the index.
|
||||
|
@ -43,7 +45,8 @@
|
|||
There is some fair bit of overhead to starting inflation for the random
|
||||
access, mainly copying the 32K byte dictionary. So if small pieces of the
|
||||
file are being accessed, it would make sense to implement a cache to hold
|
||||
some lookahead and avoid many calls to extract() for small lengths.
|
||||
some lookahead and avoid many calls to deflate_index_extract() for small
|
||||
lengths.
|
||||
|
||||
Another way to build an index would be to use inflateCopy(). That would
|
||||
not be constrained to have access points at block boundaries, but requires
|
||||
|
@ -56,30 +59,21 @@
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "zlib.h"
|
||||
#include "zran.h"
|
||||
|
||||
#define local static
|
||||
|
||||
#define SPAN 1048576L /* desired distance between access points */
|
||||
#define WINSIZE 32768U /* sliding window size */
|
||||
#define CHUNK 16384 /* file input buffer size */
|
||||
|
||||
/* access point entry */
|
||||
/* Access point entry. */
|
||||
struct point {
|
||||
off_t out; /* corresponding offset in uncompressed data */
|
||||
off_t in; /* offset in input file of first full byte */
|
||||
int bits; /* number of bits (1-7) from byte at in - 1, or 0 */
|
||||
int bits; /* number of bits (1-7) from byte at in-1, or 0 */
|
||||
unsigned char window[WINSIZE]; /* preceding 32K of uncompressed data */
|
||||
};
|
||||
|
||||
/* access point list */
|
||||
struct access {
|
||||
int have; /* number of list entries filled in */
|
||||
int size; /* number of list entries allocated */
|
||||
struct point *list; /* allocated list */
|
||||
};
|
||||
|
||||
/* Deallocate an index built by build_index() */
|
||||
local void free_index(struct access *index)
|
||||
/* See comments in zran.h. */
|
||||
void deflate_index_free(struct deflate_index *index)
|
||||
{
|
||||
if (index != NULL) {
|
||||
free(index->list);
|
||||
|
@ -87,39 +81,43 @@ local void free_index(struct access *index)
|
|||
}
|
||||
}
|
||||
|
||||
/* Add an entry to the access point list. If out of memory, deallocate the
|
||||
existing list and return NULL. */
|
||||
local struct access *addpoint(struct access *index, int bits,
|
||||
off_t in, off_t out, unsigned left, unsigned char *window)
|
||||
/* Add an entry to the access point list. If out of memory, deallocate the
|
||||
existing list and return NULL. index->gzip is the allocated size of the
|
||||
index in point entries, until it is time for deflate_index_build() to
|
||||
return, at which point gzip is set to indicate a gzip file or not.
|
||||
*/
|
||||
static struct deflate_index *addpoint(struct deflate_index *index, int bits,
|
||||
off_t in, off_t out, unsigned left,
|
||||
unsigned char *window)
|
||||
{
|
||||
struct point *next;
|
||||
|
||||
/* if list is empty, create it (start with eight points) */
|
||||
if (index == NULL) {
|
||||
index = malloc(sizeof(struct access));
|
||||
index = malloc(sizeof(struct deflate_index));
|
||||
if (index == NULL) return NULL;
|
||||
index->list = malloc(sizeof(struct point) << 3);
|
||||
if (index->list == NULL) {
|
||||
free(index);
|
||||
return NULL;
|
||||
}
|
||||
index->size = 8;
|
||||
index->gzip = 8;
|
||||
index->have = 0;
|
||||
}
|
||||
|
||||
/* if list is full, make it bigger */
|
||||
else if (index->have == index->size) {
|
||||
index->size <<= 1;
|
||||
next = realloc(index->list, sizeof(struct point) * index->size);
|
||||
else if (index->have == index->gzip) {
|
||||
index->gzip <<= 1;
|
||||
next = realloc(index->list, sizeof(struct point) * index->gzip);
|
||||
if (next == NULL) {
|
||||
free_index(index);
|
||||
deflate_index_free(index);
|
||||
return NULL;
|
||||
}
|
||||
index->list = next;
|
||||
}
|
||||
|
||||
/* fill in entry and increment how many we have */
|
||||
next = index->list + index->have;
|
||||
next = (struct point *)(index->list) + index->have;
|
||||
next->bits = bits;
|
||||
next->in = in;
|
||||
next->out = out;
|
||||
|
@ -133,20 +131,14 @@ local struct access *addpoint(struct access *index, int bits,
|
|||
return index;
|
||||
}
|
||||
|
||||
/* Make one entire pass through the compressed stream and build an index, with
|
||||
access points about every span bytes of uncompressed output -- span is
|
||||
chosen to balance the speed of random access against the memory requirements
|
||||
of the list, about 32K bytes per access point. Note that data after the end
|
||||
of the first zlib or gzip stream in the file is ignored. build_index()
|
||||
returns the number of access points on success (>= 1), Z_MEM_ERROR for out
|
||||
of memory, Z_DATA_ERROR for an error in the input file, or Z_ERRNO for a
|
||||
file read error. On success, *built points to the resulting index. */
|
||||
local int build_index(FILE *in, off_t span, struct access **built)
|
||||
/* See comments in zran.h. */
|
||||
int deflate_index_build(FILE *in, off_t span, struct deflate_index **built)
|
||||
{
|
||||
int ret;
|
||||
int gzip = 0; /* true if reading a gzip file */
|
||||
off_t totin, totout; /* our own total counters to avoid 4GB limit */
|
||||
off_t last; /* totout value of last access point */
|
||||
struct access *index; /* access points being generated */
|
||||
struct deflate_index *index; /* access points being generated */
|
||||
z_stream strm;
|
||||
unsigned char input[CHUNK];
|
||||
unsigned char window[WINSIZE];
|
||||
|
@ -163,7 +155,7 @@ local int build_index(FILE *in, off_t span, struct access **built)
|
|||
|
||||
/* inflate the input, maintain a sliding window, and build an index -- this
|
||||
also validates the integrity of the compressed data using the check
|
||||
information at the end of the gzip or zlib stream */
|
||||
information in the gzip or zlib stream */
|
||||
totin = totout = last = 0;
|
||||
index = NULL; /* will be allocated by first addpoint() */
|
||||
strm.avail_out = 0;
|
||||
|
@ -172,14 +164,19 @@ local int build_index(FILE *in, off_t span, struct access **built)
|
|||
strm.avail_in = fread(input, 1, CHUNK, in);
|
||||
if (ferror(in)) {
|
||||
ret = Z_ERRNO;
|
||||
goto build_index_error;
|
||||
goto deflate_index_build_error;
|
||||
}
|
||||
if (strm.avail_in == 0) {
|
||||
ret = Z_DATA_ERROR;
|
||||
goto build_index_error;
|
||||
goto deflate_index_build_error;
|
||||
}
|
||||
strm.next_in = input;
|
||||
|
||||
/* check for a gzip stream */
|
||||
if (totin == 0 && strm.avail_in >= 3 &&
|
||||
input[0] == 31 && input[1] == 139 && input[2] == 8)
|
||||
gzip = 1;
|
||||
|
||||
/* process all of that, or until end of stream */
|
||||
do {
|
||||
/* reset sliding window if necessary */
|
||||
|
@ -198,9 +195,17 @@ local int build_index(FILE *in, off_t span, struct access **built)
|
|||
if (ret == Z_NEED_DICT)
|
||||
ret = Z_DATA_ERROR;
|
||||
if (ret == Z_MEM_ERROR || ret == Z_DATA_ERROR)
|
||||
goto build_index_error;
|
||||
if (ret == Z_STREAM_END)
|
||||
goto deflate_index_build_error;
|
||||
if (ret == Z_STREAM_END) {
|
||||
if (gzip &&
|
||||
(strm.avail_in || ungetc(getc(in), in) != EOF)) {
|
||||
ret = inflateReset(&strm);
|
||||
if (ret != Z_OK)
|
||||
goto deflate_index_build_error;
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
/* if at end of block, consider adding an index entry (note that if
|
||||
data_type indicates an end-of-block, then all of the
|
||||
|
@ -217,7 +222,7 @@ local int build_index(FILE *in, off_t span, struct access **built)
|
|||
totout, strm.avail_out, window);
|
||||
if (index == NULL) {
|
||||
ret = Z_MEM_ERROR;
|
||||
goto build_index_error;
|
||||
goto deflate_index_build_error;
|
||||
}
|
||||
last = totout;
|
||||
}
|
||||
|
@ -227,27 +232,21 @@ local int build_index(FILE *in, off_t span, struct access **built)
|
|||
/* clean up and return index (release unused entries in list) */
|
||||
(void)inflateEnd(&strm);
|
||||
index->list = realloc(index->list, sizeof(struct point) * index->have);
|
||||
index->size = index->have;
|
||||
index->gzip = gzip;
|
||||
index->length = totout;
|
||||
*built = index;
|
||||
return index->size;
|
||||
return index->have;
|
||||
|
||||
/* return error */
|
||||
build_index_error:
|
||||
deflate_index_build_error:
|
||||
(void)inflateEnd(&strm);
|
||||
if (index != NULL)
|
||||
free_index(index);
|
||||
deflate_index_free(index);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Use the index to read len bytes from offset into buf, return bytes read or
|
||||
negative for error (Z_DATA_ERROR or Z_MEM_ERROR). If data is requested past
|
||||
the end of the uncompressed data, then extract() will return a value less
|
||||
than len, indicating how much as actually read into buf. This function
|
||||
should not return a data error unless the file was modified since the index
|
||||
was generated. extract() may also return Z_ERRNO if there is an error on
|
||||
reading or seeking the input file. */
|
||||
local int extract(FILE *in, struct access *index, off_t offset,
|
||||
unsigned char *buf, int len)
|
||||
/* See comments in zran.h. */
|
||||
int deflate_index_extract(FILE *in, struct deflate_index *index, off_t offset,
|
||||
unsigned char *buf, int len)
|
||||
{
|
||||
int ret, skip;
|
||||
z_stream strm;
|
||||
|
@ -276,12 +275,12 @@ local int extract(FILE *in, struct access *index, off_t offset,
|
|||
return ret;
|
||||
ret = fseeko(in, here->in - (here->bits ? 1 : 0), SEEK_SET);
|
||||
if (ret == -1)
|
||||
goto extract_ret;
|
||||
goto deflate_index_extract_ret;
|
||||
if (here->bits) {
|
||||
ret = getc(in);
|
||||
if (ret == -1) {
|
||||
ret = ferror(in) ? Z_ERRNO : Z_DATA_ERROR;
|
||||
goto extract_ret;
|
||||
goto deflate_index_extract_ret;
|
||||
}
|
||||
(void)inflatePrime(&strm, here->bits, ret >> (8 - here->bits));
|
||||
}
|
||||
|
@ -293,21 +292,21 @@ local int extract(FILE *in, struct access *index, off_t offset,
|
|||
skip = 1; /* while skipping to offset */
|
||||
do {
|
||||
/* define where to put uncompressed data, and how much */
|
||||
if (offset == 0 && skip) { /* at offset now */
|
||||
strm.avail_out = len;
|
||||
strm.next_out = buf;
|
||||
skip = 0; /* only do this once */
|
||||
}
|
||||
if (offset > WINSIZE) { /* skip WINSIZE bytes */
|
||||
strm.avail_out = WINSIZE;
|
||||
strm.next_out = discard;
|
||||
offset -= WINSIZE;
|
||||
}
|
||||
else if (offset != 0) { /* last skip */
|
||||
else if (offset > 0) { /* last skip */
|
||||
strm.avail_out = (unsigned)offset;
|
||||
strm.next_out = discard;
|
||||
offset = 0;
|
||||
}
|
||||
else if (skip) { /* at offset now */
|
||||
strm.avail_out = len;
|
||||
strm.next_out = buf;
|
||||
skip = 0; /* only do this once */
|
||||
}
|
||||
|
||||
/* uncompress until avail_out filled, or end of stream */
|
||||
do {
|
||||
|
@ -315,11 +314,11 @@ local int extract(FILE *in, struct access *index, off_t offset,
|
|||
strm.avail_in = fread(input, 1, CHUNK, in);
|
||||
if (ferror(in)) {
|
||||
ret = Z_ERRNO;
|
||||
goto extract_ret;
|
||||
goto deflate_index_extract_ret;
|
||||
}
|
||||
if (strm.avail_in == 0) {
|
||||
ret = Z_DATA_ERROR;
|
||||
goto extract_ret;
|
||||
goto deflate_index_extract_ret;
|
||||
}
|
||||
strm.next_in = input;
|
||||
}
|
||||
|
@ -327,41 +326,99 @@ local int extract(FILE *in, struct access *index, off_t offset,
|
|||
if (ret == Z_NEED_DICT)
|
||||
ret = Z_DATA_ERROR;
|
||||
if (ret == Z_MEM_ERROR || ret == Z_DATA_ERROR)
|
||||
goto extract_ret;
|
||||
if (ret == Z_STREAM_END)
|
||||
break;
|
||||
goto deflate_index_extract_ret;
|
||||
if (ret == Z_STREAM_END) {
|
||||
/* the raw deflate stream has ended */
|
||||
if (index->gzip == 0)
|
||||
/* this is a zlib stream that has ended -- done */
|
||||
break;
|
||||
|
||||
/* near the end of a gzip member, which might be followed by
|
||||
another gzip member -- skip the gzip trailer and see if
|
||||
there is more input after it */
|
||||
if (strm.avail_in < 8) {
|
||||
fseeko(in, 8 - strm.avail_in, SEEK_CUR);
|
||||
strm.avail_in = 0;
|
||||
}
|
||||
else {
|
||||
strm.avail_in -= 8;
|
||||
strm.next_in += 8;
|
||||
}
|
||||
if (strm.avail_in == 0 && ungetc(getc(in), in) == EOF)
|
||||
/* the input ended after the gzip trailer -- done */
|
||||
break;
|
||||
|
||||
/* there is more input, so another gzip member should follow --
|
||||
validate and skip the gzip header */
|
||||
ret = inflateReset2(&strm, 31);
|
||||
if (ret != Z_OK)
|
||||
goto deflate_index_extract_ret;
|
||||
do {
|
||||
if (strm.avail_in == 0) {
|
||||
strm.avail_in = fread(input, 1, CHUNK, in);
|
||||
if (ferror(in)) {
|
||||
ret = Z_ERRNO;
|
||||
goto deflate_index_extract_ret;
|
||||
}
|
||||
if (strm.avail_in == 0) {
|
||||
ret = Z_DATA_ERROR;
|
||||
goto deflate_index_extract_ret;
|
||||
}
|
||||
strm.next_in = input;
|
||||
}
|
||||
ret = inflate(&strm, Z_BLOCK);
|
||||
if (ret == Z_MEM_ERROR || ret == Z_DATA_ERROR)
|
||||
goto deflate_index_extract_ret;
|
||||
} while ((strm.data_type & 128) == 0);
|
||||
|
||||
/* set up to continue decompression of the raw deflate stream
|
||||
that follows the gzip header */
|
||||
ret = inflateReset2(&strm, -15);
|
||||
if (ret != Z_OK)
|
||||
goto deflate_index_extract_ret;
|
||||
}
|
||||
|
||||
/* continue to process the available input before reading more */
|
||||
} while (strm.avail_out != 0);
|
||||
|
||||
/* if reach end of stream, then don't keep trying to get more */
|
||||
if (ret == Z_STREAM_END)
|
||||
/* reached the end of the compressed data -- return the data that
|
||||
was available, possibly less than requested */
|
||||
break;
|
||||
|
||||
/* do until offset reached and requested data read, or stream ends */
|
||||
/* do until offset reached and requested data read */
|
||||
} while (skip);
|
||||
|
||||
/* compute number of uncompressed bytes read after offset */
|
||||
/* compute the number of uncompressed bytes read after the offset */
|
||||
ret = skip ? 0 : len - strm.avail_out;
|
||||
|
||||
/* clean up and return bytes read or error */
|
||||
extract_ret:
|
||||
/* clean up and return the bytes read, or the negative error */
|
||||
deflate_index_extract_ret:
|
||||
(void)inflateEnd(&strm);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Demonstrate the use of build_index() and extract() by processing the file
|
||||
provided on the command line, and the extracting 16K from about 2/3rds of
|
||||
the way through the uncompressed output, and writing that to stdout. */
|
||||
#ifdef TEST
|
||||
|
||||
#define SPAN 1048576L /* desired distance between access points */
|
||||
#define LEN 16384 /* number of bytes to extract */
|
||||
|
||||
/* Demonstrate the use of deflate_index_build() and deflate_index_extract() by
|
||||
processing the file provided on the command line, and extracting LEN bytes
|
||||
from 2/3rds of the way through the uncompressed output, writing that to
|
||||
stdout. An offset can be provided as the second argument, in which case the
|
||||
data is extracted from there instead. */
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
int len;
|
||||
off_t offset;
|
||||
off_t offset = -1;
|
||||
FILE *in;
|
||||
struct access *index = NULL;
|
||||
unsigned char buf[CHUNK];
|
||||
struct deflate_index *index = NULL;
|
||||
unsigned char buf[LEN];
|
||||
|
||||
/* open input file */
|
||||
if (argc != 2) {
|
||||
fprintf(stderr, "usage: zran file.gz\n");
|
||||
if (argc < 2 || argc > 3) {
|
||||
fprintf(stderr, "usage: zran file.gz [offset]\n");
|
||||
return 1;
|
||||
}
|
||||
in = fopen(argv[1], "rb");
|
||||
|
@ -370,8 +427,18 @@ int main(int argc, char **argv)
|
|||
return 1;
|
||||
}
|
||||
|
||||
/* get optional offset */
|
||||
if (argc == 3) {
|
||||
char *end;
|
||||
offset = strtoll(argv[2], &end, 10);
|
||||
if (*end || offset < 0) {
|
||||
fprintf(stderr, "zran: %s is not a valid offset\n", argv[2]);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* build index */
|
||||
len = build_index(in, SPAN, &index);
|
||||
len = deflate_index_build(in, SPAN, &index);
|
||||
if (len < 0) {
|
||||
fclose(in);
|
||||
switch (len) {
|
||||
|
@ -392,8 +459,9 @@ int main(int argc, char **argv)
|
|||
fprintf(stderr, "zran: built index with %d access points\n", len);
|
||||
|
||||
/* use index by reading some bytes from an arbitrary offset */
|
||||
offset = (index->list[index->have - 1].out << 1) / 3;
|
||||
len = extract(in, index, offset, buf, CHUNK);
|
||||
if (offset == -1)
|
||||
offset = (index->length << 1) / 3;
|
||||
len = deflate_index_extract(in, index, offset, buf, LEN);
|
||||
if (len < 0)
|
||||
fprintf(stderr, "zran: extraction failed: %s error\n",
|
||||
len == Z_MEM_ERROR ? "out of memory" : "input corrupted");
|
||||
|
@ -403,7 +471,9 @@ int main(int argc, char **argv)
|
|||
}
|
||||
|
||||
/* clean up and exit */
|
||||
free_index(index);
|
||||
deflate_index_free(index);
|
||||
fclose(in);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
/* zran.h -- example of zlib/gzip stream indexing and random access
|
||||
* Copyright (C) 2005, 2012, 2018 Mark Adler
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
* Version 1.2 14 Oct 2018 Mark Adler */
|
||||
|
||||
#include <stdio.h>
|
||||
#include "zlib.h"
|
||||
|
||||
/* Access point list. */
|
||||
struct deflate_index {
|
||||
int have; /* number of list entries */
|
||||
int gzip; /* 1 if the index is of a gzip file, 0 if it is of a
|
||||
zlib stream */
|
||||
off_t length; /* total length of uncompressed data */
|
||||
void *list; /* allocated list of entries */
|
||||
};
|
||||
|
||||
/* Make one entire pass through a zlib or gzip compressed stream and build an
|
||||
index, with access points about every span bytes of uncompressed output.
|
||||
gzip files with multiple members are indexed in their entirety. span should
|
||||
be chosen to balance the speed of random access against the memory
|
||||
requirements of the list, about 32K bytes per access point. The return value
|
||||
is the number of access points on success (>= 1), Z_MEM_ERROR for out of
|
||||
memory, Z_DATA_ERROR for an error in the input file, or Z_ERRNO for a file
|
||||
read error. On success, *built points to the resulting index. */
|
||||
int deflate_index_build(FILE *in, off_t span, struct deflate_index **built);
|
||||
|
||||
/* Deallocate an index built by deflate_index_build() */
|
||||
void deflate_index_free(struct deflate_index *index);
|
||||
|
||||
/* Use the index to read len bytes from offset into buf. Return bytes read or
|
||||
negative for error (Z_DATA_ERROR or Z_MEM_ERROR). If data is requested past
|
||||
the end of the uncompressed data, then deflate_index_extract() will return a
|
||||
value less than len, indicating how much was actually read into buf. This
|
||||
function should not return a data error unless the file was modified since
|
||||
the index was generated, since deflate_index_build() validated all of the
|
||||
input. deflate_index_extract() will return Z_ERRNO if there is an error on
|
||||
reading or seeking the input file. */
|
||||
int deflate_index_extract(FILE *in, struct deflate_index *index, off_t offset,
|
||||
unsigned char *buf, int len);
|
|
@ -1,11 +1,11 @@
|
|||
/* gzlib.c -- zlib functions common to reading and writing gzip files
|
||||
* Copyright (C) 2004, 2010, 2011, 2012, 2013, 2016 Mark Adler
|
||||
* Copyright (C) 2004-2019 Mark Adler
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
#include "gzguts.h"
|
||||
|
||||
#if defined(_WIN32) && !defined(__BORLANDC__) && !defined(__MINGW32__)
|
||||
#if defined(_WIN32) && !defined(__BORLANDC__)
|
||||
# define LSEEK _lseeki64
|
||||
#else
|
||||
#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0
|
||||
|
@ -30,7 +30,7 @@ local gzFile gz_open OF((const void *, int, const char *));
|
|||
|
||||
The gz_strwinerror function does not change the current setting of
|
||||
GetLastError. */
|
||||
char ZLIB_INTERNAL *gz_strwinerror (error)
|
||||
char ZLIB_INTERNAL *gz_strwinerror(error)
|
||||
DWORD error;
|
||||
{
|
||||
static char buf[1024];
|
||||
|
@ -81,6 +81,8 @@ local void gz_reset(state)
|
|||
state->past = 0; /* have not read past end yet */
|
||||
state->how = LOOK; /* look for gzip header */
|
||||
}
|
||||
else /* for writing ... */
|
||||
state->reset = 0; /* no deflateReset pending */
|
||||
state->seek = 0; /* no seek request pending */
|
||||
gz_error(state, Z_OK, NULL); /* clear error */
|
||||
state->x.pos = 0; /* no uncompressed data yet */
|
||||
|
@ -397,7 +399,7 @@ z_off64_t ZEXPORT gzseek64(file, offset, whence)
|
|||
/* if within raw area while reading, just go there */
|
||||
if (state->mode == GZ_READ && state->how == COPY &&
|
||||
state->x.pos + offset >= 0) {
|
||||
ret = LSEEK(state->fd, offset - state->x.have, SEEK_CUR);
|
||||
ret = LSEEK(state->fd, offset - (z_off64_t)state->x.have, SEEK_CUR);
|
||||
if (ret == -1)
|
||||
return -1;
|
||||
state->x.have = 0;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* gzread.c -- zlib functions for reading gzip files
|
||||
* Copyright (C) 2004, 2005, 2010, 2011, 2012, 2013, 2016 Mark Adler
|
||||
* Copyright (C) 2004-2017 Mark Adler
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
|
@ -157,11 +157,9 @@ local int gz_look(state)
|
|||
the output buffer is larger than the input buffer, which also assures
|
||||
space for gzungetc() */
|
||||
state->x.next = state->out;
|
||||
if (strm->avail_in) {
|
||||
memcpy(state->x.next, strm->next_in, strm->avail_in);
|
||||
state->x.have = strm->avail_in;
|
||||
strm->avail_in = 0;
|
||||
}
|
||||
memcpy(state->x.next, strm->next_in, strm->avail_in);
|
||||
state->x.have = strm->avail_in;
|
||||
strm->avail_in = 0;
|
||||
state->how = COPY;
|
||||
state->direct = 1;
|
||||
return 0;
|
||||
|
@ -314,9 +312,9 @@ local z_size_t gz_read(state, buf, len)
|
|||
got = 0;
|
||||
do {
|
||||
/* set n to the maximum amount of len that fits in an unsigned int */
|
||||
n = -1;
|
||||
n = (unsigned)-1;
|
||||
if (n > len)
|
||||
n = len;
|
||||
n = (unsigned)len;
|
||||
|
||||
/* first just try copying data from the output buffer */
|
||||
if (state->x.have) {
|
||||
|
@ -397,7 +395,7 @@ int ZEXPORT gzread(file, buf, len)
|
|||
}
|
||||
|
||||
/* read len or fewer bytes to buf */
|
||||
len = gz_read(state, buf, len);
|
||||
len = (unsigned)gz_read(state, buf, len);
|
||||
|
||||
/* check for an error */
|
||||
if (len == 0 && state->err != Z_OK && state->err != Z_BUF_ERROR)
|
||||
|
@ -447,7 +445,6 @@ z_size_t ZEXPORT gzfread(buf, size, nitems, file)
|
|||
int ZEXPORT gzgetc(file)
|
||||
gzFile file;
|
||||
{
|
||||
int ret;
|
||||
unsigned char buf[1];
|
||||
gz_statep state;
|
||||
|
||||
|
@ -469,8 +466,7 @@ int ZEXPORT gzgetc(file)
|
|||
}
|
||||
|
||||
/* nothing there -- try gz_read() */
|
||||
ret = gz_read(state, buf, 1);
|
||||
return ret < 1 ? -1 : buf[0];
|
||||
return gz_read(state, buf, 1) < 1 ? -1 : buf[0];
|
||||
}
|
||||
|
||||
int ZEXPORT gzgetc_(file)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* inflate.h -- internal inflate state definition
|
||||
* Copyright (C) 1995-2016 Mark Adler
|
||||
* Copyright (C) 1995-2019 Mark Adler
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
|
@ -86,7 +86,8 @@ struct inflate_state {
|
|||
int wrap; /* bit 0 true for zlib, bit 1 true for gzip,
|
||||
bit 2 true to validate check value */
|
||||
int havedict; /* true if dictionary provided */
|
||||
int flags; /* gzip header method and flags (0 if zlib) */
|
||||
int flags; /* gzip header method and flags, 0 if zlib, or
|
||||
-1 if raw or no header yet */
|
||||
unsigned dmax; /* zlib header max distance (INFLATE_STRICT) */
|
||||
unsigned long check; /* protected copy of check value */
|
||||
unsigned long total; /* protected copy of output count */
|
||||
|
|
|
@ -38,7 +38,7 @@ typedef struct {
|
|||
/* Maximum size of the dynamic table. The maximum number of code structures is
|
||||
1444, which is the sum of 852 for literal/length codes and 592 for distance
|
||||
codes. These values were found by exhaustive searches using the program
|
||||
examples/enough.c found in the zlib distribtution. The arguments to that
|
||||
examples/enough.c found in the zlib distribution. The arguments to that
|
||||
program are the number of symbols, the initial root table size, and the
|
||||
maximum bit length of a code. "enough 286 9 15" for literal/length codes
|
||||
returns returns 852, and "enough 30 6 15" for distance codes returns 592.
|
||||
|
|
|
@ -14,9 +14,9 @@ $! 0.02 20061008 Adapt to new Makefile.in
|
|||
$! 0.03 20091224 Add support for large file check
|
||||
$! 0.04 20100110 Add new gzclose, gzlib, gzread, gzwrite
|
||||
$! 0.05 20100221 Exchange zlibdefs.h by zconf.h.in
|
||||
$! 0.06 20120111 Fix missing amiss_err, update zconf_h.in, fix new exmples
|
||||
$! 0.06 20120111 Fix missing amiss_err, update zconf_h.in, fix new examples
|
||||
$! subdir path, update module search in makefile.in
|
||||
$! 0.07 20120115 Triggered by work done by Alexey Chupahin completly redesigned
|
||||
$! 0.07 20120115 Triggered by work done by Alexey Chupahin completely redesigned
|
||||
$! shared image creation
|
||||
$! 0.08 20120219 Make it work on VAX again, pre-load missing symbols to shared
|
||||
$! image
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
ZLIB version 1.2.10 for OS/400 installation instructions
|
||||
ZLIB version 1.2.13 for OS/400 installation instructions
|
||||
|
||||
1) Download and unpack the zlib tarball to some IFS directory.
|
||||
(i.e.: /path/to/the/zlib/ifs/source/directory)
|
||||
|
||||
If the installed IFS command suppors gzip format, this is straightforward,
|
||||
If the installed IFS command supports gzip format, this is straightforward,
|
||||
else you have to unpack first to some directory on a system supporting it,
|
||||
then move the whole directory to the IFS via the network (via SMB or FTP).
|
||||
|
||||
|
@ -43,6 +43,6 @@ Notes: For OS/400 ILE RPG programmers, a /copy member defining the ZLIB
|
|||
|
||||
Remember that most foreign textual data are ASCII coded: this
|
||||
implementation does not handle conversion from/to ASCII, so
|
||||
text data code conversions must be done explicitely.
|
||||
text data code conversions must be done explicitly.
|
||||
|
||||
Mainly for the reason above, always open zipped files in binary mode.
|
||||
|
|
|
@ -116,4 +116,12 @@ STRPGMEXP PGMLVL(*CURRENT) SIGNATURE('ZLIB')
|
|||
EXPORT SYMBOL("inflateValidate")
|
||||
EXPORT SYMBOL("uncompress2")
|
||||
|
||||
/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/
|
||||
/* Version 1.2.12 additional entry points. */
|
||||
/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/
|
||||
|
||||
EXPORT SYMBOL("crc32_combine_gen64")
|
||||
EXPORT SYMBOL("crc32_combine_gen")
|
||||
EXPORT SYMBOL("crc32_combine_op")
|
||||
|
||||
ENDPGMEXP
|
||||
|
|
|
@ -260,7 +260,7 @@ fi
|
|||
echo '#pragma comment(user, "ZLIB version '"${VERSION}"'")' > os400.c
|
||||
echo '#pragma comment(user, __DATE__)' >> os400.c
|
||||
echo '#pragma comment(user, __TIME__)' >> os400.c
|
||||
echo '#pragma comment(copyright, "Copyright (C) 1995-2016 Jean-Loup Gailly, Mark Adler. OS/400 version by P. Monnerat.")' >> os400.c
|
||||
echo '#pragma comment(copyright, "Copyright (C) 1995-2017 Jean-Loup Gailly, Mark Adler. OS/400 version by P. Monnerat.")' >> os400.c
|
||||
make_module OS400 os400.c
|
||||
LINK= # No need to rebuild service program yet.
|
||||
MODULES=
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
* ZLIB.INC - Interface to the general purpose compression library
|
||||
*
|
||||
* ILE RPG400 version by Patrick Monnerat, DATASPHERE.
|
||||
* Version 1.2.10
|
||||
* Version 1.2.13
|
||||
*
|
||||
*
|
||||
* WARNING:
|
||||
|
@ -22,12 +22,12 @@
|
|||
*
|
||||
* Versioning information.
|
||||
*
|
||||
D ZLIB_VERSION C '1.2.10'
|
||||
D ZLIB_VERSION C '1.2.13'
|
||||
D ZLIB_VERNUM C X'12a0'
|
||||
D ZLIB_VER_MAJOR C 1
|
||||
D ZLIB_VER_MINOR C 2
|
||||
D ZLIB_VER_REVISION...
|
||||
D C 10
|
||||
D C 13
|
||||
D ZLIB_VER_SUBREVISION...
|
||||
D C 0
|
||||
*
|
||||
|
|
|
@ -25,10 +25,10 @@
|
|||
<QPG:Files>
|
||||
<QPG:Add file="../zconf.h" install="/opt/include/" user="root:sys" permission="644"/>
|
||||
<QPG:Add file="../zlib.h" install="/opt/include/" user="root:sys" permission="644"/>
|
||||
<QPG:Add file="../libz.so.1.2.10" install="/opt/lib/" user="root:bin" permission="644"/>
|
||||
<QPG:Add file="libz.so" install="/opt/lib/" component="dev" filetype="symlink" linkto="libz.so.1.2.10"/>
|
||||
<QPG:Add file="libz.so.1" install="/opt/lib/" filetype="symlink" linkto="libz.so.1.2.10"/>
|
||||
<QPG:Add file="../libz.so.1.2.10" install="/opt/lib/" component="slib"/>
|
||||
<QPG:Add file="../libz.so.1.2.13" install="/opt/lib/" user="root:bin" permission="644"/>
|
||||
<QPG:Add file="libz.so" install="/opt/lib/" component="dev" filetype="symlink" linkto="libz.so.1.2.13"/>
|
||||
<QPG:Add file="libz.so.1" install="/opt/lib/" filetype="symlink" linkto="libz.so.1.2.13"/>
|
||||
<QPG:Add file="../libz.so.1.2.13" install="/opt/lib/" component="slib"/>
|
||||
</QPG:Files>
|
||||
|
||||
<QPG:PackageFilter>
|
||||
|
@ -63,7 +63,7 @@
|
|||
</QPM:ProductDescription>
|
||||
|
||||
<QPM:ReleaseDescription>
|
||||
<QPM:ReleaseVersion>1.2.10</QPM:ReleaseVersion>
|
||||
<QPM:ReleaseVersion>1.2.13</QPM:ReleaseVersion>
|
||||
<QPM:ReleaseUrgency>Medium</QPM:ReleaseUrgency>
|
||||
<QPM:ReleaseStability>Stable</QPM:ReleaseStability>
|
||||
<QPM:ReleaseNoteMinor></QPM:ReleaseNoteMinor>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
/* @(#) $Id: example.c,v 1.1.1.1 2017/01/10 00:25:31 christos Exp $ */
|
||||
/* @(#) $Id: example.c,v 1.1.1.2 2022/10/15 19:38:38 christos Exp $ */
|
||||
|
||||
#include "zlib.h"
|
||||
#include <stdio.h>
|
||||
|
@ -440,9 +440,8 @@ void test_sync(compr, comprLen, uncompr, uncomprLen)
|
|||
CHECK_ERR(err, "inflateSync");
|
||||
|
||||
err = inflate(&d_stream, Z_FINISH);
|
||||
if (err != Z_DATA_ERROR) {
|
||||
fprintf(stderr, "inflate should report DATA_ERROR\n");
|
||||
/* Because of incorrect adler32 */
|
||||
if (err != Z_STREAM_END) {
|
||||
fprintf(stderr, "inflate should report Z_STREAM_END\n");
|
||||
exit(1);
|
||||
}
|
||||
err = inflateEnd(&d_stream);
|
||||
|
@ -556,7 +555,8 @@ int main(argc, argv)
|
|||
exit(1);
|
||||
|
||||
} else if (strcmp(zlibVersion(), ZLIB_VERSION) != 0) {
|
||||
fprintf(stderr, "warning: different zlib version\n");
|
||||
fprintf(stderr, "warning: different zlib version linked: %s\n",
|
||||
zlibVersion());
|
||||
}
|
||||
|
||||
printf("zlib version %s = 0x%04x, compile flags = 0x%lx\n",
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
* or in pipe mode.
|
||||
*/
|
||||
|
||||
/* @(#) $Id: minigzip.c,v 1.1.1.1 2017/01/10 00:25:31 christos Exp $ */
|
||||
/* @(#) $Id: minigzip.c,v 1.1.1.2 2022/10/15 19:38:38 christos Exp $ */
|
||||
|
||||
#include "zlib.h"
|
||||
#include <stdio.h>
|
||||
|
@ -500,7 +500,7 @@ void file_uncompress(file)
|
|||
char *infile, *outfile;
|
||||
FILE *out;
|
||||
gzFile in;
|
||||
unsigned len = strlen(file);
|
||||
z_size_t len = strlen(file);
|
||||
|
||||
if (len + strlen(GZ_SUFFIX) >= sizeof(buf)) {
|
||||
fprintf(stderr, "%s: filename too long\n", prog);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" ?>
|
||||
<package name="zlib" version="1.2.10">
|
||||
<library name="zlib" dlversion="1.2.10" dlname="z">
|
||||
<package name="zlib" version="1.2.13">
|
||||
<library name="zlib" dlversion="1.2.13" dlname="z">
|
||||
<property name="description"> zip compression library </property>
|
||||
<property name="include-target-dir" value="$(@PACKAGE/install-includedir)" />
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
#
|
||||
# Usage:
|
||||
# make -f win32/Makefile.bor
|
||||
# make -f win32/Makefile.bor LOCAL_ZLIB=-DASMV OBJA=match.obj OBJPA=+match.obj
|
||||
|
||||
# ------------ Borland C++ ------------
|
||||
|
||||
|
|
|
@ -11,10 +11,6 @@
|
|||
#
|
||||
# make -fwin32/Makefile.gcc; make test testdll -fwin32/Makefile.gcc
|
||||
#
|
||||
# To use the asm code, type:
|
||||
# cp contrib/asm?86/match.S ./match.S
|
||||
# make LOC=-DASMV OBJA=match.o -fwin32/Makefile.gcc
|
||||
#
|
||||
# To install libz.a, zconf.h and zlib.h in the system directories, type:
|
||||
#
|
||||
# make install -fwin32/Makefile.gcc
|
||||
|
@ -38,7 +34,6 @@ IMPLIB = libz.dll.a
|
|||
#
|
||||
SHARED_MODE=0
|
||||
|
||||
#LOC = -DASMV
|
||||
#LOC = -DZLIB_DEBUG -g
|
||||
|
||||
PREFIX =
|
||||
|
|
|
@ -1,13 +1,9 @@
|
|||
# Makefile for zlib using Microsoft (Visual) C
|
||||
# zlib is copyright (C) 1995-2006 Jean-loup Gailly and Mark Adler
|
||||
# zlib is copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler
|
||||
#
|
||||
# Usage:
|
||||
# nmake -f win32/Makefile.msc (standard build)
|
||||
# nmake -f win32/Makefile.msc LOC=-DFOO (nonstandard build)
|
||||
# nmake -f win32/Makefile.msc LOC="-DASMV -DASMINF" \
|
||||
# OBJA="inffas32.obj match686.obj" (use ASM code, x86)
|
||||
# nmake -f win32/Makefile.msc AS=ml64 LOC="-DASMV -DASMINF -I." \
|
||||
# OBJA="inffasx64.obj gvmat64.obj inffas8664.obj" (use ASM code, x64)
|
||||
|
||||
# The toplevel directory of the source tree.
|
||||
#
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
ZLIB DATA COMPRESSION LIBRARY
|
||||
|
||||
zlib 1.2.10 is a general purpose data compression library. All the code is
|
||||
zlib 1.2.13 is a general purpose data compression library. All the code is
|
||||
thread safe. The data format used by the zlib library is described by RFCs
|
||||
(Request for Comments) 1950 to 1952 in the files
|
||||
http://www.ietf.org/rfc/rfc1950.txt (zlib format), rfc1951.txt (deflate format)
|
||||
|
@ -22,7 +22,7 @@ before asking for help.
|
|||
|
||||
Manifest:
|
||||
|
||||
The package zlib-1.2.10-win32-x86.zip will contain the following files:
|
||||
The package zlib-1.2.13-win32-x86.zip will contain the following files:
|
||||
|
||||
README-WIN32.txt This document
|
||||
ChangeLog Changes since previous zlib packages
|
||||
|
@ -72,7 +72,7 @@ are too numerous to cite here.
|
|||
|
||||
Copyright notice:
|
||||
|
||||
(C) 1995-2012 Jean-loup Gailly and Mark Adler
|
||||
(C) 1995-2017 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
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
|
||||
To build zlib using the Microsoft Visual C++ environment,
|
||||
use the appropriate project from the projects/ directory.
|
||||
use the appropriate project from the contrib/vstudio/ directory.
|
||||
|
|
|
@ -69,6 +69,7 @@ EXPORTS
|
|||
gzoffset64
|
||||
adler32_combine64
|
||||
crc32_combine64
|
||||
crc32_combine_gen64
|
||||
; checksum functions
|
||||
adler32
|
||||
adler32_z
|
||||
|
@ -76,6 +77,8 @@ EXPORTS
|
|||
crc32_z
|
||||
adler32_combine
|
||||
crc32_combine
|
||||
crc32_combine_gen
|
||||
crc32_combine_op
|
||||
; various hacks, don't look :)
|
||||
deflateInit_
|
||||
deflateInit2_
|
||||
|
|
|
@ -26,7 +26,7 @@ BEGIN
|
|||
VALUE "FileDescription", "zlib data compression library\0"
|
||||
VALUE "FileVersion", ZLIB_VERSION "\0"
|
||||
VALUE "InternalName", "zlib1.dll\0"
|
||||
VALUE "LegalCopyright", "(C) 1995-2013 Jean-loup Gailly & Mark Adler\0"
|
||||
VALUE "LegalCopyright", "(C) 1995-2022 Jean-loup Gailly & Mark Adler\0"
|
||||
VALUE "OriginalFilename", "zlib1.dll\0"
|
||||
VALUE "ProductName", "zlib\0"
|
||||
VALUE "ProductVersion", ZLIB_VERSION "\0"
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
/* @(#) $Id: zconf.h.cmakein,v 1.1.1.1 2017/01/10 00:25:30 christos Exp $ */
|
||||
/* @(#) $Id: zconf.h.cmakein,v 1.1.1.2 2022/10/15 19:38:37 christos Exp $ */
|
||||
|
||||
#ifndef ZCONF_H
|
||||
#define ZCONF_H
|
||||
|
@ -40,6 +40,9 @@
|
|||
# define crc32 z_crc32
|
||||
# define crc32_combine z_crc32_combine
|
||||
# define crc32_combine64 z_crc32_combine64
|
||||
# define crc32_combine_gen z_crc32_combine_gen
|
||||
# define crc32_combine_gen64 z_crc32_combine_gen64
|
||||
# define crc32_combine_op z_crc32_combine_op
|
||||
# define crc32_z z_crc32_z
|
||||
# define deflate z_deflate
|
||||
# define deflateBound z_deflateBound
|
||||
|
@ -351,6 +354,9 @@
|
|||
# ifdef FAR
|
||||
# undef FAR
|
||||
# endif
|
||||
# ifndef WIN32_LEAN_AND_MEAN
|
||||
# define WIN32_LEAN_AND_MEAN
|
||||
# endif
|
||||
# include <windows.h>
|
||||
/* No need for _export, use ZLIB.DEF instead. */
|
||||
/* For complete Windows compatibility, use WINAPI, not __stdcall. */
|
||||
|
@ -469,11 +475,18 @@ typedef uLong FAR uLongf;
|
|||
# undef _LARGEFILE64_SOURCE
|
||||
#endif
|
||||
|
||||
#if defined(__WATCOMC__) && !defined(Z_HAVE_UNISTD_H)
|
||||
# define Z_HAVE_UNISTD_H
|
||||
#ifndef Z_HAVE_UNISTD_H
|
||||
# ifdef __WATCOMC__
|
||||
# define Z_HAVE_UNISTD_H
|
||||
# endif
|
||||
#endif
|
||||
#ifndef Z_HAVE_UNISTD_H
|
||||
# if defined(_LARGEFILE64_SOURCE) && !defined(_WIN32)
|
||||
# define Z_HAVE_UNISTD_H
|
||||
# endif
|
||||
#endif
|
||||
#ifndef Z_SOLO
|
||||
# if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE)
|
||||
# if defined(Z_HAVE_UNISTD_H)
|
||||
# include <unistd.h> /* for SEEK_*, off_t, and _LFS64_LARGEFILE */
|
||||
# ifdef VMS
|
||||
# include <unixio.h> /* for off_t */
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
/* @(#) $Id: zconf.h.in,v 1.1.1.1 2017/01/10 00:25:30 christos Exp $ */
|
||||
/* @(#) $Id: zconf.h.in,v 1.1.1.2 2022/10/15 19:38:37 christos Exp $ */
|
||||
|
||||
#ifndef ZCONF_H
|
||||
#define ZCONF_H
|
||||
|
@ -38,6 +38,9 @@
|
|||
# define crc32 z_crc32
|
||||
# define crc32_combine z_crc32_combine
|
||||
# define crc32_combine64 z_crc32_combine64
|
||||
# define crc32_combine_gen z_crc32_combine_gen
|
||||
# define crc32_combine_gen64 z_crc32_combine_gen64
|
||||
# define crc32_combine_op z_crc32_combine_op
|
||||
# define crc32_z z_crc32_z
|
||||
# define deflate z_deflate
|
||||
# define deflateBound z_deflateBound
|
||||
|
@ -349,6 +352,9 @@
|
|||
# ifdef FAR
|
||||
# undef FAR
|
||||
# endif
|
||||
# ifndef WIN32_LEAN_AND_MEAN
|
||||
# define WIN32_LEAN_AND_MEAN
|
||||
# endif
|
||||
# include <windows.h>
|
||||
/* No need for _export, use ZLIB.DEF instead. */
|
||||
/* For complete Windows compatibility, use WINAPI, not __stdcall. */
|
||||
|
@ -467,11 +473,18 @@ typedef uLong FAR uLongf;
|
|||
# undef _LARGEFILE64_SOURCE
|
||||
#endif
|
||||
|
||||
#if defined(__WATCOMC__) && !defined(Z_HAVE_UNISTD_H)
|
||||
# define Z_HAVE_UNISTD_H
|
||||
#ifndef Z_HAVE_UNISTD_H
|
||||
# ifdef __WATCOMC__
|
||||
# define Z_HAVE_UNISTD_H
|
||||
# endif
|
||||
#endif
|
||||
#ifndef Z_HAVE_UNISTD_H
|
||||
# if defined(_LARGEFILE64_SOURCE) && !defined(_WIN32)
|
||||
# define Z_HAVE_UNISTD_H
|
||||
# endif
|
||||
#endif
|
||||
#ifndef Z_SOLO
|
||||
# if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE)
|
||||
# if defined(Z_HAVE_UNISTD_H)
|
||||
# include <unistd.h> /* for SEEK_*, off_t, and _LFS64_LARGEFILE */
|
||||
# ifdef VMS
|
||||
# include <unixio.h> /* for off_t */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
.TH ZLIB 3 "2 Jan 2017"
|
||||
.TH ZLIB 3 "13 Oct 2022"
|
||||
.SH NAME
|
||||
zlib \- compression/decompression library
|
||||
.SH SYNOPSIS
|
||||
|
@ -105,9 +105,9 @@ before asking for help.
|
|||
Send questions and/or comments to zlib@gzip.org,
|
||||
or (for the Windows DLL version) to Gilles Vollant (info@winimage.com).
|
||||
.SH AUTHORS AND LICENSE
|
||||
Version 1.2.10
|
||||
Version 1.2.13
|
||||
.LP
|
||||
Copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler
|
||||
Copyright (C) 1995-2022 Jean-loup Gailly and Mark Adler
|
||||
.LP
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
|
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue