]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
zlib 1.2.4-pre1 v1.2.4-pre1
authorMark Adler <madler@alumni.caltech.edu>
Sat, 10 Sep 2011 06:32:36 +0000 (23:32 -0700)
committerMark Adler <madler@alumni.caltech.edu>
Sat, 10 Sep 2011 06:32:36 +0000 (23:32 -0700)
67 files changed:
CMakeLists.txt
ChangeLog
FAQ
INDEX
Makefile
Makefile.in
README
configure
contrib/README.contrib
contrib/amd64/amd64-match.S
contrib/asm586/README.586 [deleted file]
contrib/asm586/match.S [deleted file]
contrib/asm686/README.686
contrib/asm686/match.S
contrib/delphi/ZLib.pas
contrib/dotzlib/DotZLib/UnitTests.cs
contrib/gcc_gvmat64/gvmat64.S [new file with mode: 0644]
contrib/infback9/inftree9.c
contrib/masm686/match.asm [deleted file]
contrib/masmx64/gvmat64.asm
contrib/masmx64/inffas8664.c
contrib/masmx64/inffasx64.asm
contrib/masmx86/bld_ml32.bat
contrib/masmx86/gvmat32.asm [deleted file]
contrib/masmx86/gvmat32c.c [deleted file]
contrib/masmx86/match686.asm [new file with mode: 0644]
contrib/masmx86/match686.obj [new file with mode: 0644]
contrib/masmx86/mkasm.bat [deleted file]
contrib/masmx86/readme.txt
contrib/pascal/zlibpas.pas
contrib/vstudio/readme.txt
contrib/vstudio/vc10/testzlib.vcxproj
contrib/vstudio/vc10/testzlib.vcxproj.filters
contrib/vstudio/vc10/zlib.rc
contrib/vstudio/vc10/zlibstat.vcxproj
contrib/vstudio/vc10/zlibstat.vcxproj.filters
contrib/vstudio/vc10/zlibvc.def
contrib/vstudio/vc10/zlibvc.sln
contrib/vstudio/vc10/zlibvc.vcxproj
contrib/vstudio/vc10/zlibvc.vcxproj.filters
contrib/vstudio/vc7/zlibvc.def [deleted file]
contrib/vstudio/vc8/zlibvc.def [deleted file]
contrib/vstudio/vc9/testzlib.vcproj
contrib/vstudio/vc9/zlib.rc
contrib/vstudio/vc9/zlibstat.vcproj
contrib/vstudio/vc9/zlibvc.def
contrib/vstudio/vc9/zlibvc.sln
contrib/vstudio/vc9/zlibvc.vcproj
deflate.c
deflate.h
gzlib.c
gzread.c
gzwrite.c
inftrees.c
make_vms.com
minigzip.c
qnx/package.qpg
treebuild.xml
trees.c
win32/Makefile.gcc
win32/Makefile.msc
zconf.h [new file with mode: 0644]
zconf.h.cmakein [new file with mode: 0644]
zconf.h.in
zlib.3
zlib.3.pdf [new file with mode: 0644]
zlib.h

index b129ef26297db1b222c91a11caa31cf2e3dcf6cf..7eefa492519ec5eed8951c24549b8c136d56fab3 100644 (file)
@@ -66,17 +66,19 @@ if(MSVC)
 endif()
 
 if(NOT CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR)
-  # If we're doing an out of source build and the user has a zconf.h
-  # in their source tree...
-  if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h)
-     message(FATAL_ERROR "You must remove zconf.h from the source tree.  This f
-ile is generated by the ./configure script shipped with zlib.  CMake generates t
-his file for you automatically in the build directory")
+    # If we're doing an out of source build and the user has a zconf.h
+    # in their source tree...
+    if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h)
+        message(FATAL_ERROR
+            "You must remove ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h "
+            "from the source tree.  This file is included with zlib "
+            "but CMake generates this file for you automatically "
+            "in the build directory.")
   endif()
 endif()
 
-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/zconf.h.in
-               ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h @ONLY)
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/zconf.h.cmakein
+               ${CMAKE_CURRENT_BINARY_DIR}/zconf.h @ONLY)
 include_directories(${CMAKE_CURRENT_BINARY_DIR})
 
 
@@ -85,7 +87,7 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR})
 #============================================================================
 
 set(ZLIB_PUBLIC_HDRS
-    zconf.h
+    ${CMAKE_CURRENT_BINARY_DIR}/zconf.h
     zlib.h
 )
 set(ZLIB_PRIVATE_HDRS
@@ -129,6 +131,7 @@ if(MINGW)
                        COMMAND windres.exe
                             -D GCC_WINDRES
                             -I ${CMAKE_CURRENT_SOURCE_DIR}
+                            -I ${CMAKE_CURRENT_BINARY_DIR}
                             -o ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj
                             -i ${CMAKE_CURRENT_SOURCE_DIR}/win32/zlib1.rc)
     set(ZLIB_SRCS ${ZLIB_SRCS} ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj)
index 736b59ea9f47e3fd5b0d7e2966dbdb1fa3881ebc..8b7afd182b33805fb815fc757b442503c9492b77 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,31 @@
 
                 ChangeLog file for zlib
 
+Changes in 1.2.4 (11 Mar 2010)
+- Fix VER3 extraction in configure for no fourth subversion
+- Update zlib.3, add docs to Makefile.in to make .pdf out of it
+- Add zlib.3.pdf to distribution
+- Don't set error code in gzerror() if passed pointer is NULL
+- Apply destination directory fixes to CMakeLists.txt [Lowman]
+- Move #cmakedefine's to a new zconf.in.cmakein
+- Restore zconf.h for builds that don't use configure or cmake
+- Add distclean to dummy Makefile for convenience
+- Update and improve INDEX, README, and FAQ
+- Update CMakeLists.txt for the return of zconf.h [Lowman]
+- Update contrib/vstudio/vc9 and vc10 [Vollant]
+- Change libz.dll.a back to libzdll.a in win32/Makefile.gcc
+- Apply license and readme changes to contrib/asm686 [Raiter]
+- Check file name lengths and add -c option in minigzip.c [Li]
+- Update contrib/amd64 and contrib/masmx86/ [Vollant]
+- Avoid use of "eof" parameter in trees.c to not shadow library variable
+- Update make_vms.com for removal of zlibdefs.h [Zinser]
+- Update assembler code and vstudio projects in contrib [Vollant]
+- Remove outdated assembler code contrib/masm686 and contrib/asm586
+- Remove old vc7 and vc8 from contrib/vstudio
+- Update win32/Makefile.msc, add ZLIB_VER_SUBREVISION [Rowe]
+- Fix memory leaks in gzclose_r() and gzclose_w(), file leak in gz_open()
+- Add contrib/gcc_gvmat64 for longest_match and inflate_fast [Vollant]
+
 Changes in 1.2.3.9 (21 Feb 2010)
 - Expunge gzio.c
 - Move as400 build information to old
@@ -256,7 +281,7 @@ Changes in 1.2.2.4 (11 July 2005)
   compile
 - Fix some spelling errors in comments [Betts]
 - Correct inflateInit2() error return documentation in zlib.h
-- Added zran.c example of compressed data random access to examples
+- Add zran.c example of compressed data random access to examples
   directory, shows use of inflatePrime()
 - Fix cast for assignments to strm->state in inflate.c and infback.c
 - Fix zlibCompileFlags() in zutil.c to use 1L for long shifts [Oberhumer]
diff --git a/FAQ b/FAQ
index 61e8e8a529e398f084ad86500172c9f3fb029453..5603207ba24a405dfb5ac0e8451105897f4f5dff 100644 (file)
--- a/FAQ
+++ b/FAQ
@@ -3,8 +3,8 @@
 
 
 If your question is not there, please check the zlib home page
-http://www.zlib.org which may have more recent information.
-The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html
+http://zlib.net/ which may have more recent information.
+The lastest zlib FAQ is at http://zlib.net/zlib_faq.html
 
 
  1. Is zlib Y2K-compliant?
@@ -13,54 +13,51 @@ The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html
 
  2. Where can I get a Windows DLL version?
 
-    The zlib sources can be compiled without change to produce a DLL.
-    See the file win32/DLL_FAQ.txt in the zlib distribution.
-    Pointers to the precompiled DLL are found in the zlib web site at
-    http://www.zlib.org.
+    The zlib sources can be compiled without change to produce a DLL.  See the
+    file win32/DLL_FAQ.txt in the zlib distribution.  Pointers to the
+    precompiled DLL are found in the zlib web site at http://zlib.net/ .
 
  3. Where can I get a Visual Basic interface to zlib?
 
     See
-        * http://www.dogma.net/markn/articles/zlibtool/zlibtool.htm
-        * contrib/visual-basic.txt in the zlib distribution
+        * http://marknelson.us/1997/01/01/zlib-engine/
         * win32/DLL_FAQ.txt in the zlib distribution
 
  4. compress() returns Z_BUF_ERROR.
 
     Make sure that before the call of compress, the length of the compressed
-    buffer is equal to the total size of the compressed buffer and not
-    zero. For Visual Basic, check that this parameter is passed by reference
+    buffer is equal to the available size of the compressed buffer and not
+    zero.  For Visual Basic, check that this parameter is passed by reference
     ("as any"), not by value ("as long").
 
  5. deflate() or inflate() returns Z_BUF_ERROR.
 
-    Before making the call, make sure that avail_in and avail_out are not
-    zero. When setting the parameter flush equal to Z_FINISH, also make sure
-    that avail_out is big enough to allow processing all pending input.
-    Note that a Z_BUF_ERROR is not fatal--another call to deflate() or
-    inflate() can be made with more input or output space. A Z_BUF_ERROR
-    may in fact be unavoidable depending on how the functions are used, since
-    it is not possible to tell whether or not there is more output pending
-    when strm.avail_out returns with zero.
+    Before making the call, make sure that avail_in and avail_out are not zero.
+    When setting the parameter flush equal to Z_FINISH, also make sure that
+    avail_out is big enough to allow processing all pending input.  Note that a
+    Z_BUF_ERROR is not fatal--another call to deflate() or inflate() can be
+    made with more input or output space.  A Z_BUF_ERROR may in fact be
+    unavoidable depending on how the functions are used, since it is not
+    possible to tell whether or not there is more output pending when
+    strm.avail_out returns with zero.  See http://zlib.net/zlib_how.html for a
+    heavily annotated example.
 
  6. Where's the zlib documentation (man pages, etc.)?
 
-    It's in zlib.h for the moment, and Francis S. Lin has converted it to a
-    web page zlib.html. Volunteers to transform this to Unix-style man pages,
-    please contact us (zlib@gzip.org). Examples of zlib usage are in the files
-    example.c and minigzip.c.
+    It's in zlib.h .  Examples of zlib usage are in the files example.c and
+    minigzip.c, with more in examples/ .
 
  7. Why don't you use GNU autoconf or libtool or ...?
 
-    Because we would like to keep zlib as a very small and simple
-    package. zlib is rather portable and doesn't need much configuration.
+    Because we would like to keep zlib as a very small and simple package.
+    zlib is rather portable and doesn't need much configuration.
 
  8. I found a bug in zlib.
 
-    Most of the time, such problems are due to an incorrect usage of
-    zlib. Please try to reproduce the problem with a small program and send
-    the corresponding source to us at zlib@gzip.org . Do not send
-    multi-megabyte data files without prior agreement.
+    Most of the time, such problems are due to an incorrect usage of zlib.
+    Please try to reproduce the problem with a small program and send the
+    corresponding source to us at zlib@gzip.org .  Do not send multi-megabyte
+    data files without prior agreement.
 
  9. Why do I get "undefined reference to gzputc"?
 
@@ -77,12 +74,12 @@ The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html
 
 11. Can zlib handle .zip archives?
 
-    Not by itself, no. See the directory contrib/minizip in the zlib
+    Not by itself, no.  See the directory contrib/minizip in the zlib
     distribution.
 
 12. Can zlib handle .Z files?
 
-    No, sorry. You have to spawn an uncompress or gunzip subprocess, or adapt
+    No, sorry.  You have to spawn an uncompress or gunzip subprocess, or adapt
     the code of uncompress on your own.
 
 13. How can I make a Unix shared library?
@@ -99,8 +96,10 @@ The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html
 
     However, many flavors of Unix come with a shared zlib already installed.
     Before going to the trouble of compiling a shared version of zlib and
-    trying to install it, you may want to check if it's already there! If you
-    can #include <zlib.h>, it's there. The -lz option will probably link to it.
+    trying to install it, you may want to check if it's already there!  If you
+    can #include <zlib.h>, it's there.  The -lz option will probably link to
+    it.  You can check the version at the top of zlib.h or with the
+    ZLIB_VERSION symbol defined in zlib.h .
 
 15. I have a question about OttoPDF.
 
@@ -121,39 +120,39 @@ The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html
         symbol __register_frame_info: referenced symbol not found
 
     The symbol __register_frame_info is not part of zlib, it is generated by
-    the C compiler (cc or gcc). You must recompile applications using zlib
-    which have this problem. This problem is specific to Solaris. See
+    the C compiler (cc or gcc).  You must recompile applications using zlib
+    which have this problem.  This problem is specific to Solaris.  See
     http://www.sunfreeware.com for Solaris versions of zlib and applications
     using zlib.
 
 18. Why does gzip give an error on a file I make with compress/deflate?
 
     The compress and deflate functions produce data in the zlib format, which
-    is different and incompatible with the gzip format. The gz* functions in
-    zlib on the other hand use the gzip format. Both the zlib and gzip
-    formats use the same compressed data format internally, but have different
-    headers and trailers around the compressed data.
+    is different and incompatible with the gzip format.  The gz* functions in
+    zlib on the other hand use the gzip format.  Both the zlib and gzip formats
+    use the same compressed data format internally, but have different headers
+    and trailers around the compressed data.
 
 19. Ok, so why are there two different formats?
 
-    The gzip format was designed to retain the directory information about
-    a single file, such as the name and last modification date. The zlib
-    format on the other hand was designed for in-memory and communication
-    channel applications, and has a much more compact header and trailer and
-    uses a faster integrity check than gzip.
+    The gzip format was designed to retain the directory information about a
+    single file, such as the name and last modification date.  The zlib format
+    on the other hand was designed for in-memory and communication channel
+    applications, and has a much more compact header and trailer and uses a
+    faster integrity check than gzip.
 
 20. Well that's nice, but how do I make a gzip file in memory?
 
     You can request that deflate write the gzip format instead of the zlib
-    format using deflateInit2(). You can also request that inflate decode
-    the gzip format using inflateInit2(). Read zlib.h for more details.
+    format using deflateInit2().  You can also request that inflate decode the
+    gzip format using inflateInit2().  Read zlib.h for more details.
 
 21. Is zlib thread-safe?
 
-    Yes. However any library routines that zlib uses and any application-
-    provided memory allocation routines must also be thread-safe. zlib's gz*
+    Yes.  However any library routines that zlib uses and any application-
+    provided memory allocation routines must also be thread-safe.  zlib's gz*
     functions use stdio library routines, and most of zlib's functions use the
-    library memory allocation routines by default. zlib's Init functions allow
+    library memory allocation routines by default.  zlib's Init functions allow
     for the application to provide custom memory allocation routines.
 
     Of course, you should only operate on any given zlib or gzip stream from a
@@ -161,27 +160,27 @@ The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html
 
 22. Can I use zlib in my commercial application?
 
-    Yes. Please read the license in zlib.h.
+    Yes.  Please read the license in zlib.h.
 
 23. Is zlib under the GNU license?
 
-    No. Please read the license in zlib.h.
+    No.  Please read the license in zlib.h.
 
 24. The license says that altered source versions must be "plainly marked". So
     what exactly do I need to do to meet that requirement?
 
-    You need to change the ZLIB_VERSION and ZLIB_VERNUM #defines in zlib.h. In
+    You need to change the ZLIB_VERSION and ZLIB_VERNUM #defines in zlib.h.  In
     particular, the final version number needs to be changed to "f", and an
-    identification string should be appended to ZLIB_VERSION. Version numbers
+    identification string should be appended to ZLIB_VERSION.  Version numbers
     x.x.x.f are reserved for modifications to zlib by others than the zlib
-    maintainers. For example, if the version of the base zlib you are altering
+    maintainers.  For example, if the version of the base zlib you are altering
     is "1.2.3.4", then in zlib.h you should change ZLIB_VERNUM to 0x123f, and
-    ZLIB_VERSION to something like "1.2.3.f-zachary-mods-v3". You can also
+    ZLIB_VERSION to something like "1.2.3.f-zachary-mods-v3".  You can also
     update the version strings in deflate.c and inftrees.c.
 
     For altered source distributions, you should also note the origin and
     nature of the changes in zlib.h, as well as in ChangeLog and README, along
-    with the dates of the alterations. The origin should include at least your
+    with the dates of the alterations.  The origin should include at least your
     name (or your company's name), and an email address to contact for help or
     issues with the library.
 
@@ -197,111 +196,112 @@ The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html
 
 26. Will zlib work on a 64-bit machine?
 
-    It should. It has been tested on 64-bit machines, and has no dependence
-    on any data types being limited to 32-bits in length. If you have any
+    Yes.  It has been tested on 64-bit machines, and has no dependence on any
+    data types being limited to 32-bits in length.  If you have any
     difficulties, please provide a complete problem report to zlib@gzip.org
 
 27. Will zlib decompress data from the PKWare Data Compression Library?
 
-    No. The PKWare DCL uses a completely different compressed data format
-    than does PKZIP and zlib. However, you can look in zlib's contrib/blast
+    No.  The PKWare DCL uses a completely different compressed data format than
+    does PKZIP and zlib.  However, you can look in zlib's contrib/blast
     directory for a possible solution to your problem.
 
 28. Can I access data randomly in a compressed stream?
 
-    No, not without some preparation. If when compressing you periodically
-    use Z_FULL_FLUSH, carefully write all the pending data at those points,
-    and keep an index of those locations, then you can start decompression
-    at those points. You have to be careful to not use Z_FULL_FLUSH too
-    often, since it can significantly degrade compression.
+    No, not without some preparation.  If when compressing you periodically use
+    Z_FULL_FLUSH, carefully write all the pending data at those points, and
+    keep an index of those locations, then you can start decompression at those
+    points.  You have to be careful to not use Z_FULL_FLUSH too often, since it
+    can significantly degrade compression.  Alternatively, you can scan a
+    deflate stream once to generate an index, and then use that index for
+    random access.  See examples/zran.c .
 
 29. Does zlib work on MVS, OS/390, CICS, etc.?
 
-    Yes, there are working ports of zlib 1.1.4 to MVS which you can find
-    here:
+    It has in the past, but we have not heard of any recent evidence.  There
+    were working ports of zlib 1.1.4 to MVS, but those links no longer work.
+    If you know of recent, successful applications of zlib on these operating
+    systems, please let us know.  Thanks.
 
-    http://www.homerow.net/asm/zlib390.htm
-    http://www.homerow.net/asm/zlibLE.htm
+30. Is there some simpler, easier to read version of inflate I can look at to
+    understand the deflate format?
 
-    If these are updated to more recent versions of zlib, please let us
-    know. Thanks.
-
-30. Is there some simpler, easier to read version of inflate I can look at
-    to understand the deflate format?
-
-    First off, you should read RFC 1951. Second, yes. Look in zlib's
+    First off, you should read RFC 1951.  Second, yes.  Look in zlib's
     contrib/puff directory.
 
 31. Does zlib infringe on any patents?
 
-    As far as we know, no. In fact, that was originally the whole point behind
-    zlib. Look here for some more information:
+    As far as we know, no.  In fact, that was originally the whole point behind
+    zlib.  Look here for some more information:
 
     http://www.gzip.org/#faq11
 
 32. Can zlib work with greater than 4 GB of data?
 
-    Yes. inflate() and deflate() will process any amount of data correctly.
+    Yes.  inflate() and deflate() will process any amount of data correctly.
     Each call of inflate() or deflate() is limited to input and output chunks
     of the maximum value that can be stored in the compiler's "unsigned int"
-    type, but there is no limit to the number of chunks. Note however that the
-    strm.total_in and strm_total_out counters may be limited to 4 GB. These
+    type, but there is no limit to the number of chunks.  Note however that the
+    strm.total_in and strm_total_out counters may be limited to 4 GB.  These
     counters are provided as a convenience and are not used internally by
-    inflate() or deflate(). The application can easily set up its own counters
+    inflate() or deflate().  The application can easily set up its own counters
     updated after each call of inflate() or deflate() to count beyond 4 GB.
     compress() and uncompress() may be limited to 4 GB, since they operate in a
-    single call. gzseek() and gztell() may be limited to 4 GB depending on how
-    zlib is compiled. See the zlibCompileFlags() function in zlib.h.
+    single call.  gzseek() and gztell() may be limited to 4 GB depending on how
+    zlib is compiled.  See the zlibCompileFlags() function in zlib.h.
 
-    The word "may" appears several times above since there is a 4 GB limit
-    only if the compiler's "long" type is 32 bits. If the compiler's "long"
-    type is 64 bits, then the limit is 16 exabytes.
+    The word "may" appears several times above since there is a 4 GB limit only
+    if the compiler's "long" type is 32 bits.  If the compiler's "long" type is
+    64 bits, then the limit is 16 exabytes.
 
 33. Does zlib have any security vulnerabilities?
 
-    The only one that we are aware of is potentially in gzprintf(). If zlib
-    is compiled to use sprintf() or vsprintf(), then there is no protection
-    against a buffer overflow of a 4K string space, other than the caller of
-    gzprintf() assuring that the output will not exceed 4K. On the other
-    hand, if zlib is compiled to use snprintf() or vsnprintf(), which should
-    normally be the case, then there is no vulnerability. The ./configure
-    script will display warnings if an insecure variation of sprintf() will
-    be used by gzprintf(). Also the zlibCompileFlags() function will return
-    information on what variant of sprintf() is used by gzprintf().
+    The only one that we are aware of is potentially in gzprintf().  If zlib is
+    compiled to use sprintf() or vsprintf(), then there is no protection
+    against a buffer overflow of an 8K string space (or other value as set by
+    gzbuffer()), other than the caller of gzprintf() assuring that the output
+    will not exceed 8K.  On the other hand, if zlib is compiled to use
+    snprintf() or vsnprintf(), which should normally be the case, then there is
+    no vulnerability.  The ./configure script will display warnings if an
+    insecure variation of sprintf() will be used by gzprintf().  Also the
+    zlibCompileFlags() function will return information on what variant of
+    sprintf() is used by gzprintf().
 
     If you don't have snprintf() or vsnprintf() and would like one, you can
     find a portable implementation here:
 
         http://www.ijs.si/software/snprintf/
 
-    Note that you should be using the most recent version of zlib. Versions
-    1.1.3 and before were subject to a double-free vulnerability, and version
-    1.2.1 was subject to an access exception when decompressing invalid
-    compressed data.
+    Note that you should be using the most recent version of zlib.  Versions
+    1.1.3 and before were subject to a double-free vulnerability, and versions
+    1.2.1 and 1.2.2 were subject to an access exception when decompressing
+    invalid compressed data.
 
 34. Is there a Java version of zlib?
 
     Probably what you want is to use zlib in Java. zlib is already included
     as part of the Java SDK in the java.util.zip package. If you really want
     a version of zlib written in the Java language, look on the zlib home
-    page for links: http://www.zlib.org/
+    page for links: http://zlib.net/ .
 
 35. I get this or that compiler or source-code scanner warning when I crank it
     up to maximally-pedantic. Can't you guys write proper code?
 
     Many years ago, we gave up attempting to avoid warnings on every compiler
-    in the universe. It just got to be a waste of time, and some compilers
-    were downright silly. So now, we simply make sure that the code always
-    works.
+    in the universe.  It just got to be a waste of time, and some compilers
+    were downright silly as well as contradicted each other.  So now, we simply
+    make sure that the code always works.
 
 36. Valgrind (or some similar memory access checker) says that deflate is
     performing a conditional jump that depends on an uninitialized value.
     Isn't that a bug?
 
-    No. That is intentional for performance reasons, and the output of
-    deflate is not affected. This only started showing up recently since
-    zlib 1.2.x uses malloc() by default for allocations, whereas earlier
-    versions used calloc(), which zeros out the allocated memory.
+    No.  That is intentional for performance reasons, and the output of deflate
+    is not affected.  This only started showing up recently since zlib 1.2.x
+    uses malloc() by default for allocations, whereas earlier versions used
+    calloc(), which zeros out the allocated memory.  Even though the code was
+    correct, versions 1.2.4 and later was changed to not stimulate these
+    checkers.
 
 37. Will zlib read the (insert any ancient or arcane format here) compressed
     data format?
@@ -311,20 +311,21 @@ The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html
 
 38. How can I encrypt/decrypt zip files with zlib?
 
-    zlib doesn't support encryption. The original PKZIP encryption is very weak
-    and can be broken with freely available programs. To get strong encryption,
-    use GnuPG, http://www.gnupg.org/ , which already includes zlib compression.
-    For PKZIP compatible "encryption", look at http://www.info-zip.org/
+    zlib doesn't support encryption.  The original PKZIP encryption is very
+    weak and can be broken with freely available programs.  To get strong
+    encryption, use GnuPG, http://www.gnupg.org/ , which already includes zlib
+    compression.  For PKZIP compatible "encryption", look at
+    http://www.info-zip.org/
 
 39. What's the difference between the "gzip" and "deflate" HTTP 1.1 encodings?
 
-    "gzip" is the gzip format, and "deflate" is the zlib format. They should
-    probably have called the second one "zlib" instead to avoid confusion
-    with the raw deflate compressed data format. While the HTTP 1.1 RFC 2616
+    "gzip" is the gzip format, and "deflate" is the zlib format.  They should
+    probably have called the second one "zlib" instead to avoid confusion with
+    the raw deflate compressed data format.  While the HTTP 1.1 RFC 2616
     correctly points to the zlib specification in RFC 1950 for the "deflate"
     transfer encoding, there have been reports of servers and browsers that
     incorrectly produce or expect raw deflate data per the deflate
-    specficiation in RFC 1951, most notably Microsoft. So even though the
+    specficiation in RFC 1951, most notably Microsoft.  So even though the
     "deflate" transfer encoding using the zlib format would be the more
     efficient approach (and in fact exactly what the zlib format was designed
     for), using the "gzip" transfer encoding is probably more reliable due to
@@ -334,28 +335,32 @@ The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html
 
 40. Does zlib support the new "Deflate64" format introduced by PKWare?
 
-    No. PKWare has apparently decided to keep that format proprietary, since
-    they have not documented it as they have previous compression formats.
-    In any case, the compression improvements are so modest compared to other
-    more modern approaches, that it's not worth the effort to implement.
+    No.  PKWare has apparently decided to keep that format proprietary, since
+    they have not documented it as they have previous compression formats.  In
+    any case, the compression improvements are so modest compared to other more
+    modern approaches, that it's not worth the effort to implement.
 
 41. I'm having a problem with the zip functions in zlib, can you help?
 
-    There are no zip functions in zlib. You are probably using minizip by
-    Giles Vollant, which is found in the contrib directory of zlib. It is not
-    part of zlib. In fact none of the stuff in contrib is part of zlib. The
-    files in there are not supported by the zlib authors. You need to contact
-    the authors of the contribution for help.
+    There are no zip functions in zlib.  You are probably using minizip by
+    Giles Vollant, which is found in the contrib directory of zlib.  It is not
+    part of zlib.  In fact none of the stuff in contrib is part of zlib.  The
+    files in there are not supported by the zlib authors.  You need to contact
+    the authors of the respective contribution for help.
 
 42. The match.asm code in contrib is under the GNU General Public License.
     Since it's part of zlib, doesn't that mean that all of zlib falls under the
     GNU GPL?
 
-    No. The files in contrib are not part of zlib. They were contributed by
+    No.  The files in contrib are not part of zlib.  They were contributed by
     other authors and are provided as a convenience to the user within the zlib
-    distribution. Each of the items in contrib have their own license.
+    distribution.  Each of the items in contrib have their own license.
+
+43. Is zlib subject to export controls?  What is its ECCN?
+
+    zlib is not subject to export controls, and so is classified as EAR99.
 
-43. Can you please sign these lengthy legal documents and fax them back to us
+44. Can you please sign these lengthy legal documents and fax them back to us
     so that we can use your software in our product?
 
     No. Go away. Shoo.
diff --git a/INDEX b/INDEX
index 01b00708fecfdc4723c518233e0eb21fee54dc8a..f66bf9bbaeedb32e1c5135f39acae214abbd99a4 100644 (file)
--- a/INDEX
+++ b/INDEX
@@ -2,33 +2,33 @@ CMakeLists.txt  cmake build file
 ChangeLog       history of changes
 FAQ             Frequently Asked Questions about zlib
 INDEX           this file
+Makefile        dummy Makefile that tells you to ./configure
 Makefile.in     template for Unix Makefile
 README          guess what
 configure       configure script for Unix
 make_vms.com    makefile for VMS
 treebuild.xml   XML description of source file dependencies
+zconf.h.cmakein zconf.h template for cmake
 zconf.h.in      zconf.h template for configure
 zlib.3          Man page for zlib
+zlib.3.pdf      Man page in PDF format
 zlib.map        Linux symbol information
 zlib.pc.in      Template for pkg-config descriptor
 zlib2ansi       perl script to convert source files for C++ compilation
 
 amiga/          makefiles for Amiga SAS C
-as400/          makefiles for IBM AS/400
 doc/            documentation for formats and algorithms
 msdos/          makefiles for MSDOS
 nintendods/     makefile for Nintendo DS
-objs/           destination for object files
 old/            makefiles for various architectures and zlib documentation
                 files that have not yet been updated for zlib 1.2.x
-pics/           destination for position-independent-code object files
 projects/       projects for various Integrated Development Environments
 qnx/            makefiles for QNX
 watcom/         makefiles for OpenWatcom
 win32/          makefiles for Windows
 
                 zlib public header files (required for library use):
-zconf.h         (made by configure)
+zconf.h
 zlib.h
 
                 private source files used to build the zlib library:
index 744c494c60840e5f9671099cafb8bc7c75900b99..3839b42d5b476867426930c2304ece951cb96c0e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,2 +1,5 @@
 all:
        -@echo "Use ./configure first.  Thank you."
+
+distclean:
+       make -f Makefile.in distclean
index c1cbeb5d5209b1d15ba18df5f09731681ad769a3..efaec6f6757bed065adee038b54dfa235f70a413 100644 (file)
@@ -32,7 +32,7 @@ CPP=$(CC) -E
 
 STATICLIB=libz.a
 SHAREDLIB=libz.so
-SHAREDLIBV=libz.so.1.2.3.9
+SHAREDLIBV=libz.so.1.2.4
 SHAREDLIBM=libz.so.1
 LIBS=$(STATICLIB) $(SHAREDLIB) $(SHAREDLIBV)
 
@@ -193,6 +193,18 @@ uninstall:
        cd $(DESTDIR)$(man3dir); rm -f zlib.3
        cd $(DESTDIR)$(pkgconfigdir); rm -f zlib.pc
 
+docs: zlib.3.pdf
+
+zlib.3.pdf: zlib.3
+       groff -mandoc -f H -T ps zlib.3 | ps2pdf - zlib.3.pdf
+
+zconf.h.in: zconf.h.cmakein
+       sed "/^#cmakedefine/D" < zconf.h.cmakein > zconf.h.in
+       touch -r zconf.h.cmakein zconf.h.in
+
+zconf: zconf.h.in
+       cp -p zconf.h.in zconf.h
+
 mostlyclean: clean
 clean:
        rm -f *.o *.lo *~ \
@@ -203,10 +215,11 @@ clean:
        rm -rf objs
 
 maintainer-clean: distclean
-distclean: clean
-       rm -f Makefile zconf.h zlib.pc
+distclean: clean zconf docs
+       rm -f Makefile zlib.pc
        -@rm -f .DS_Store
        -@printf 'all:\n\t-@echo "Use ./configure first.  Thank you."\n' > Makefile
+       -@printf '\ndistclean:\n\tmake -f Makefile.in distclean\n' >> Makefile
        -@touch -r Makefile.in Makefile
 
 tags:
diff --git a/README b/README
index e6bea094d0ef1ada8259f10d6ae90ffdcc0c8b33..f24aeee110f1a5e86a5bc912ee7ab9abd4b8fb22 100644 (file)
--- a/README
+++ b/README
@@ -1,56 +1,51 @@
 ZLIB DATA COMPRESSION LIBRARY
 
-zlib 1.2.3.9 is a general purpose data compression library.  All the code is
+zlib 1.2.4 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)
-and rfc1952.txt (gzip format). These documents are also available in other
-formats from ftp://ftp.uu.net/graphics/png/documents/zlib/zdoc-index.html
+and rfc1952.txt (gzip format).
 
 All functions of the compression library are documented in the file zlib.h
-(volunteer to write man pages welcome, contact zlib@gzip.org). A usage example
+(volunteer to write man pages welcome, contact zlib@gzip.org).  A usage example
 of the library is given in the file example.c which also tests that the library
-is working correctly. Another example is given in the file minigzip.c. The
+is working correctly.  Another example is given in the file minigzip.c.  The
 compression library itself is composed of all source files except example.c and
 minigzip.c.
 
 To compile all files and run the test program, follow the instructions given at
-the top of Makefile. In short "make test; make install" should work for most
-machines. For Unix: "./configure; make test; make install". For MSDOS, use one
-of the special makefiles such as Makefile.msc. For VMS, use make_vms.com.
+the top of Makefile.in.  In short "./configure; make test", and if that goes
+well, "make install" should work for most flavors of Unix.  For Windows, use one
+of the special makefiles in win32/ or projects/ .  For VMS, use make_vms.com.
 
 Questions about zlib should be sent to <zlib@gzip.org>, or to Gilles Vollant
-<info@winimage.com> for the Windows DLL version. The zlib home page is
-http://www.zlib.org or http://www.gzip.org/zlib/ Before reporting a problem,
-please check this site to verify that you have the latest version of zlib;
-otherwise get the latest version and check whether the problem still exists or
-not.
+<info@winimage.com> for the Windows DLL version.  The zlib home page is
+http://zlib.net/ .  Before reporting a problem, please check this site to
+verify that you have the latest version of zlib; otherwise get the latest
+version and check whether the problem still exists or not.
 
-PLEASE read the zlib FAQ http://www.gzip.org/zlib/zlib_faq.html before asking
-for help.
+PLEASE read the zlib FAQ http://zlib.net/zlib_faq.html before asking for help.
 
-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 in
-http://dogma.net/markn/articles/zlibtool/zlibtool.htm
+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.3.9 are documented in the file ChangeLog.
+The changes made in version 1.2.4 are documented in the file ChangeLog.
 
-Unsupported third party contributions are provided in directory "contrib".
+Unsupported third party contributions are provided in directory contrib/ .
 
-A Java implementation of zlib is available in the Java Development Kit
-http://java.sun.com/j2se/1.4.2/docs/api/java/util/zip/package-summary.html
-See the zlib home page http://www.zlib.org for details.
+zlib is available in Java using the java.util.zip package, documented at
+http://java.sun.com/developer/technicalArticles/Programming/compression/ .
 
-A Perl interface to zlib written by Paul Marquess <pmqs@cpan.org> is in the
-CPAN (Comprehensive Perl Archive Network) sites
-http://www.cpan.org/modules/by-module/Compress/
+A Perl interface to zlib written by Paul Marquess <pmqs@cpan.org> is available
+at CPAN (Comprehensive Perl Archive Network) sites, including
+http://search.cpan.org/~pmqs/IO-Compress-Zlib/ .
 
 A Python interface to zlib written by A.M. Kuchling <amk@amk.ca> is
 available in Python 1.5 and later versions, see
-http://www.python.org/doc/lib/module-zlib.html
+http://www.python.org/doc/lib/module-zlib.html .
 
-A zlib binding for TCL written by Andreas Kupries <a.kupries@westend.com> is
-availlable at http://www.oche.de/~akupries/soft/trf/trf_zip.html
+zlib is built into tcl: http://wiki.tcl.tk/4610 .
 
 An experimental package to read and write files in .zip format, written on top
 of zlib by Gilles Vollant <info@winimage.com>, is available in the
@@ -74,25 +69,21 @@ Notes for some targets:
 - zlib doesn't work on HP-UX 9.05 with some versions of /bin/cc. It works with
   other compilers. Use "make test" to check your compiler.
 
-- gzdopen is not supported on RISCOS, BEOS and by some Mac compilers.
+- gzdopen is not supported on RISCOS or BEOS.
 
 - For PalmOs, see http://palmzlib.sourceforge.net/
 
-- When building a shared, i.e. dynamic library on Mac OS X, the library must be
-  installed before testing (do "make install" before "make test"), since the
-  library location is specified in the library.
-
 
 Acknowledgments:
 
-  The deflate format used by zlib was defined by Phil Katz. The deflate
-  and zlib specifications were written by L. Peter Deutsch. Thanks to all the
-  people who reported problems and suggested various improvements in zlib;
-  they are too numerous to cite here.
+  The deflate format used by zlib was defined by Phil Katz.  The deflate and
+  zlib specifications were written by L.  Peter Deutsch.  Thanks to all the
+  people who reported problems and suggested various improvements in zlib; they
+  are too numerous to cite here.
 
 Copyright notice:
 
- (C) 1995-2004 Jean-loup Gailly and Mark Adler
+ (C) 1995-2010 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
@@ -113,13 +104,11 @@ Copyright notice:
   Jean-loup Gailly        Mark Adler
   jloup@gzip.org          madler@alumni.caltech.edu
 
-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.
+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.
 
-If you redistribute modified sources, we would appreciate that you include
-in the file ChangeLog history information documenting your changes. Please
-read the FAQ for more information on the distribution of modified source
-versions.
+If you redistribute modified sources, we would appreciate that you include in
+the file ChangeLog history information documenting your changes.  Please read
+the FAQ for more information on the distribution of modified source versions.
index 2ec1d5c7ad4724c1a0944a3e89db3be0d2b9f379..d3ee355c9639d21153d5bf02b96adba001b17af0 100755 (executable)
--- a/configure
+++ b/configure
@@ -16,7 +16,7 @@
 STATICLIB=libz.a
 LDFLAGS="${LDFLAGS} -L. ${STATICLIB}"
 VER=`sed -n -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`
-VER3=`sed -n -e '/VERSION "/s/.*"\([0-9]*\\.[0-9]*\\.[0-9]*\)\\..*/\1/p' < zlib.h`
+VER3=`sed -n -e '/VERSION "/s/.*"\([0-9]*\\.[0-9]*\\.[0-9]*\).*/\1/p' < zlib.h`
 VER2=`sed -n -e '/VERSION "/s/.*"\([0-9]*\\.[0-9]*\)\\..*/\1/p' < zlib.h`
 VER1=`sed -n -e '/VERSION "/s/.*"\([0-9]*\)\\..*/\1/p' < zlib.h`
 AR=${AR-"ar"}
@@ -250,7 +250,7 @@ EOF
   fi
 fi
 
-sed "/^#cmakedefine/D" < zconf.h.in > zconf.h
+cp -p zconf.h.in zconf.h
 
 cat > $test.c <<EOF
 #include <unistd.h>
index 17fc8f605d3aa05980fdf36b997b1e2f6cb8571f..dd2285d960a84ce86ee096612a93def1ab3d1a45 100644 (file)
@@ -12,7 +12,6 @@ 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
 
-asm586/
 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
@@ -26,6 +25,10 @@ delphi/     by Cosmin Truta <cosmint@cs.ubbcluj.ro>
 dotzlib/    by Henrik Ravn <henrik@ravn.com>
         Support for Microsoft .Net and Visual C++ .Net
 
+gcc_gvmat64/by Gilles Vollant <info@winimage.com>
+        GCC Version of x86 64-bit (AMD64 and Intel EM64t) code for x64
+        assembler to replace longest_match() and inflate_fast()
+
 infback9/   by Mark Adler <madler@alumni.caltech.edu>
         Unsupported diffs to infback to decode the deflate64 format
 
@@ -42,21 +45,19 @@ iostream3/  by Ludwig Schwardt <schwardt@sun.ac.za>
             and Kevin Ruland <kevin@rodin.wustl.edu>
         Yet another C++ I/O streams interface
 
-masm686/    by Dan Higdon <hdan@kinesoft.com>
-            and Chuck Walbourn <chuckw@kinesoft.com>
-        asm code for Pentium Pro/PII, using the MASM syntax
-
 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()
+        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
+        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>
+        Includes Zip64 support by Mathias Svensson <mathias@result42.com>
         See http://www.winimage.com/zLibDll/unzip.html
 
 pascal/     by Bob Dellaca <bobdl@xtra.co.nz> et al.
index b3bf1ac416926ff0a1a1cbe4a9ccec5d31c8ef34..81d4a1c9494b1c7a26849d2b594874918f04c700 100644 (file)
 #define save_r13        (64-LocalVarsSize)(%rsp)
 #define save_r15        (80-LocalVarsSize)(%rsp)
 
+
+.globl match_init, longest_match
+
 /*
  * On AMD64 the first argument of a function (in our case -- the pointer to
  * deflate_state structure) is passed in %rdi, hence our offsets below are
  * all off of that.
  */
+
+/* you can check the structure offset by running
+
+#include <stdlib.h>
+#include <stdio.h>
+#include "deflate.h"
+
+void print_depl()
+{
+deflate_state ds;
+deflate_state *s=&ds;
+printf("size pointer=%u\n",(int)sizeof(void*));
+
+printf("#define dsWSize         (%3u)(%%rdi)\n",(int)(((char*)&(s->w_size))-((char*)s)));
+printf("#define dsWMask         (%3u)(%%rdi)\n",(int)(((char*)&(s->w_mask))-((char*)s)));
+printf("#define dsWindow        (%3u)(%%rdi)\n",(int)(((char*)&(s->window))-((char*)s)));
+printf("#define dsPrev          (%3u)(%%rdi)\n",(int)(((char*)&(s->prev))-((char*)s)));
+printf("#define dsMatchLen      (%3u)(%%rdi)\n",(int)(((char*)&(s->match_length))-((char*)s)));
+printf("#define dsPrevMatch     (%3u)(%%rdi)\n",(int)(((char*)&(s->prev_match))-((char*)s)));
+printf("#define dsStrStart      (%3u)(%%rdi)\n",(int)(((char*)&(s->strstart))-((char*)s)));
+printf("#define dsMatchStart    (%3u)(%%rdi)\n",(int)(((char*)&(s->match_start))-((char*)s)));
+printf("#define dsLookahead     (%3u)(%%rdi)\n",(int)(((char*)&(s->lookahead))-((char*)s)));
+printf("#define dsPrevLen       (%3u)(%%rdi)\n",(int)(((char*)&(s->prev_length))-((char*)s)));
+printf("#define dsMaxChainLen   (%3u)(%%rdi)\n",(int)(((char*)&(s->max_chain_length))-((char*)s)));
+printf("#define dsGoodMatch     (%3u)(%%rdi)\n",(int)(((char*)&(s->good_match))-((char*)s)));
+printf("#define dsNiceMatch     (%3u)(%%rdi)\n",(int)(((char*)&(s->nice_match))-((char*)s)));
+}
+
+*/
+
+
+/*
+  to compile for XCode 3.2 on MacOSX x86_64
+  - run "gcc -g -c -DXCODE_MAC_X64_STRUCTURE amd64-match.S"
+ */
+
+
+#ifndef CURRENT_LINX_XCODE_MAC_X64_STRUCTURE
+#define dsWSize                ( 68)(%rdi)
+#define dsWMask                ( 76)(%rdi)
+#define dsWindow       ( 80)(%rdi)
+#define dsPrev         ( 96)(%rdi)
+#define dsMatchLen     (144)(%rdi)
+#define dsPrevMatch    (148)(%rdi)
+#define dsStrStart     (156)(%rdi)
+#define dsMatchStart   (160)(%rdi)
+#define dsLookahead    (164)(%rdi)
+#define dsPrevLen      (168)(%rdi)
+#define dsMaxChainLen  (172)(%rdi)
+#define dsGoodMatch    (188)(%rdi)
+#define dsNiceMatch    (192)(%rdi)
+
+#else 
+
 #ifndef STRUCT_OFFSET
 #      define STRUCT_OFFSET    (0)
 #endif
+
+
 #define dsWSize                ( 56 + STRUCT_OFFSET)(%rdi)
 #define dsWMask                ( 64 + STRUCT_OFFSET)(%rdi)
 #define dsWindow       ( 72 + STRUCT_OFFSET)(%rdi)
 #define dsGoodMatch    (180 + STRUCT_OFFSET)(%rdi)
 #define dsNiceMatch    (184 + STRUCT_OFFSET)(%rdi)
 
-.globl match_init, longest_match
+#endif
+
+
+
 
 .text
 
@@ -222,7 +284,9 @@ LoopEntry:  cmpw    -1(%windowbestlen, %curmatch), %scanendw
  * straightforward "rep cmpsb" would not drastically degrade
  * performance -- unrolling it, for example, makes no difference.
  */
+
 #undef USE_SSE /* works, but is 6-7% slower, than non-SSE... */
+
 LoopCmps:
 #ifdef USE_SSE
                /* Preload the SSE registers */
@@ -244,29 +308,55 @@ LoopCmps:
                notw    %ax
                bsfw    %ax, %ax
                jnz     LeaveLoopCmps
-               add     $16, %rdx
+               
+               /* this is the only iteration of the loop with a possibility of having
+                  incremented rdx by 0x108 (each loop iteration add 16*4 = 0x40 
+                  and (0x40*4)+8=0x108 */
+               add     $8, %rdx
+               jz LenMaximum
+               add     $8, %rdx
+
+               
                pmovmskb %xmm3, %rax
                notw    %ax
                bsfw    %ax, %ax
                jnz     LeaveLoopCmps
+               
+               
                add     $16, %rdx
+
+
                pmovmskb %xmm5, %rax
                notw    %ax
                bsfw    %ax, %ax
                jnz     LeaveLoopCmps
+               
                add     $16, %rdx
+
+
                pmovmskb %xmm7, %rax
                notw    %ax
                bsfw    %ax, %ax
                jnz     LeaveLoopCmps
+               
                add     $16, %rdx
+               
                jmp     LoopCmps
 LeaveLoopCmps: add     %rax, %rdx
 #else
                mov     (%windowbestlen, %rdx), %rax
                xor     (%prev, %rdx), %rax
                jnz     LeaveLoopCmps
-               add     $8, %rdx
+               
+               mov     8(%windowbestlen, %rdx), %rax
+               xor     8(%prev, %rdx), %rax
+               jnz     LeaveLoopCmps8
+
+               mov     16(%windowbestlen, %rdx), %rax
+               xor     16(%prev, %rdx), %rax
+               jnz     LeaveLoopCmps16
+                               
+               add     $24, %rdx
                jnz     LoopCmps
                jmp     LenMaximum
 #      if 0
@@ -274,10 +364,15 @@ LeaveLoopCmps:    add     %rax, %rdx
  * This three-liner is tantalizingly simple, but bsf is a slow instruction,
  * and the complicated alternative down below is quite a bit faster. Sad...
  */
+
 LeaveLoopCmps: bsf     %rax, %rax /* find the first non-zero bit */
                shrl    $3, %eax /* divide by 8 to get the byte */
                add     %rax, %rdx
 #      else
+LeaveLoopCmps16:
+               add     $8, %rdx
+LeaveLoopCmps8:
+               add     $8, %rdx
 LeaveLoopCmps: testl   $0xFFFFFFFF, %eax /* Check the first 4 bytes */
                jnz     Check16
                add     $4, %rdx
diff --git a/contrib/asm586/README.586 b/contrib/asm586/README.586
deleted file mode 100644 (file)
index 6bb78f3..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-This is a patched version of zlib modified to use
-Pentium-optimized assembly code in the deflation algorithm. The files
-changed/added by this patch are:
-
-README.586
-match.S
-
-The effectiveness of these modifications is a bit marginal, as the the
-program's bottleneck seems to be mostly L1-cache contention, for which
-there is no real way to work around without rewriting the basic
-algorithm. The speedup on average is around 5-10% (which is generally
-less than the amount of variance between subsequent executions).
-However, when used at level 9 compression, the cache contention can
-drop enough for the assembly version to achieve 10-20% speedup (and
-sometimes more, depending on the amount of overall redundancy in the
-files). Even here, though, cache contention can still be the limiting
-factor, depending on the nature of the program using the zlib library.
-This may also mean that better improvements will be seen on a Pentium
-with MMX, which suffers much less from L1-cache contention, but I have
-not yet verified this.
-
-Note that this code has been tailored for the Pentium in particular,
-and will not perform well on the Pentium Pro (due to the use of a
-partial register in the inner loop).
-
-If you are using an assembler other than GNU as, you will have to
-translate match.S to use your assembler's syntax. (Have fun.)
-
-Brian Raiter
-breadbox@muppetlabs.com
-April, 1998
-
-
-Added for zlib 1.1.3:
-
-The patches come from
-http://www.muppetlabs.com/~breadbox/software/assembly.html
-
-To compile zlib with this asm file, copy match.S to the zlib directory
-then do:
-
-CFLAGS="-O3 -DASMV" ./configure
-make OBJA=match.o
diff --git a/contrib/asm586/match.S b/contrib/asm586/match.S
deleted file mode 100644 (file)
index 0368b35..0000000
+++ /dev/null
@@ -1,364 +0,0 @@
-/* match.s -- Pentium-optimized version of longest_match()
- * Written for zlib 1.1.2
- * Copyright (C) 1998 Brian Raiter <breadbox@muppetlabs.com>
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License.
- */
-
-#ifndef NO_UNDERLINE
-#define        match_init      _match_init
-#define        longest_match   _longest_match
-#endif
-
-#define        MAX_MATCH       (258)
-#define        MIN_MATCH       (3)
-#define        MIN_LOOKAHEAD   (MAX_MATCH + MIN_MATCH + 1)
-#define        MAX_MATCH_8     ((MAX_MATCH + 7) & ~7)
-
-/* stack frame offsets */
-
-#define        wmask                   0       /* local copy of s->wmask       */
-#define        window                  4       /* local copy of s->window      */
-#define        windowbestlen           8       /* s->window + bestlen          */
-#define        chainlenscanend         12      /* high word: current chain len */
-                                       /* low word: last bytes sought  */
-#define        scanstart               16      /* first two bytes of string    */
-#define        scanalign               20      /* dword-misalignment of string */
-#define        nicematch               24      /* a good enough match size     */
-#define        bestlen                 28      /* size of best match so far    */
-#define        scan                    32      /* ptr to string wanting match  */
-
-#define        LocalVarsSize           (36)
-/*     saved ebx               36 */
-/*     saved edi               40 */
-/*     saved esi               44 */
-/*     saved ebp               48 */
-/*     return address          52 */
-#define        deflatestate            56      /* the function arguments       */
-#define        curmatch                60
-
-/* Offsets for fields in the deflate_state structure. These numbers
- * are calculated from the definition of deflate_state, with the
- * assumption that the compiler will dword-align the fields. (Thus,
- * changing the definition of deflate_state could easily cause this
- * program to crash horribly, without so much as a warning at
- * compile time. Sigh.)
- */
-
-/* All the +zlib1222add offsets are due to the addition of fields
- *  in zlib in the deflate_state structure since the asm code was first written
- * (if you compile with zlib 1.0.4 or older, use "zlib1222add equ (-4)").
- * (if you compile with zlib between 1.0.5 and 1.2.2.1, use "zlib1222add equ 0").
- * if you compile with zlib 1.2.2.2 or later , use "zlib1222add equ 8").
- */
-
-#define zlib1222add            (8)
-
-#define        dsWSize                 (36+zlib1222add)
-#define        dsWMask                 (44+zlib1222add)
-#define        dsWindow                (48+zlib1222add)
-#define        dsPrev                  (56+zlib1222add)
-#define        dsMatchLen              (88+zlib1222add)
-#define        dsPrevMatch             (92+zlib1222add)
-#define        dsStrStart              (100+zlib1222add)
-#define        dsMatchStart            (104+zlib1222add)
-#define        dsLookahead             (108+zlib1222add)
-#define        dsPrevLen               (112+zlib1222add)
-#define        dsMaxChainLen           (116+zlib1222add)
-#define        dsGoodMatch             (132+zlib1222add)
-#define        dsNiceMatch             (136+zlib1222add)
-
-
-.file "match.S"
-
-.globl match_init, longest_match
-
-.text
-
-/* uInt longest_match(deflate_state *deflatestate, IPos curmatch) */
-
-longest_match:
-
-/* Save registers that the compiler may be using, and adjust %esp to   */
-/* make room for our stack frame.                                      */
-
-               pushl   %ebp
-               pushl   %edi
-               pushl   %esi
-               pushl   %ebx
-               subl    $LocalVarsSize, %esp
-
-/* Retrieve the function arguments. %ecx will hold cur_match           */
-/* throughout the entire function. %edx will hold the pointer to the   */
-/* deflate_state structure during the function's setup (before         */
-/* entering the main loop).                                            */
-
-               movl    deflatestate(%esp), %edx
-               movl    curmatch(%esp), %ecx
-
-/* if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead;     */
-
-               movl    dsNiceMatch(%edx), %eax
-               movl    dsLookahead(%edx), %ebx
-               cmpl    %eax, %ebx
-               jl      LookaheadLess
-               movl    %eax, %ebx
-LookaheadLess: movl    %ebx, nicematch(%esp)
-
-/* register Bytef *scan = s->window + s->strstart;                     */
-
-               movl    dsWindow(%edx), %esi
-               movl    %esi, window(%esp)
-               movl    dsStrStart(%edx), %ebp
-               lea     (%esi,%ebp), %edi
-               movl    %edi, scan(%esp)
-
-/* Determine how many bytes the scan ptr is off from being             */
-/* dword-aligned.                                                      */
-
-               movl    %edi, %eax
-               negl    %eax
-               andl    $3, %eax
-               movl    %eax, scanalign(%esp)
-
-/* IPos limit = s->strstart > (IPos)MAX_DIST(s) ?                      */
-/*     s->strstart - (IPos)MAX_DIST(s) : NIL;                          */
-
-               movl    dsWSize(%edx), %eax
-               subl    $MIN_LOOKAHEAD, %eax
-               subl    %eax, %ebp
-               jg      LimitPositive
-               xorl    %ebp, %ebp
-LimitPositive:
-
-/* unsigned chain_length = s->max_chain_length;                                */
-/* if (s->prev_length >= s->good_match) {                              */
-/*     chain_length >>= 2;                                             */
-/* }                                                                   */
-
-               movl    dsPrevLen(%edx), %eax
-               movl    dsGoodMatch(%edx), %ebx
-               cmpl    %ebx, %eax
-               movl    dsMaxChainLen(%edx), %ebx
-               jl      LastMatchGood
-               shrl    $2, %ebx
-LastMatchGood:
-
-/* chainlen is decremented once beforehand so that the function can    */
-/* use the sign flag instead of the zero flag for the exit test.       */
-/* It is then shifted into the high word, to make room for the scanend */
-/* scanend value, which it will always accompany.                      */
-
-               decl    %ebx
-               shll    $16, %ebx
-
-/* int best_len = s->prev_length;                                      */
-
-               movl    dsPrevLen(%edx), %eax
-               movl    %eax, bestlen(%esp)
-
-/* Store the sum of s->window + best_len in %esi locally, and in %esi. */
-
-               addl    %eax, %esi
-               movl    %esi, windowbestlen(%esp)
-
-/* register ush scan_start = *(ushf*)scan;                             */
-/* register ush scan_end   = *(ushf*)(scan+best_len-1);                        */
-
-               movw    (%edi), %bx
-               movw    %bx, scanstart(%esp)
-               movw    -1(%edi,%eax), %bx
-               movl    %ebx, chainlenscanend(%esp)
-
-/* Posf *prev = s->prev;                                               */
-/* uInt wmask = s->w_mask;                                             */
-
-               movl    dsPrev(%edx), %edi
-               movl    dsWMask(%edx), %edx
-               mov     %edx, wmask(%esp)
-
-/* Jump into the main loop.                                            */
-
-               jmp     LoopEntry
-
-.balign 16
-
-/* do {
- *     match = s->window + cur_match;
- *     if (*(ushf*)(match+best_len-1) != scan_end ||
- *         *(ushf*)match != scan_start) continue;
- *     [...]
- * } while ((cur_match = prev[cur_match & wmask]) > limit
- *          && --chain_length != 0);
- *
- * Here is the inner loop of the function. The function will spend the
- * majority of its time in this loop, and majority of that time will
- * be spent in the first ten instructions.
- *
- * Within this loop:
- * %ebx = chainlenscanend - i.e., ((chainlen << 16) | scanend)
- * %ecx = curmatch
- * %edx = curmatch & wmask
- * %esi = windowbestlen - i.e., (window + bestlen)
- * %edi = prev
- * %ebp = limit
- *
- * Two optimization notes on the choice of instructions:
- *
- * The first instruction uses a 16-bit address, which costs an extra,
- * unpairable cycle. This is cheaper than doing a 32-bit access and
- * zeroing the high word, due to the 3-cycle misalignment penalty which
- * would occur half the time. This also turns out to be cheaper than
- * doing two separate 8-bit accesses, as the memory is so rarely in the
- * L1 cache.
- *
- * The window buffer, however, apparently spends a lot of time in the
- * cache, and so it is faster to retrieve the word at the end of the
- * match string with two 8-bit loads. The instructions that test the
- * word at the beginning of the match string, however, are executed
- * much less frequently, and there it was cheaper to use 16-bit
- * instructions, which avoided the necessity of saving off and
- * subsequently reloading one of the other registers.
- */
-LookupLoop:
-                                                       /* 1 U & V  */
-               movw    (%edi,%edx,2), %cx              /* 2 U pipe */
-               movl    wmask(%esp), %edx               /* 2 V pipe */
-               cmpl    %ebp, %ecx                      /* 3 U pipe */
-               jbe     LeaveNow                        /* 3 V pipe */
-               subl    $0x00010000, %ebx               /* 4 U pipe */
-               js      LeaveNow                        /* 4 V pipe */
-LoopEntry:     movb    -1(%esi,%ecx), %al              /* 5 U pipe */
-               andl    %ecx, %edx                      /* 5 V pipe */
-               cmpb    %bl, %al                        /* 6 U pipe */
-               jnz     LookupLoop                      /* 6 V pipe */
-               movb    (%esi,%ecx), %ah
-               cmpb    %bh, %ah
-               jnz     LookupLoop
-               movl    window(%esp), %eax
-               movw    (%eax,%ecx), %ax
-               cmpw    scanstart(%esp), %ax
-               jnz     LookupLoop
-
-/* Store the current value of chainlen.                                        */
-
-               movl    %ebx, chainlenscanend(%esp)
-
-/* Point %edi to the string under scrutiny, and %esi to the string we  */
-/* are hoping to match it up with. In actuality, %esi and %edi are     */
-/* both pointed (MAX_MATCH_8 - scanalign) bytes ahead, and %edx is     */
-/* initialized to -(MAX_MATCH_8 - scanalign).                          */
-
-               movl    window(%esp), %esi
-               movl    scan(%esp), %edi
-               addl    %ecx, %esi
-               movl    scanalign(%esp), %eax
-               movl    $(-MAX_MATCH_8), %edx
-               lea     MAX_MATCH_8(%edi,%eax), %edi
-               lea     MAX_MATCH_8(%esi,%eax), %esi
-
-/* Test the strings for equality, 8 bytes at a time. At the end,
- * adjust %edx so that it is offset to the exact byte that mismatched.
- *
- * We already know at this point that the first three bytes of the
- * strings match each other, and they can be safely passed over before
- * starting the compare loop. So what this code does is skip over 0-3
- * bytes, as much as necessary in order to dword-align the %edi
- * pointer. (%esi will still be misaligned three times out of four.)
- *
- * It should be confessed that this loop usually does not represent
- * much of the total running time. Replacing it with a more
- * straightforward "rep cmpsb" would not drastically degrade
- * performance.
- */
-LoopCmps:
-               movl    (%esi,%edx), %eax
-               movl    (%edi,%edx), %ebx
-               xorl    %ebx, %eax
-               jnz     LeaveLoopCmps
-               movl    4(%esi,%edx), %eax
-               movl    4(%edi,%edx), %ebx
-               xorl    %ebx, %eax
-               jnz     LeaveLoopCmps4
-               addl    $8, %edx
-               jnz     LoopCmps
-               jmp     LenMaximum
-LeaveLoopCmps4:        addl    $4, %edx
-LeaveLoopCmps: testl   $0x0000FFFF, %eax
-               jnz     LenLower
-               addl    $2, %edx
-               shrl    $16, %eax
-LenLower:      subb    $1, %al
-               adcl    $0, %edx
-
-/* Calculate the length of the match. If it is longer than MAX_MATCH,  */
-/* then automatically accept it as the best possible match and leave.  */
-
-               lea     (%edi,%edx), %eax
-               movl    scan(%esp), %edi
-               subl    %edi, %eax
-               cmpl    $MAX_MATCH, %eax
-               jge     LenMaximum
-
-/* If the length of the match is not longer than the best match we     */
-/* have so far, then forget it and return to the lookup loop.          */
-
-               movl    deflatestate(%esp), %edx
-               movl    bestlen(%esp), %ebx
-               cmpl    %ebx, %eax
-               jg      LongerMatch
-               movl    chainlenscanend(%esp), %ebx
-               movl    windowbestlen(%esp), %esi
-               movl    dsPrev(%edx), %edi
-               movl    wmask(%esp), %edx
-               andl    %ecx, %edx
-               jmp     LookupLoop
-
-/*         s->match_start = cur_match;                                 */
-/*         best_len = len;                                             */
-/*         if (len >= nice_match) break;                               */
-/*         scan_end = *(ushf*)(scan+best_len-1);                       */
-
-LongerMatch:   movl    nicematch(%esp), %ebx
-               movl    %eax, bestlen(%esp)
-               movl    %ecx, dsMatchStart(%edx)
-               cmpl    %ebx, %eax
-               jge     LeaveNow
-               movl    window(%esp), %esi
-               addl    %eax, %esi
-               movl    %esi, windowbestlen(%esp)
-               movl    chainlenscanend(%esp), %ebx
-               movw    -1(%edi,%eax), %bx
-               movl    dsPrev(%edx), %edi
-               movl    %ebx, chainlenscanend(%esp)
-               movl    wmask(%esp), %edx
-               andl    %ecx, %edx
-               jmp     LookupLoop
-
-/* Accept the current string, with the maximum possible length.                */
-
-LenMaximum:    movl    deflatestate(%esp), %edx
-               movl    $MAX_MATCH, bestlen(%esp)
-               movl    %ecx, dsMatchStart(%edx)
-
-/* if ((uInt)best_len <= s->lookahead) return (uInt)best_len;          */
-/* return s->lookahead;                                                        */
-
-LeaveNow:
-               movl    deflatestate(%esp), %edx
-               movl    bestlen(%esp), %ebx
-               movl    dsLookahead(%edx), %eax
-               cmpl    %eax, %ebx
-               jg      LookaheadRet
-               movl    %ebx, %eax
-LookaheadRet:
-
-/* Restore the stack and return from whence we came.                   */
-
-               addl    $LocalVarsSize, %esp
-               popl    %ebx
-               popl    %esi
-               popl    %edi
-               popl    %ebp
-match_init:    ret
index a593f23afd655086de3e123916b0587ebd2706f6..a0bf3bea4aff5b9c231fadb605b9cc455fe31bb8 100644 (file)
@@ -32,3 +32,20 @@ then do:
 
 CFLAGS="-O3 -DASMV" ./configure
 make OBJA=match.o
+
+
+Update:
+
+I've been ignoring these assembly routines for years, believing that
+gcc's generated code had caught up with it sometime around gcc 2.95
+and the major rearchitecting of the Pentium 4. However, I recently
+learned that, despite what I believed, this code still has some life
+in it. On the Pentium 4 and AMD64 chips, it continues to run about 8%
+faster than the code produced by gcc 4.1.
+
+In acknowledgement of its continuing usefulness, I've altered the
+license to match that of the rest of zlib. Share and Enjoy!
+
+Brian Raiter
+breadbox@muppetlabs.com
+April, 2007
index 5c3e9ee367182e20a19fcaac74a0a4a472ee6ff7..06817e1dd08bd102bcf6a813632533a7372302cb 100644 (file)
@@ -1,9 +1,23 @@
-/* match.s -- Pentium-Pro-optimized version of longest_match()
- * Written for zlib 1.1.2
- * Copyright (C) 1998 Brian Raiter <breadbox@muppetlabs.com>
+/* match.S -- x86 assembly version of the zlib longest_match() function.
+ * Optimized for the Intel 686 chips (PPro and later).
  *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License.
+ * Copyright (C) 1998, 2007 Brian Raiter <breadbox@muppetlabs.com>
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.  In no event will the author 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.
  */
 
 #ifndef NO_UNDERLINE
index 3f2b8b4a5cdbc8612ad5fd56f444ca59f5fe840f..179f9a90ccf4ae43eac415f3e95115520499e355 100644 (file)
@@ -152,7 +152,7 @@ procedure DecompressToUserBuf(const InBuf: Pointer; InBytes: Integer;
   const OutBuf: Pointer; BufSize: Integer);
 
 const
-  zlib_version = '1.2.3';
+  zlib_version = '1.2.4';
 
 type
   EZlibError = class(Exception);
index eb751bbbddeab6bf5e0d6966a48af0b4f7c91719..42c45884bbcec43ecea43aeeaabdd7c4163fc63f 100644 (file)
@@ -156,7 +156,7 @@ namespace DotZLibTests
         public void Info_Version()\r
         {\r
             Info info = new Info();\r
-            Assert.AreEqual("1.2.3", Info.Version);\r
+            Assert.AreEqual("1.2.4", Info.Version);\r
             Assert.AreEqual(32, info.SizeOfUInt);\r
             Assert.AreEqual(32, info.SizeOfULong);\r
             Assert.AreEqual(32, info.SizeOfPointer);\r
diff --git a/contrib/gcc_gvmat64/gvmat64.S b/contrib/gcc_gvmat64/gvmat64.S
new file mode 100644 (file)
index 0000000..dd858dd
--- /dev/null
@@ -0,0 +1,574 @@
+/*\r
+;uInt longest_match_x64(\r
+;    deflate_state *s,\r
+;    IPos cur_match);                             // current match \r
+\r
+; gvmat64.S -- Asm portion of the optimized longest_match for 32 bits x86_64\r
+;  (AMD64 on Athlon 64, Opteron, Phenom\r
+;     and Intel EM64T on Pentium 4 with EM64T, Pentium D, Core 2 Duo, Core I5/I7)\r
+; this file is translation from gvmat64.asm to GCC 4.x (for Linux, Mac XCode)\r
+; Copyright (C) 1995-2010 Jean-loup Gailly, Brian Raiter and Gilles Vollant.\r
+;\r
+; File written by Gilles Vollant, by converting to assembly the longest_match\r
+;  from Jean-loup Gailly in deflate.c of zLib and infoZip zip.\r
+;  and by taking inspiration on asm686 with masm, optimised assembly code\r
+;        from Brian Raiter, written 1998\r
+;\r
+;  This software is provided 'as-is', without any express or implied\r
+;  warranty.  In no event will the authors be held liable for any damages\r
+;  arising from the use of this software.\r
+;\r
+;  Permission is granted to anyone to use this software for any purpose,\r
+;  including commercial applications, and to alter it and redistribute it\r
+;  freely, subject to the following restrictions:\r
+;\r
+;  1. The origin of this software must not be misrepresented; you must not\r
+;     claim that you wrote the original software. If you use this software\r
+;     in a product, an acknowledgment in the product documentation would be\r
+;     appreciated but is not required.\r
+;  2. Altered source versions must be plainly marked as such, and must not be\r
+;     misrepresented as being the original software\r
+;  3. This notice may not be removed or altered from any source distribution.\r
+;\r
+;         http://www.zlib.net\r
+;         http://www.winimage.com/zLibDll\r
+;         http://www.muppetlabs.com/~breadbox/software/assembly.html\r
+;\r
+; to compile this file for zLib, I use option:\r
+;   gcc -c -arch x86_64 gvmat64.S\r
+\r
+\r
+;uInt longest_match(s, cur_match)\r
+;    deflate_state *s;\r
+;    IPos cur_match;                             // current match /\r
+;\r
+; with XCode for Mac, I had strange error with some jump on intel syntax\r
+; this is why BEFORE_JMP and AFTER_JMP are used\r
+ */\r
+\r
+\r
+#define BEFORE_JMP .att_syntax\r
+#define AFTER_JMP .intel_syntax noprefix\r
+\r
+#ifndef NO_UNDERLINE\r
+#      define  match_init      _match_init\r
+#      define  longest_match   _longest_match\r
+#endif\r
+\r
+.intel_syntax noprefix\r
+\r
+.globl match_init, longest_match\r
+.text\r
+longest_match:\r
+\r
+\r
+\r
+#define LocalVarsSize 96\r
+/*\r
+; register used : rax,rbx,rcx,rdx,rsi,rdi,r8,r9,r10,r11,r12\r
+; free register :  r14,r15\r
+; register can be saved : rsp\r
+*/\r
+\r
+#define chainlenwmask     (rsp + 8 - LocalVarsSize)\r
+#define nicematch         (rsp + 16 - LocalVarsSize)\r
+\r
+#define save_rdi        (rsp + 24 - LocalVarsSize)\r
+#define save_rsi        (rsp + 32 - LocalVarsSize)\r
+#define save_rbx        (rsp + 40 - LocalVarsSize)\r
+#define save_rbp        (rsp + 48 - LocalVarsSize)\r
+#define save_r12        (rsp + 56 - LocalVarsSize)\r
+#define save_r13        (rsp + 64 - LocalVarsSize)\r
+#define save_r14        (rsp + 72 - LocalVarsSize)\r
+#define save_r15        (rsp + 80 - LocalVarsSize)\r
+\r
+\r
+/*\r
+;  all the +4 offsets are due to the addition of pending_buf_size (in zlib\r
+;  in the deflate_state structure since the asm code was first written\r
+;  (if you compile with zlib 1.0.4 or older, remove the +4).\r
+;  Note : these value are good with a 8 bytes boundary pack structure\r
+*/\r
+\r
+#define    MAX_MATCH              258\r
+#define    MIN_MATCH              3\r
+#define    MIN_LOOKAHEAD          (MAX_MATCH+MIN_MATCH+1)\r
+\r
+/*\r
+;;; Offsets for fields in the deflate_state structure. These numbers\r
+;;; are calculated from the definition of deflate_state, with the\r
+;;; assumption that the compiler will dword-align the fields. (Thus,\r
+;;; changing the definition of deflate_state could easily cause this\r
+;;; program to crash horribly, without so much as a warning at\r
+;;; compile time. Sigh.)\r
+\r
+;  all the +zlib1222add offsets are due to the addition of fields\r
+;  in zlib in the deflate_state structure since the asm code was first written\r
+;  (if you compile with zlib 1.0.4 or older, use "zlib1222add equ (-4)").\r
+;  (if you compile with zlib between 1.0.5 and 1.2.2.1, use "zlib1222add equ 0").\r
+;  if you compile with zlib 1.2.2.2 or later , use "zlib1222add equ 8").\r
+*/\r
+\r
+\r
+\r
+/* you can check the structure offset by running\r
+\r
+#include <stdlib.h>\r
+#include <stdio.h>\r
+#include "deflate.h"\r
+\r
+void print_depl()\r
+{\r
+deflate_state ds;\r
+deflate_state *s=&ds;\r
+printf("size pointer=%u\n",(int)sizeof(void*));\r
+\r
+printf("#define dsWSize         %u\n",(int)(((char*)&(s->w_size))-((char*)s)));\r
+printf("#define dsWMask         %u\n",(int)(((char*)&(s->w_mask))-((char*)s)));\r
+printf("#define dsWindow        %u\n",(int)(((char*)&(s->window))-((char*)s)));\r
+printf("#define dsPrev          %u\n",(int)(((char*)&(s->prev))-((char*)s)));\r
+printf("#define dsMatchLen      %u\n",(int)(((char*)&(s->match_length))-((char*)s)));\r
+printf("#define dsPrevMatch     %u\n",(int)(((char*)&(s->prev_match))-((char*)s)));\r
+printf("#define dsStrStart      %u\n",(int)(((char*)&(s->strstart))-((char*)s)));\r
+printf("#define dsMatchStart    %u\n",(int)(((char*)&(s->match_start))-((char*)s)));\r
+printf("#define dsLookahead     %u\n",(int)(((char*)&(s->lookahead))-((char*)s)));\r
+printf("#define dsPrevLen       %u\n",(int)(((char*)&(s->prev_length))-((char*)s)));\r
+printf("#define dsMaxChainLen   %u\n",(int)(((char*)&(s->max_chain_length))-((char*)s)));\r
+printf("#define dsGoodMatch     %u\n",(int)(((char*)&(s->good_match))-((char*)s)));\r
+printf("#define dsNiceMatch     %u\n",(int)(((char*)&(s->nice_match))-((char*)s)));\r
+}\r
+*/\r
+\r
+#define dsWSize          68\r
+#define dsWMask          76\r
+#define dsWindow         80\r
+#define dsPrev           96\r
+#define dsMatchLen       144\r
+#define dsPrevMatch      148\r
+#define dsStrStart       156\r
+#define dsMatchStart     160\r
+#define dsLookahead      164\r
+#define dsPrevLen        168\r
+#define dsMaxChainLen    172\r
+#define dsGoodMatch      188\r
+#define dsNiceMatch      192\r
+\r
+#define window_size      [ rcx + dsWSize]\r
+#define WMask            [ rcx + dsWMask]\r
+#define window_ad        [ rcx + dsWindow]\r
+#define prev_ad          [ rcx + dsPrev]\r
+#define strstart         [ rcx + dsStrStart]\r
+#define match_start      [ rcx + dsMatchStart]\r
+#define Lookahead        [ rcx + dsLookahead] //; 0ffffffffh on infozip\r
+#define prev_length      [ rcx + dsPrevLen]\r
+#define max_chain_length [ rcx + dsMaxChainLen]\r
+#define good_match       [ rcx + dsGoodMatch]\r
+#define nice_match       [ rcx + dsNiceMatch]\r
+\r
+/*\r
+; windows:\r
+; parameter 1 in rcx(deflate state s), param 2 in rdx (cur match)\r
+\r
+; see http://weblogs.asp.net/oldnewthing/archive/2004/01/14/58579.aspx and\r
+; http://msdn.microsoft.com/library/en-us/kmarch/hh/kmarch/64bitAMD_8e951dd2-ee77-4728-8702-55ce4b5dd24a.xml.asp\r
+;\r
+; All registers must be preserved across the call, except for\r
+;   rax, rcx, rdx, r8, r9, r10, and r11, which are scratch.\r
+\r
+;\r
+; gcc on macosx-linux:\r
+; see http://www.x86-64.org/documentation/abi-0.99.pdf\r
+; param 1 in rdi, param 2 in rsi\r
+; rbx, rsp, rbp, r12 to r15 must be preserved\r
+\r
+;;; Save registers that the compiler may be using, and adjust esp to\r
+;;; make room for our stack frame.\r
+\r
+\r
+;;; Retrieve the function arguments. r8d will hold cur_match\r
+;;; throughout the entire function. edx will hold the pointer to the\r
+;;; deflate_state structure during the function's setup (before\r
+;;; entering the main loop.\r
+\r
+; ms: parameter 1 in rcx (deflate_state* s), param 2 in edx -> r8 (cur match)\r
+; mac: param 1 in rdi, param 2 rsi\r
+; this clear high 32 bits of r8, which can be garbage in both r8 and rdx\r
+*/\r
+        mov [save_rbx],rbx\r
+        mov [save_rbp],rbp\r
+\r
+\r
+        mov rcx,rdi\r
+\r
+        mov r8d,esi\r
+\r
+\r
+        mov [save_r12],r12\r
+        mov [save_r13],r13\r
+        mov [save_r14],r14\r
+        mov [save_r15],r15\r
+\r
+\r
+//;;; uInt wmask = s->w_mask;\r
+//;;; unsigned chain_length = s->max_chain_length;\r
+//;;; if (s->prev_length >= s->good_match) {\r
+//;;;     chain_length >>= 2;\r
+//;;; }\r
+\r
+\r
+        mov edi, prev_length\r
+        mov esi, good_match\r
+        mov eax, WMask\r
+        mov ebx, max_chain_length\r
+        cmp edi, esi\r
+        jl  LastMatchGood\r
+        shr ebx, 2\r
+LastMatchGood:\r
+\r
+//;;; chainlen is decremented once beforehand so that the function can\r
+//;;; use the sign flag instead of the zero flag for the exit test.\r
+//;;; It is then shifted into the high word, to make room for the wmask\r
+//;;; value, which it will always accompany.\r
+\r
+        dec ebx\r
+        shl ebx, 16\r
+        or  ebx, eax\r
+\r
+//;;; on zlib only\r
+//;;; if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead;\r
+\r
+\r
+\r
+        mov eax, nice_match\r
+        mov [chainlenwmask], ebx\r
+        mov r10d, Lookahead\r
+        cmp r10d, eax\r
+        cmovnl r10d, eax\r
+        mov [nicematch],r10d\r
+\r
+\r
+\r
+//;;; register Bytef *scan = s->window + s->strstart;\r
+        mov r10, window_ad\r
+        mov ebp, strstart\r
+        lea r13, [r10 + rbp]\r
+\r
+//;;; Determine how many bytes the scan ptr is off from being\r
+//;;; dword-aligned.\r
+\r
+         mov r9,r13\r
+         neg r13\r
+         and r13,3\r
+\r
+//;;; IPos limit = s->strstart > (IPos)MAX_DIST(s) ?\r
+//;;;     s->strstart - (IPos)MAX_DIST(s) : NIL;\r
+\r
+\r
+        mov eax, window_size\r
+        sub eax, MIN_LOOKAHEAD\r
+\r
+\r
+        xor edi,edi\r
+        sub ebp, eax\r
+\r
+        mov r11d, prev_length\r
+\r
+        cmovng ebp,edi\r
+\r
+//;;; int best_len = s->prev_length;\r
+\r
+\r
+//;;; Store the sum of s->window + best_len in esi locally, and in esi.\r
+\r
+       lea  rsi,[r10+r11]\r
+\r
+//;;; register ush scan_start = *(ushf*)scan;\r
+//;;; register ush scan_end   = *(ushf*)(scan+best_len-1);\r
+//;;; Posf *prev = s->prev;\r
+\r
+        movzx r12d,word ptr [r9]\r
+        movzx ebx, word ptr [r9 + r11 - 1]\r
+\r
+        mov rdi, prev_ad\r
+\r
+//;;; Jump into the main loop.\r
+\r
+        mov edx, [chainlenwmask]\r
+\r
+        cmp bx,word ptr [rsi + r8 - 1]\r
+        jz  LookupLoopIsZero\r
+                               \r
+                                               \r
+                                               \r
+LookupLoop1:\r
+        and r8d, edx\r
+\r
+        movzx   r8d, word ptr [rdi + r8*2]\r
+        cmp r8d, ebp\r
+        jbe LeaveNow\r
+               \r
+               \r
+               \r
+        sub edx, 0x00010000\r
+               BEFORE_JMP\r
+        js  LeaveNow\r
+               AFTER_JMP\r
+\r
+LoopEntry1:\r
+        cmp bx,word ptr [rsi + r8 - 1]\r
+               BEFORE_JMP\r
+        jz  LookupLoopIsZero\r
+               AFTER_JMP\r
+\r
+LookupLoop2:\r
+        and r8d, edx\r
+\r
+        movzx   r8d, word ptr [rdi + r8*2]\r
+        cmp r8d, ebp\r
+               BEFORE_JMP\r
+        jbe LeaveNow\r
+               AFTER_JMP\r
+        sub edx, 0x00010000\r
+               BEFORE_JMP\r
+        js  LeaveNow\r
+               AFTER_JMP\r
+\r
+LoopEntry2:\r
+        cmp bx,word ptr [rsi + r8 - 1]\r
+               BEFORE_JMP\r
+        jz  LookupLoopIsZero\r
+               AFTER_JMP\r
+\r
+LookupLoop4:\r
+        and r8d, edx\r
+\r
+        movzx   r8d, word ptr [rdi + r8*2]\r
+        cmp r8d, ebp\r
+               BEFORE_JMP\r
+        jbe LeaveNow\r
+               AFTER_JMP\r
+        sub edx, 0x00010000\r
+               BEFORE_JMP\r
+        js  LeaveNow\r
+               AFTER_JMP\r
+\r
+LoopEntry4:\r
+\r
+        cmp bx,word ptr [rsi + r8 - 1]\r
+               BEFORE_JMP\r
+        jnz LookupLoop1\r
+        jmp LookupLoopIsZero\r
+               AFTER_JMP\r
+/*\r
+;;; do {\r
+;;;     match = s->window + cur_match;\r
+;;;     if (*(ushf*)(match+best_len-1) != scan_end ||\r
+;;;         *(ushf*)match != scan_start) continue;\r
+;;;     [...]\r
+;;; } while ((cur_match = prev[cur_match & wmask]) > limit\r
+;;;          && --chain_length != 0);\r
+;;;\r
+;;; Here is the inner loop of the function. The function will spend the\r
+;;; majority of its time in this loop, and majority of that time will\r
+;;; be spent in the first ten instructions.\r
+;;;\r
+;;; Within this loop:\r
+;;; ebx = scanend\r
+;;; r8d = curmatch\r
+;;; edx = chainlenwmask - i.e., ((chainlen << 16) | wmask)\r
+;;; esi = windowbestlen - i.e., (window + bestlen)\r
+;;; edi = prev\r
+;;; ebp = limit\r
+*/\r
+.balign 16\r
+LookupLoop:\r
+        and r8d, edx\r
+\r
+        movzx   r8d, word ptr [rdi + r8*2]\r
+        cmp r8d, ebp\r
+               BEFORE_JMP\r
+        jbe LeaveNow\r
+               AFTER_JMP\r
+        sub edx, 0x00010000\r
+               BEFORE_JMP\r
+        js  LeaveNow\r
+               AFTER_JMP\r
+\r
+LoopEntry:\r
+\r
+        cmp bx,word ptr [rsi + r8 - 1]\r
+               BEFORE_JMP\r
+        jnz LookupLoop1\r
+               AFTER_JMP\r
+LookupLoopIsZero:\r
+        cmp     r12w, word ptr [r10 + r8]\r
+               BEFORE_JMP\r
+        jnz LookupLoop1\r
+               AFTER_JMP\r
+\r
+\r
+//;;; Store the current value of chainlen.\r
+        mov [chainlenwmask], edx\r
+/*\r
+;;; Point edi to the string under scrutiny, and esi to the string we\r
+;;; are hoping to match it up with. In actuality, esi and edi are\r
+;;; both pointed (MAX_MATCH_8 - scanalign) bytes ahead, and edx is\r
+;;; initialized to -(MAX_MATCH_8 - scanalign).\r
+*/\r
+        lea rsi,[r8+r10]\r
+        mov rdx, 0xfffffffffffffef8 //; -(MAX_MATCH_8)\r
+        lea rsi, [rsi + r13 + 0x0108] //;MAX_MATCH_8]\r
+        lea rdi, [r9 + r13 + 0x0108] //;MAX_MATCH_8]\r
+\r
+        prefetcht1 [rsi+rdx]\r
+        prefetcht1 [rdi+rdx]\r
+\r
+/*\r
+;;; Test the strings for equality, 8 bytes at a time. At the end,\r
+;;; adjust rdx so that it is offset to the exact byte that mismatched.\r
+;;;\r
+;;; We already know at this point that the first three bytes of the\r
+;;; strings match each other, and they can be safely passed over before\r
+;;; starting the compare loop. So what this code does is skip over 0-3\r
+;;; bytes, as much as necessary in order to dword-align the edi\r
+;;; pointer. (rsi will still be misaligned three times out of four.)\r
+;;;\r
+;;; It should be confessed that this loop usually does not represent\r
+;;; much of the total running time. Replacing it with a more\r
+;;; straightforward "rep cmpsb" would not drastically degrade\r
+;;; performance.\r
+*/\r
+\r
+LoopCmps:\r
+        mov rax, [rsi + rdx]\r
+        xor rax, [rdi + rdx]\r
+        jnz LeaveLoopCmps\r
+\r
+        mov rax, [rsi + rdx + 8]\r
+        xor rax, [rdi + rdx + 8]\r
+        jnz LeaveLoopCmps8\r
+\r
+\r
+        mov rax, [rsi + rdx + 8+8]\r
+        xor rax, [rdi + rdx + 8+8]\r
+        jnz LeaveLoopCmps16\r
+\r
+        add rdx,8+8+8\r
+\r
+               BEFORE_JMP\r
+        jnz  LoopCmps\r
+        jmp  LenMaximum\r
+               AFTER_JMP\r
+               \r
+LeaveLoopCmps16: add rdx,8\r
+LeaveLoopCmps8: add rdx,8\r
+LeaveLoopCmps:\r
+\r
+        test    eax, 0x0000FFFF\r
+        jnz LenLower\r
+\r
+        test eax,0xffffffff\r
+\r
+        jnz LenLower32\r
+\r
+        add rdx,4\r
+        shr rax,32\r
+        or ax,ax\r
+               BEFORE_JMP\r
+        jnz LenLower\r
+               AFTER_JMP\r
+\r
+LenLower32:\r
+        shr eax,16\r
+        add rdx,2\r
+               \r
+LenLower:              \r
+        sub al, 1\r
+        adc rdx, 0\r
+//;;; Calculate the length of the match. If it is longer than MAX_MATCH,\r
+//;;; then automatically accept it as the best possible match and leave.\r
+\r
+        lea rax, [rdi + rdx]\r
+        sub rax, r9\r
+        cmp eax, MAX_MATCH\r
+               BEFORE_JMP\r
+        jge LenMaximum\r
+               AFTER_JMP\r
+/*\r
+;;; If the length of the match is not longer than the best match we\r
+;;; have so far, then forget it and return to the lookup loop.\r
+;///////////////////////////////////\r
+*/\r
+        cmp eax, r11d\r
+        jg  LongerMatch\r
+\r
+        lea rsi,[r10+r11]\r
+\r
+        mov rdi, prev_ad\r
+        mov edx, [chainlenwmask]\r
+               BEFORE_JMP\r
+        jmp LookupLoop\r
+               AFTER_JMP\r
+/*\r
+;;;         s->match_start = cur_match;\r
+;;;         best_len = len;\r
+;;;         if (len >= nice_match) break;\r
+;;;         scan_end = *(ushf*)(scan+best_len-1);\r
+*/\r
+LongerMatch:\r
+        mov r11d, eax\r
+        mov match_start, r8d\r
+        cmp eax, [nicematch]\r
+               BEFORE_JMP\r
+        jge LeaveNow\r
+               AFTER_JMP\r
+\r
+        lea rsi,[r10+rax]\r
+\r
+        movzx   ebx, word ptr [r9 + rax - 1]\r
+        mov rdi, prev_ad\r
+        mov edx, [chainlenwmask]\r
+               BEFORE_JMP\r
+        jmp LookupLoop\r
+               AFTER_JMP\r
+\r
+//;;; Accept the current string, with the maximum possible length.\r
+\r
+LenMaximum:\r
+        mov r11d,MAX_MATCH\r
+        mov match_start, r8d\r
+\r
+//;;; if ((uInt)best_len <= s->lookahead) return (uInt)best_len;\r
+//;;; return s->lookahead;\r
+\r
+LeaveNow:\r
+        mov eax, Lookahead\r
+        cmp r11d, eax\r
+        cmovng eax, r11d\r
+\r
+\r
+\r
+//;;; Restore the stack and return from whence we came.\r
+\r
+\r
+//        mov rsi,[save_rsi]\r
+//        mov rdi,[save_rdi]\r
+        mov rbx,[save_rbx]\r
+        mov rbp,[save_rbp]\r
+        mov r12,[save_r12]\r
+        mov r13,[save_r13]\r
+        mov r14,[save_r14]\r
+        mov r15,[save_r15]\r
+\r
+\r
+        ret 0\r
+//; please don't remove this string !\r
+//; Your can freely use gvmat64 in any free or commercial app\r
+//; but it is far better don't remove the string in the binary!\r
+ //   db     0dh,0ah,"asm686 with masm, optimised assembly code from Brian Raiter, written 1998, converted to amd 64 by Gilles Vollant 2005",0dh,0ah,0\r
+\r
+\r
+match_init:\r
+  ret 0\r
+\r
+\r
index c2c8af96974227b54924121161c218cad94baf81..8d15fdc01f6c5a8b11ee12c1a1bba622f9dd0e9a 100644 (file)
@@ -9,7 +9,7 @@
 #define MAXBITS 15
 
 const char inflate9_copyright[] =
-   " inflate9 1.2.3.9 Copyright 1995-2010 Mark Adler ";
+   " inflate9 1.2.4 Copyright 1995-2010 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, 193, 201};
+        133, 133, 133, 133, 144, 66, 199};
     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,
diff --git a/contrib/masm686/match.asm b/contrib/masm686/match.asm
deleted file mode 100644 (file)
index 4b03a71..0000000
+++ /dev/null
@@ -1,413 +0,0 @@
-\r
-; match.asm -- Pentium-Pro optimized version of longest_match()\r
-;\r
-; Updated for zlib 1.1.3 and converted to MASM 6.1x\r
-; Copyright (C) 2000 Dan Higdon <hdan@kinesoft.com>\r
-;                    and Chuck Walbourn <chuckw@kinesoft.com>\r
-; Corrections by Cosmin Truta <cosmint@cs.ubbcluj.ro>\r
-;\r
-; This is free software; you can redistribute it and/or modify it\r
-; under the terms of the GNU General Public License.\r
-\r
-; Based on match.S\r
-; Written for zlib 1.1.2\r
-; Copyright (C) 1998 Brian Raiter <breadbox@muppetlabs.com>\r
-;\r
-; Modified by Gilles Vollant (2005) for add gzhead and gzindex\r
-\r
-       .686P\r
-       .MODEL  FLAT\r
-\r
-;===========================================================================\r
-; EQUATES\r
-;===========================================================================\r
-\r
-MAX_MATCH      EQU 258\r
-MIN_MATCH      EQU 3\r
-MIN_LOOKAHEAD  EQU (MAX_MATCH + MIN_MATCH + 1)\r
-MAX_MATCH_8    EQU ((MAX_MATCH + 7) AND (NOT 7))\r
-\r
-;===========================================================================\r
-; STRUCTURES\r
-;===========================================================================\r
-\r
-; This STRUCT assumes a 4-byte alignment\r
-\r
-DEFLATE_STATE  STRUCT\r
-ds_strm                        dd ?\r
-ds_status              dd ?\r
-ds_pending_buf         dd ?\r
-ds_pending_buf_size    dd ?\r
-ds_pending_out         dd ?\r
-ds_pending             dd ?\r
-ds_wrap                        dd ?\r
-; gzhead and gzindex are added in zlib 1.2.2.2 (see deflate.h)\r
-ds_gzhead               dd ?\r
-ds_gzindex              dd ?\r
-ds_data_type           db ?\r
-ds_method              db ?\r
-                       db ?    ; padding\r
-                       db ?    ; padding\r
-ds_last_flush          dd ?\r
-ds_w_size              dd ?    ; used\r
-ds_w_bits              dd ?\r
-ds_w_mask              dd ?    ; used\r
-ds_window              dd ?    ; used\r
-ds_window_size         dd ?\r
-ds_prev                        dd ?    ; used\r
-ds_head                        dd ?\r
-ds_ins_h               dd ?\r
-ds_hash_size           dd ?\r
-ds_hash_bits           dd ?\r
-ds_hash_mask           dd ?\r
-ds_hash_shift          dd ?\r
-ds_block_start         dd ?\r
-ds_match_length                dd ?    ; used\r
-ds_prev_match          dd ?    ; used\r
-ds_match_available     dd ?\r
-ds_strstart            dd ?    ; used\r
-ds_match_start         dd ?    ; used\r
-ds_lookahead           dd ?    ; used\r
-ds_prev_length         dd ?    ; used\r
-ds_max_chain_length    dd ?    ; used\r
-ds_max_laxy_match      dd ?\r
-ds_level               dd ?\r
-ds_strategy            dd ?\r
-ds_good_match          dd ?    ; used\r
-ds_nice_match          dd ?    ; used\r
-\r
-; Don't need anymore of the struct for match\r
-DEFLATE_STATE  ENDS\r
-\r
-;===========================================================================\r
-; CODE\r
-;===========================================================================\r
-_TEXT  SEGMENT\r
-\r
-;---------------------------------------------------------------------------\r
-; match_init\r
-;---------------------------------------------------------------------------\r
-       ALIGN   4\r
-PUBLIC _match_init\r
-_match_init    PROC\r
-       ; no initialization needed\r
-       ret\r
-_match_init    ENDP\r
-\r
-;---------------------------------------------------------------------------\r
-; uInt longest_match(deflate_state *deflatestate, IPos curmatch)\r
-;---------------------------------------------------------------------------\r
-       ALIGN   4\r
-\r
-PUBLIC _longest_match\r
-_longest_match PROC\r
-\r
-; Since this code uses EBP for a scratch register, the stack frame must\r
-; be manually constructed and referenced relative to the ESP register.\r
-\r
-; Stack image\r
-; Variables\r
-chainlenwmask  =  0    ; high word: current chain len\r
-                       ; low word: s->wmask\r
-window         =  4    ; local copy of s->window\r
-windowbestlen  =  8    ; s->window + bestlen\r
-scanend                = 12    ; last two bytes of string\r
-scanstart      = 16    ; first two bytes of string\r
-scanalign      = 20    ; dword-misalignment of string\r
-nicematch      = 24    ; a good enough match size\r
-bestlen                = 28    ; size of best match so far\r
-scan           = 32    ; ptr to string wanting match\r
-varsize                = 36    ; number of bytes (also offset to last saved register)\r
-\r
-; Saved Registers (actually pushed into place)\r
-ebx_save       = 36\r
-edi_save       = 40\r
-esi_save       = 44\r
-ebp_save       = 48\r
-\r
-; Parameters\r
-retaddr                = 52\r
-deflatestate   = 56\r
-curmatch       = 60\r
-\r
-; Save registers that the compiler may be using\r
-       push    ebp\r
-       push    edi\r
-       push    esi\r
-       push    ebx\r
-\r
-; Allocate local variable space\r
-       sub     esp,varsize\r
-\r
-; Retrieve the function arguments. ecx will hold cur_match\r
-; throughout the entire function. edx will hold the pointer to the\r
-; deflate_state structure during the function's setup (before\r
-; entering the main loop).\r
-\r
-       mov     edx, [esp+deflatestate]\r
-ASSUME edx:PTR DEFLATE_STATE\r
-\r
-       mov     ecx, [esp+curmatch]\r
-\r
-; uInt wmask = s->w_mask;\r
-; unsigned chain_length = s->max_chain_length;\r
-; if (s->prev_length >= s->good_match) {\r
-;     chain_length >>= 2;\r
-; }\r
-\r
-       mov     eax, [edx].ds_prev_length\r
-       mov     ebx, [edx].ds_good_match\r
-       cmp     eax, ebx\r
-       mov     eax, [edx].ds_w_mask\r
-       mov     ebx, [edx].ds_max_chain_length\r
-       jl      SHORT LastMatchGood\r
-       shr     ebx, 2\r
-LastMatchGood:\r
-\r
-; chainlen is decremented once beforehand so that the function can\r
-; use the sign flag instead of the zero flag for the exit test.\r
-; It is then shifted into the high word, to make room for the wmask\r
-; value, which it will always accompany.\r
-\r
-       dec     ebx\r
-       shl     ebx, 16\r
-       or      ebx, eax\r
-       mov     [esp+chainlenwmask], ebx\r
-\r
-; if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead;\r
-\r
-       mov     eax, [edx].ds_nice_match\r
-       mov     ebx, [edx].ds_lookahead\r
-       cmp     ebx, eax\r
-       jl      SHORT LookaheadLess\r
-       mov     ebx, eax\r
-LookaheadLess:\r
-       mov     [esp+nicematch], ebx\r
-\r
-;/* register Bytef *scan = s->window + s->strstart;                     */\r
-\r
-       mov     esi, [edx].ds_window\r
-       mov     [esp+window], esi\r
-       mov     ebp, [edx].ds_strstart\r
-       lea     edi, [esi+ebp]\r
-       mov     [esp+scan],edi\r
-\r
-;/* Determine how many bytes the scan ptr is off from being             */\r
-;/* dword-aligned.                                                      */\r
-\r
-       mov     eax, edi\r
-       neg     eax\r
-       and     eax, 3\r
-       mov     [esp+scanalign], eax\r
-\r
-;/* IPos limit = s->strstart > (IPos)MAX_DIST(s) ?                      */\r
-;/*     s->strstart - (IPos)MAX_DIST(s) : NIL;                          */\r
-\r
-       mov     eax, [edx].ds_w_size\r
-       sub     eax, MIN_LOOKAHEAD\r
-       sub     ebp, eax\r
-       jg      SHORT LimitPositive\r
-       xor     ebp, ebp\r
-LimitPositive:\r
-\r
-;/* int best_len = s->prev_length;                                      */\r
-\r
-       mov     eax, [edx].ds_prev_length\r
-       mov     [esp+bestlen], eax\r
-\r
-;/* Store the sum of s->window + best_len in %esi locally, and in %esi. */\r
-\r
-       add     esi, eax\r
-       mov     [esp+windowbestlen], esi\r
-\r
-;/* register ush scan_start = *(ushf*)scan;                             */\r
-;/* register ush scan_end   = *(ushf*)(scan+best_len-1);                */\r
-;/* Posf *prev = s->prev;                                               */\r
-\r
-       movzx   ebx, WORD PTR[edi]\r
-       mov     [esp+scanstart], ebx\r
-       movzx   ebx, WORD PTR[eax+edi-1]\r
-       mov     [esp+scanend], ebx\r
-       mov     edi, [edx].ds_prev\r
-\r
-;/* Jump into the main loop.                                            */\r
-\r
-       mov     edx, [esp+chainlenwmask]\r
-       jmp     SHORT LoopEntry\r
-\r
-;/* do {\r
-; *     match = s->window + cur_match;\r
-; *     if (*(ushf*)(match+best_len-1) != scan_end ||\r
-; *         *(ushf*)match != scan_start) continue;\r
-; *     [...]\r
-; * } while ((cur_match = prev[cur_match & wmask]) > limit\r
-; *          && --chain_length != 0);\r
-; *\r
-; * Here is the inner loop of the function. The function will spend the\r
-; * majority of its time in this loop, and majority of that time will\r
-; * be spent in the first ten instructions.\r
-; *\r
-; * Within this loop:\r
-; * %ebx = scanend\r
-; * %ecx = curmatch\r
-; * %edx = chainlenwmask - i.e., ((chainlen << 16) | wmask)\r
-; * %esi = windowbestlen - i.e., (window + bestlen)\r
-; * %edi = prev\r
-; * %ebp = limit\r
-; */\r
-\r
-       ALIGN   4\r
-LookupLoop:\r
-       and     ecx, edx\r
-       movzx   ecx, WORD PTR[edi+ecx*2]\r
-       cmp     ecx, ebp\r
-       jbe     LeaveNow\r
-       sub     edx, 000010000H\r
-       js      LeaveNow\r
-\r
-LoopEntry:\r
-       movzx   eax, WORD PTR[esi+ecx-1]\r
-       cmp     eax, ebx\r
-       jnz     SHORT LookupLoop\r
-\r
-       mov     eax, [esp+window]\r
-       movzx   eax, WORD PTR[eax+ecx]\r
-       cmp     eax, [esp+scanstart]\r
-       jnz     SHORT LookupLoop\r
-\r
-;/* Store the current value of chainlen.                                */\r
-\r
-       mov     [esp+chainlenwmask], edx\r
-\r
-;/* Point %edi to the string under scrutiny, and %esi to the string we  */\r
-;/* are hoping to match it up with. In actuality, %esi and %edi are     */\r
-;/* both pointed (MAX_MATCH_8 - scanalign) bytes ahead, and %edx is     */\r
-;/* initialized to -(MAX_MATCH_8 - scanalign).                          */\r
-\r
-       mov     esi, [esp+window]\r
-       mov     edi, [esp+scan]\r
-       add     esi, ecx\r
-       mov     eax, [esp+scanalign]\r
-       mov     edx, -MAX_MATCH_8\r
-       lea     edi, [edi+eax+MAX_MATCH_8]\r
-       lea     esi, [esi+eax+MAX_MATCH_8]\r
-\r
-;/* Test the strings for equality, 8 bytes at a time. At the end,\r
-; * adjust %edx so that it is offset to the exact byte that mismatched.\r
-; *\r
-; * We already know at this point that the first three bytes of the\r
-; * strings match each other, and they can be safely passed over before\r
-; * starting the compare loop. So what this code does is skip over 0-3\r
-; * bytes, as much as necessary in order to dword-align the %edi\r
-; * pointer. (%esi will still be misaligned three times out of four.)\r
-; *\r
-; * It should be confessed that this loop usually does not represent\r
-; * much of the total running time. Replacing it with a more\r
-; * straightforward "rep cmpsb" would not drastically degrade\r
-; * performance.\r
-; */\r
-\r
-LoopCmps:\r
-       mov     eax, DWORD PTR[esi+edx]\r
-       xor     eax, DWORD PTR[edi+edx]\r
-       jnz     SHORT LeaveLoopCmps\r
-\r
-       mov     eax, DWORD PTR[esi+edx+4]\r
-       xor     eax, DWORD PTR[edi+edx+4]\r
-       jnz     SHORT LeaveLoopCmps4\r
-\r
-       add     edx, 8\r
-       jnz     SHORT LoopCmps\r
-       jmp     LenMaximum\r
-       ALIGN   4\r
-\r
-LeaveLoopCmps4:\r
-       add     edx, 4\r
-\r
-LeaveLoopCmps:\r
-       test    eax, 00000FFFFH\r
-       jnz     SHORT LenLower\r
-\r
-       add     edx, 2\r
-       shr     eax, 16\r
-\r
-LenLower:\r
-       sub     al, 1\r
-       adc     edx, 0\r
-\r
-;/* Calculate the length of the match. If it is longer than MAX_MATCH,  */\r
-;/* then automatically accept it as the best possible match and leave.  */\r
-\r
-       lea     eax, [edi+edx]\r
-       mov     edi, [esp+scan]\r
-       sub     eax, edi\r
-       cmp     eax, MAX_MATCH\r
-       jge     SHORT LenMaximum\r
-\r
-;/* If the length of the match is not longer than the best match we     */\r
-;/* have so far, then forget it and return to the lookup loop.          */\r
-\r
-       mov     edx, [esp+deflatestate]\r
-       mov     ebx, [esp+bestlen]\r
-       cmp     eax, ebx\r
-       jg      SHORT LongerMatch\r
-       mov     esi, [esp+windowbestlen]\r
-       mov     edi, [edx].ds_prev\r
-       mov     ebx, [esp+scanend]\r
-       mov     edx, [esp+chainlenwmask]\r
-       jmp     LookupLoop\r
-       ALIGN   4\r
-\r
-;/*         s->match_start = cur_match;                                 */\r
-;/*         best_len = len;                                             */\r
-;/*         if (len >= nice_match) break;                               */\r
-;/*         scan_end = *(ushf*)(scan+best_len-1);                       */\r
-\r
-LongerMatch:\r
-       mov     ebx, [esp+nicematch]\r
-       mov     [esp+bestlen], eax\r
-       mov     [edx].ds_match_start, ecx\r
-       cmp     eax, ebx\r
-       jge     SHORT LeaveNow\r
-       mov     esi, [esp+window]\r
-       add     esi, eax\r
-       mov     [esp+windowbestlen], esi\r
-       movzx   ebx, WORD PTR[edi+eax-1]\r
-       mov     edi, [edx].ds_prev\r
-       mov     [esp+scanend], ebx\r
-       mov     edx, [esp+chainlenwmask]\r
-       jmp     LookupLoop\r
-       ALIGN   4\r
-\r
-;/* Accept the current string, with the maximum possible length.        */\r
-\r
-LenMaximum:\r
-       mov     edx, [esp+deflatestate]\r
-       mov     DWORD PTR[esp+bestlen], MAX_MATCH\r
-       mov     [edx].ds_match_start, ecx\r
-\r
-;/* if ((uInt)best_len <= s->lookahead) return (uInt)best_len;          */\r
-;/* return s->lookahead;                                                */\r
-\r
-LeaveNow:\r
-       mov     edx, [esp+deflatestate]\r
-       mov     ebx, [esp+bestlen]\r
-       mov     eax, [edx].ds_lookahead\r
-       cmp     ebx, eax\r
-       jg      SHORT LookaheadRet\r
-       mov     eax, ebx\r
-LookaheadRet:\r
-\r
-; Restore the stack and return from whence we came.\r
-\r
-       add     esp, varsize\r
-       pop     ebx\r
-       pop     esi\r
-       pop     edi\r
-       pop     ebp\r
-       ret\r
-\r
-_longest_match ENDP\r
-\r
-_TEXT  ENDS\r
-END\r
index d2790cc1018f83a47806b9e85fbf9ccc943e052a..9879c28b908c94d5b0ee598b283da13d26bc8dcf 100644 (file)
@@ -2,8 +2,10 @@
 ;    deflate_state *s,\r
 ;    IPos cur_match);                             /* current match */\r
 \r
-; gvmat64.asm -- Asm portion of the optimized longest_match for 32 bits x86\r
-; Copyright (C) 1995-2005 Jean-loup Gailly, Brian Raiter and Gilles Vollant.\r
+; gvmat64.asm -- Asm portion of the optimized longest_match for 32 bits x86_64\r
+;  (AMD64 on Athlon 64, Opteron, Phenom\r
+;     and Intel EM64T on Pentium 4 with EM64T, Pentium D, Core 2 Duo, Core I5/I7)\r
+; Copyright (C) 1995-2010 Jean-loup Gailly, Brian Raiter and Gilles Vollant.\r
 ;\r
 ; File written by Gilles Vollant, by converting to assembly the longest_match\r
 ;  from Jean-loup Gailly in deflate.c of zLib and infoZip zip.\r
 ;  and by taking inspiration on asm686 with masm, optimised assembly code\r
 ;        from Brian Raiter, written 1998\r
 ;\r
+;  This software is provided 'as-is', without any express or implied\r
+;  warranty.  In no event will the authors be held liable for any damages\r
+;  arising from the use of this software.\r
+;\r
+;  Permission is granted to anyone to use this software for any purpose,\r
+;  including commercial applications, and to alter it and redistribute it\r
+;  freely, subject to the following restrictions:\r
+;\r
+;  1. The origin of this software must not be misrepresented; you must not\r
+;     claim that you wrote the original software. If you use this software\r
+;     in a product, an acknowledgment in the product documentation would be\r
+;     appreciated but is not required.\r
+;  2. Altered source versions must be plainly marked as such, and must not be\r
+;     misrepresented as being the original software\r
+;  3. This notice may not be removed or altered from any source distribution.\r
+;\r
+;\r
+;\r
 ;         http://www.zlib.net\r
 ;         http://www.winimage.com/zLibDll\r
 ;         http://www.muppetlabs.com/~breadbox/software/assembly.html\r
 ;\r
 ; This file compile with Microsoft Macro Assembler (x64) for AMD64\r
 ;\r
-;   ml64.exe is given with Visual Studio 2005 and Windows 2003 server DDK\r
+;   ml64.exe is given with Visual Studio 2005/2008/2010 and Windows WDK\r
 ;\r
-;   (you can get Windows 2003 server DDK with ml64 and cl for AMD64 from\r
-;      http://www.microsoft.com/whdc/devtools/ddk/default.mspx for low price)\r
+;   (you can get Windows WDK with ml64 for AMD64 from\r
+;      http://www.microsoft.com/whdc/Devtools/wdk/default.mspx for low price)\r
 ;\r
 \r
 \r
@@ -71,6 +91,25 @@ save_r13        equ  rsp + 64 - LocalVarsSize
 ;save_r15        equ  rsp + 80 - LocalVarsSize\r
 \r
 \r
+; summary of register usage\r
+; scanend     ebx\r
+; scanendw    bx\r
+; chainlenwmask   edx\r
+; curmatch    rsi\r
+; curmatchd   esi\r
+; windowbestlen   r8\r
+; scanalign   r9\r
+; scanalignd  r9d\r
+; window      r10\r
+; bestlen     r11\r
+; bestlend    r11d\r
+; scanstart   r12d\r
+; scanstartw  r12w\r
+; scan        r13\r
+; nicematch   r14d\r
+; limit       r15\r
+; limitd      r15d\r
+; prev        rcx\r
 \r
 ;  all the +4 offsets are due to the addition of pending_buf_size (in zlib\r
 ;  in the deflate_state structure since the asm code was first written\r
index 2263d7741b282cf226f7f44e1280f8997a37ff3a..e8af06fa023b734fb7548eb46c23c911553d7b1a 100644 (file)
@@ -130,7 +130,7 @@ unsigned start;         /* inflate()'s starting value for strm->avail_out */
     ar.beg = ar.out - (start - strm->avail_out);\r
     ar.end = ar.out + (strm->avail_out - PAD_AVAIL_OUT);\r
     ar.wsize = state->wsize;\r
-    ar.write = state->write;\r
+    ar.write = state->wnext;\r
     ar.window = state->window;\r
     ar.hold = state->hold;\r
     ar.bits = state->bits;\r
index c2ba03f5ba68d2983b3bff1f673ad3484285264c..60a8d89b71846c015795966dfaa3547711061cd1 100644 (file)
@@ -9,12 +9,16 @@
 ;   ml64.exe /Flinffasx64 /c /Zi inffasx64.asm\r
 ;   with Microsoft Macro Assembler (x64) for AMD64\r
 ;\r
-;   ml64.exe is given with Visual Studio 2005, Windows 2003 server DDK\r
+\r
+; This file compile with Microsoft Macro Assembler (x64) for AMD64\r
+;\r
+;   ml64.exe is given with Visual Studio 2005/2008/2010 and Windows WDK\r
 ;\r
-;   (you can get Windows 2003 server DDK with ml64 and cl.exe for AMD64 from\r
-;      http://www.microsoft.com/whdc/devtools/ddk/default.mspx for low price)\r
+;   (you can get Windows WDK with ml64 for AMD64 from\r
+;      http://www.microsoft.com/whdc/Devtools/wdk/default.mspx for low price)\r
 ;\r
 \r
+\r
 .code\r
 inffas8664fnc PROC\r
 \r
index 36962e100c1f40b8b95f992165b2583e9c92c511..e1b86bf68a9b263dadf1f3d70481006b8d7941cf 100644 (file)
@@ -1,2 +1,2 @@
-ml /coff /Zi /c /Flgvmat32.lst  gvmat32.asm\r
+ml /coff /Zi /c /Flmatch686.lst match686.asm\r
 ml /coff /Zi /c /Flinffas32.lst inffas32.asm\r
diff --git a/contrib/masmx86/gvmat32.asm b/contrib/masmx86/gvmat32.asm
deleted file mode 100644 (file)
index 8111616..0000000
+++ /dev/null
@@ -1,972 +0,0 @@
-; gvmat32.asm -- Asm portion of the optimized longest_match for 32 bits x86\r
-; Copyright (C) 1995-1996 Jean-loup Gailly and Gilles Vollant.\r
-; File written by Gilles Vollant, by modifiying the longest_match\r
-;  from Jean-loup Gailly in deflate.c\r
-;\r
-;         http://www.zlib.net\r
-;         http://www.winimage.com/zLibDll\r
-;         http://www.muppetlabs.com/~breadbox/software/assembly.html\r
-;\r
-; For Visual C++ 4.x and higher and ML 6.x and higher\r
-;   ml.exe is in directory \MASM611C of Win95 DDK\r
-;   ml.exe is also distributed in http://www.masm32.com/masmdl.htm\r
-;    and in VC++2003 toolkit at http://msdn.microsoft.com/visualc/vctoolkit2003/\r
-;\r
-; this file contain two implementation of longest_match\r
-;\r
-;  longest_match_7fff : written 1996 by Gilles Vollant optimized for\r
-;            first Pentium. Assume s->w_mask == 0x7fff\r
-;  longest_match_686 : written by Brian raiter (1998), optimized for Pentium Pro\r
-;\r
-;  for using an seembly version of longest_match, you need define ASMV in project\r
-;  There is two way in using gvmat32.asm\r
-;\r
-;  A) Suggested method\r
-;    if you want include both longest_match_7fff and longest_match_686\r
-;    compile the asm file running\r
-;           ml /coff /Zi /Flgvmat32.lst /c gvmat32.asm\r
-;    and include gvmat32c.c in your project\r
-;    if you have an old cpu (386,486 or first Pentium) and s->w_mask==0x7fff,\r
-;        longest_match_7fff will be used\r
-;    if you have a more modern CPU (Pentium Pro, II and higher)\r
-;        longest_match_686 will be used\r
-;    on old cpu with s->w_mask!=0x7fff, longest_match_686 will be used,\r
-;        but this is not a sitation you'll find often\r
-;\r
-;  B) Alternative\r
-;    if you are not interresed in old cpu performance and want the smaller\r
-;       binaries possible\r
-;\r
-;    compile the asm file running\r
-;           ml /coff /Zi /c /Flgvmat32.lst /DNOOLDPENTIUMCODE gvmat32.asm\r
-;    and do not include gvmat32c.c in your project (ou define also\r
-;              NOOLDPENTIUMCODE)\r
-;\r
-; note : as I known, longest_match_686 is very faster than longest_match_7fff\r
-;        on pentium Pro/II/III, faster (but less) in P4, but it seem\r
-;        longest_match_7fff can be faster (very very litte) on AMD Athlon64/K8\r
-;\r
-; see below : zlib1222add must be adjuster if you use a zlib version < 1.2.2.2\r
-\r
-;uInt longest_match_7fff(s, cur_match)\r
-;    deflate_state *s;\r
-;    IPos cur_match;                             /* current match */\r
-\r
-    NbStack         equ     76\r
-    cur_match       equ     dword ptr[esp+NbStack-0]\r
-    str_s           equ     dword ptr[esp+NbStack-4]\r
-; 5 dword on top (ret,ebp,esi,edi,ebx)\r
-    adrret          equ     dword ptr[esp+NbStack-8]\r
-    pushebp         equ     dword ptr[esp+NbStack-12]\r
-    pushedi         equ     dword ptr[esp+NbStack-16]\r
-    pushesi         equ     dword ptr[esp+NbStack-20]\r
-    pushebx         equ     dword ptr[esp+NbStack-24]\r
-\r
-    chain_length    equ     dword ptr [esp+NbStack-28]\r
-    limit           equ     dword ptr [esp+NbStack-32]\r
-    best_len        equ     dword ptr [esp+NbStack-36]\r
-    window          equ     dword ptr [esp+NbStack-40]\r
-    prev            equ     dword ptr [esp+NbStack-44]\r
-    scan_start      equ      word ptr [esp+NbStack-48]\r
-    wmask           equ     dword ptr [esp+NbStack-52]\r
-    match_start_ptr equ     dword ptr [esp+NbStack-56]\r
-    nice_match      equ     dword ptr [esp+NbStack-60]\r
-    scan            equ     dword ptr [esp+NbStack-64]\r
-\r
-    windowlen       equ     dword ptr [esp+NbStack-68]\r
-    match_start     equ     dword ptr [esp+NbStack-72]\r
-    strend          equ     dword ptr [esp+NbStack-76]\r
-    NbStackAdd      equ     (NbStack-24)\r
-\r
-    .386p\r
-\r
-    name    gvmatch\r
-    .MODEL  FLAT\r
-\r
-\r
-\r
-;  all the +zlib1222add offsets are due to the addition of fields\r
-;  in zlib in the deflate_state structure since the asm code was first written\r
-;  (if you compile with zlib 1.0.4 or older, use "zlib1222add equ (-4)").\r
-;  (if you compile with zlib between 1.0.5 and 1.2.2.1, use "zlib1222add equ 0").\r
-;  if you compile with zlib 1.2.2.2 or later , use "zlib1222add equ 8").\r
-\r
-    zlib1222add         equ     8\r
-\r
-;  Note : these value are good with a 8 bytes boundary pack structure\r
-    dep_chain_length    equ     74h+zlib1222add\r
-    dep_window          equ     30h+zlib1222add\r
-    dep_strstart        equ     64h+zlib1222add\r
-    dep_prev_length     equ     70h+zlib1222add\r
-    dep_nice_match      equ     88h+zlib1222add\r
-    dep_w_size          equ     24h+zlib1222add\r
-    dep_prev            equ     38h+zlib1222add\r
-    dep_w_mask          equ     2ch+zlib1222add\r
-    dep_good_match      equ     84h+zlib1222add\r
-    dep_match_start     equ     68h+zlib1222add\r
-    dep_lookahead       equ     6ch+zlib1222add\r
-\r
-\r
-_TEXT                   segment\r
-\r
-IFDEF NOUNDERLINE\r
-   IFDEF NOOLDPENTIUMCODE\r
-            public  longest_match\r
-            public  match_init\r
-   ELSE\r
-            public  longest_match_7fff\r
-            public  cpudetect32\r
-            public  longest_match_686\r
-   ENDIF\r
-ELSE\r
-   IFDEF NOOLDPENTIUMCODE\r
-            public  _longest_match\r
-            public  _match_init\r
-   ELSE\r
-            public  _longest_match_7fff\r
-            public  _cpudetect32\r
-            public  _longest_match_686\r
-   ENDIF\r
-ENDIF\r
-\r
-    MAX_MATCH           equ     258\r
-    MIN_MATCH           equ     3\r
-    MIN_LOOKAHEAD       equ     (MAX_MATCH+MIN_MATCH+1)\r
-\r
-\r
-\r
-IFNDEF NOOLDPENTIUMCODE\r
-IFDEF NOUNDERLINE\r
-longest_match_7fff   proc near\r
-ELSE\r
-_longest_match_7fff  proc near\r
-ENDIF\r
-\r
-    mov     edx,[esp+4]\r
-\r
-\r
-\r
-    push    ebp\r
-    push    edi\r
-    push    esi\r
-    push    ebx\r
-\r
-    sub     esp,NbStackAdd\r
-\r
-; initialize or check the variables used in match.asm.\r
-    mov     ebp,edx\r
-\r
-; chain_length = s->max_chain_length\r
-; if (prev_length>=good_match) chain_length >>= 2\r
-    mov     edx,[ebp+dep_chain_length]\r
-    mov     ebx,[ebp+dep_prev_length]\r
-    cmp     [ebp+dep_good_match],ebx\r
-    ja      noshr\r
-    shr     edx,2\r
-noshr:\r
-; we increment chain_length because in the asm, the --chain_lenght is in the beginning of the loop\r
-    inc     edx\r
-    mov     edi,[ebp+dep_nice_match]\r
-    mov     chain_length,edx\r
-    mov     eax,[ebp+dep_lookahead]\r
-    cmp     eax,edi\r
-; if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead;\r
-    jae     nolookaheadnicematch\r
-    mov     edi,eax\r
-nolookaheadnicematch:\r
-; best_len = s->prev_length\r
-    mov     best_len,ebx\r
-\r
-; window = s->window\r
-    mov     esi,[ebp+dep_window]\r
-    mov     ecx,[ebp+dep_strstart]\r
-    mov     window,esi\r
-\r
-    mov     nice_match,edi\r
-; scan = window + strstart\r
-    add     esi,ecx\r
-    mov     scan,esi\r
-; dx = *window\r
-    mov     dx,word ptr [esi]\r
-; bx = *(window+best_len-1)\r
-    mov     bx,word ptr [esi+ebx-1]\r
-    add     esi,MAX_MATCH-1\r
-; scan_start = *scan\r
-    mov     scan_start,dx\r
-; strend = scan + MAX_MATCH-1\r
-    mov     strend,esi\r
-; bx = scan_end = *(window+best_len-1)\r
-\r
-;    IPos limit = s->strstart > (IPos)MAX_DIST(s) ?\r
-;        s->strstart - (IPos)MAX_DIST(s) : NIL;\r
-\r
-    mov     esi,[ebp+dep_w_size]\r
-    sub     esi,MIN_LOOKAHEAD\r
-; here esi = MAX_DIST(s)\r
-    sub     ecx,esi\r
-    ja      nodist\r
-    xor     ecx,ecx\r
-nodist:\r
-    mov     limit,ecx\r
-\r
-; prev = s->prev\r
-    mov     edx,[ebp+dep_prev]\r
-    mov     prev,edx\r
-\r
-;\r
-    mov     edx,dword ptr [ebp+dep_match_start]\r
-    mov     bp,scan_start\r
-    mov     eax,cur_match\r
-    mov     match_start,edx\r
-\r
-    mov     edx,window\r
-    mov     edi,edx\r
-    add     edi,best_len\r
-    mov     esi,prev\r
-    dec     edi\r
-; windowlen = window + best_len -1\r
-    mov     windowlen,edi\r
-\r
-    jmp     beginloop2\r
-    align   4\r
-\r
-; here, in the loop\r
-;       eax = ax = cur_match\r
-;       ecx = limit\r
-;        bx = scan_end\r
-;        bp = scan_start\r
-;       edi = windowlen (window + best_len -1)\r
-;       esi = prev\r
-\r
-\r
-;// here; chain_length <=16\r
-normalbeg0add16:\r
-    add     chain_length,16\r
-    jz      exitloop\r
-normalbeg0:\r
-    cmp     word ptr[edi+eax],bx\r
-    je      normalbeg2noroll\r
-rcontlabnoroll:\r
-; cur_match = prev[cur_match & wmask]\r
-    and     eax,7fffh\r
-    mov     ax,word ptr[esi+eax*2]\r
-; if cur_match > limit, go to exitloop\r
-    cmp     ecx,eax\r
-    jnb     exitloop\r
-; if --chain_length != 0, go to exitloop\r
-    dec     chain_length\r
-    jnz     normalbeg0\r
-    jmp     exitloop\r
-\r
-normalbeg2noroll:\r
-; if (scan_start==*(cur_match+window)) goto normalbeg2\r
-    cmp     bp,word ptr[edx+eax]\r
-    jne     rcontlabnoroll\r
-    jmp     normalbeg2\r
-\r
-contloop3:\r
-    mov     edi,windowlen\r
-\r
-; cur_match = prev[cur_match & wmask]\r
-    and     eax,7fffh\r
-    mov     ax,word ptr[esi+eax*2]\r
-; if cur_match > limit, go to exitloop\r
-    cmp     ecx,eax\r
-jnbexitloopshort1:\r
-    jnb     exitloop\r
-; if --chain_length != 0, go to exitloop\r
-\r
-\r
-; begin the main loop\r
-beginloop2:\r
-    sub     chain_length,16+1\r
-; if chain_length <=16, don't use the unrolled loop\r
-    jna     normalbeg0add16\r
-\r
-do16:\r
-    cmp     word ptr[edi+eax],bx\r
-    je      normalbeg2dc0\r
-\r
-maccn   MACRO   lab\r
-    and     eax,7fffh\r
-    mov     ax,word ptr[esi+eax*2]\r
-    cmp     ecx,eax\r
-    jnb     exitloop\r
-    cmp     word ptr[edi+eax],bx\r
-    je      lab\r
-    ENDM\r
-\r
-rcontloop0:\r
-    maccn   normalbeg2dc1\r
-\r
-rcontloop1:\r
-    maccn   normalbeg2dc2\r
-\r
-rcontloop2:\r
-    maccn   normalbeg2dc3\r
-\r
-rcontloop3:\r
-    maccn   normalbeg2dc4\r
-\r
-rcontloop4:\r
-    maccn   normalbeg2dc5\r
-\r
-rcontloop5:\r
-    maccn   normalbeg2dc6\r
-\r
-rcontloop6:\r
-    maccn   normalbeg2dc7\r
-\r
-rcontloop7:\r
-    maccn   normalbeg2dc8\r
-\r
-rcontloop8:\r
-    maccn   normalbeg2dc9\r
-\r
-rcontloop9:\r
-    maccn   normalbeg2dc10\r
-\r
-rcontloop10:\r
-    maccn   short normalbeg2dc11\r
-\r
-rcontloop11:\r
-    maccn   short normalbeg2dc12\r
-\r
-rcontloop12:\r
-    maccn   short normalbeg2dc13\r
-\r
-rcontloop13:\r
-    maccn   short normalbeg2dc14\r
-\r
-rcontloop14:\r
-    maccn   short normalbeg2dc15\r
-\r
-rcontloop15:\r
-    and     eax,7fffh\r
-    mov     ax,word ptr[esi+eax*2]\r
-    cmp     ecx,eax\r
-    jnb     exitloop\r
-\r
-    sub     chain_length,16\r
-    ja      do16\r
-    jmp     normalbeg0add16\r
-\r
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\r
-\r
-normbeg MACRO   rcontlab,valsub\r
-; if we are here, we know that *(match+best_len-1) == scan_end\r
-    cmp     bp,word ptr[edx+eax]\r
-; if (match != scan_start) goto rcontlab\r
-    jne     rcontlab\r
-; calculate the good chain_length, and we'll compare scan and match string\r
-    add     chain_length,16-valsub\r
-    jmp     iseq\r
-    ENDM\r
-\r
-\r
-normalbeg2dc11:\r
-    normbeg rcontloop11,11\r
-\r
-normalbeg2dc12:\r
-    normbeg short rcontloop12,12\r
-\r
-normalbeg2dc13:\r
-    normbeg short rcontloop13,13\r
-\r
-normalbeg2dc14:\r
-    normbeg short rcontloop14,14\r
-\r
-normalbeg2dc15:\r
-    normbeg short rcontloop15,15\r
-\r
-normalbeg2dc10:\r
-    normbeg rcontloop10,10\r
-\r
-normalbeg2dc9:\r
-    normbeg rcontloop9,9\r
-\r
-normalbeg2dc8:\r
-    normbeg rcontloop8,8\r
-\r
-normalbeg2dc7:\r
-    normbeg rcontloop7,7\r
-\r
-normalbeg2dc6:\r
-    normbeg rcontloop6,6\r
-\r
-normalbeg2dc5:\r
-    normbeg rcontloop5,5\r
-\r
-normalbeg2dc4:\r
-    normbeg rcontloop4,4\r
-\r
-normalbeg2dc3:\r
-    normbeg rcontloop3,3\r
-\r
-normalbeg2dc2:\r
-    normbeg rcontloop2,2\r
-\r
-normalbeg2dc1:\r
-    normbeg rcontloop1,1\r
-\r
-normalbeg2dc0:\r
-    normbeg rcontloop0,0\r
-\r
-\r
-; we go in normalbeg2 because *(ushf*)(match+best_len-1) == scan_end\r
-\r
-normalbeg2:\r
-    mov     edi,window\r
-\r
-    cmp     bp,word ptr[edi+eax]\r
-    jne     contloop3                   ; if *(ushf*)match != scan_start, continue\r
-\r
-iseq:\r
-; if we are here, we know that *(match+best_len-1) == scan_end\r
-; and (match == scan_start)\r
-\r
-    mov     edi,edx\r
-    mov     esi,scan                    ; esi = scan\r
-    add     edi,eax                     ; edi = window + cur_match = match\r
-\r
-    mov     edx,[esi+3]                 ; compare manually dword at match+3\r
-    xor     edx,[edi+3]                 ; and scan +3\r
-\r
-    jz      begincompare                ; if equal, go to long compare\r
-\r
-; we will determine the unmatch byte and calculate len (in esi)\r
-    or      dl,dl\r
-    je      eq1rr\r
-    mov     esi,3\r
-    jmp     trfinval\r
-eq1rr:\r
-    or      dx,dx\r
-    je      eq1\r
-\r
-    mov     esi,4\r
-    jmp     trfinval\r
-eq1:\r
-    and     edx,0ffffffh\r
-    jz      eq11\r
-    mov     esi,5\r
-    jmp     trfinval\r
-eq11:\r
-    mov     esi,6\r
-    jmp     trfinval\r
-\r
-begincompare:\r
-    ; here we now scan and match begin same\r
-    add     edi,6\r
-    add     esi,6\r
-    mov     ecx,(MAX_MATCH-(2+4))/4     ; scan for at most MAX_MATCH bytes\r
-    repe    cmpsd                       ; loop until mismatch\r
-\r
-    je      trfin                       ; go to trfin if not unmatch\r
-; we determine the unmatch byte\r
-    sub     esi,4\r
-    mov     edx,[edi-4]\r
-    xor     edx,[esi]\r
-\r
-    or      dl,dl\r
-    jnz     trfin\r
-    inc     esi\r
-\r
-    or      dx,dx\r
-    jnz     trfin\r
-    inc     esi\r
-\r
-    and     edx,0ffffffh\r
-    jnz     trfin\r
-    inc     esi\r
-\r
-trfin:\r
-    sub     esi,scan          ; esi = len\r
-trfinval:\r
-; here we have finised compare, and esi contain len of equal string\r
-    cmp     esi,best_len        ; if len > best_len, go newbestlen\r
-    ja      short newbestlen\r
-; now we restore edx, ecx and esi, for the big loop\r
-    mov     esi,prev\r
-    mov     ecx,limit\r
-    mov     edx,window\r
-    jmp     contloop3\r
-\r
-newbestlen:\r
-    mov     best_len,esi        ; len become best_len\r
-\r
-    mov     match_start,eax     ; save new position as match_start\r
-    cmp     esi,nice_match      ; if best_len >= nice_match, exit\r
-    jae     exitloop\r
-    mov     ecx,scan\r
-    mov     edx,window          ; restore edx=window\r
-    add     ecx,esi\r
-    add     esi,edx\r
-\r
-    dec     esi\r
-    mov     windowlen,esi       ; windowlen = window + best_len-1\r
-    mov     bx,[ecx-1]          ; bx = *(scan+best_len-1) = scan_end\r
-\r
-; now we restore ecx and esi, for the big loop :\r
-    mov     esi,prev\r
-    mov     ecx,limit\r
-    jmp     contloop3\r
-\r
-exitloop:\r
-; exit : s->match_start=match_start\r
-    mov     ebx,match_start\r
-    mov     ebp,str_s\r
-    mov     ecx,best_len\r
-    mov     dword ptr [ebp+dep_match_start],ebx\r
-    mov     eax,dword ptr [ebp+dep_lookahead]\r
-    cmp     ecx,eax\r
-    ja      minexlo\r
-    mov     eax,ecx\r
-minexlo:\r
-; return min(best_len,s->lookahead)\r
-\r
-; restore stack and register ebx,esi,edi,ebp\r
-    add     esp,NbStackAdd\r
-\r
-    pop     ebx\r
-    pop     esi\r
-    pop     edi\r
-    pop     ebp\r
-    ret\r
-InfoAuthor:\r
-; please don't remove this string !\r
-; Your are free use gvmat32 in any fre or commercial apps if you don't remove the string in the binary!\r
-    db     0dh,0ah,"GVMat32 optimised assembly code written 1996-98 by Gilles Vollant",0dh,0ah\r
-\r
-\r
-\r
-IFDEF NOUNDERLINE\r
-longest_match_7fff   endp\r
-ELSE\r
-_longest_match_7fff  endp\r
-ENDIF\r
-\r
-\r
-IFDEF NOUNDERLINE\r
-cpudetect32     proc near\r
-ELSE\r
-_cpudetect32    proc near\r
-ENDIF\r
-\r
-    push    ebx\r
-\r
-    pushfd                  ; push original EFLAGS\r
-    pop     eax             ; get original EFLAGS\r
-    mov     ecx, eax        ; save original EFLAGS\r
-    xor     eax, 40000h     ; flip AC bit in EFLAGS\r
-    push    eax             ; save new EFLAGS value on stack\r
-    popfd                   ; replace current EFLAGS value\r
-    pushfd                  ; get new EFLAGS\r
-    pop     eax             ; store new EFLAGS in EAX\r
-    xor     eax, ecx        ; can\92t toggle AC bit, processor=80386\r
-    jz      end_cpu_is_386  ; jump if 80386 processor\r
-    push    ecx\r
-    popfd                   ; restore AC bit in EFLAGS first\r
-\r
-    pushfd\r
-    pushfd\r
-    pop     ecx\r
-\r
-    mov     eax, ecx        ; get original EFLAGS\r
-    xor     eax, 200000h    ; flip ID bit in EFLAGS\r
-    push    eax             ; save new EFLAGS value on stack\r
-    popfd                   ; replace current EFLAGS value\r
-    pushfd                  ; get new EFLAGS\r
-    pop     eax             ; store new EFLAGS in EAX\r
-    popfd                   ; restore original EFLAGS\r
-    xor     eax, ecx        ; can\92t toggle ID bit,\r
-    je      is_old_486      ; processor=old\r
-\r
-    mov     eax,1\r
-    db      0fh,0a2h        ;CPUID\r
-\r
-exitcpudetect:\r
-    pop ebx\r
-    ret\r
-\r
-end_cpu_is_386:\r
-    mov     eax,0300h\r
-    jmp     exitcpudetect\r
-\r
-is_old_486:\r
-    mov     eax,0400h\r
-    jmp     exitcpudetect\r
-\r
-IFDEF NOUNDERLINE\r
-cpudetect32     endp\r
-ELSE\r
-_cpudetect32    endp\r
-ENDIF\r
-ENDIF\r
-\r
-MAX_MATCH       equ     258\r
-MIN_MATCH       equ     3\r
-MIN_LOOKAHEAD   equ     (MAX_MATCH + MIN_MATCH + 1)\r
-MAX_MATCH_8_     equ     ((MAX_MATCH + 7) AND 0FFF0h)\r
-\r
-\r
-;;; stack frame offsets\r
-\r
-chainlenwmask   equ  esp + 0    ; high word: current chain len\r
-                    ; low word: s->wmask\r
-window      equ  esp + 4    ; local copy of s->window\r
-windowbestlen   equ  esp + 8    ; s->window + bestlen\r
-scanstart   equ  esp + 16   ; first two bytes of string\r
-scanend     equ  esp + 12   ; last two bytes of string\r
-scanalign   equ  esp + 20   ; dword-misalignment of string\r
-nicematch   equ  esp + 24   ; a good enough match size\r
-bestlen     equ  esp + 28   ; size of best match so far\r
-scan        equ  esp + 32   ; ptr to string wanting match\r
-\r
-LocalVarsSize   equ 36\r
-;   saved ebx   byte esp + 36\r
-;   saved edi   byte esp + 40\r
-;   saved esi   byte esp + 44\r
-;   saved ebp   byte esp + 48\r
-;   return address  byte esp + 52\r
-deflatestate    equ  esp + 56   ; the function arguments\r
-curmatch    equ  esp + 60\r
-\r
-;;; Offsets for fields in the deflate_state structure. These numbers\r
-;;; are calculated from the definition of deflate_state, with the\r
-;;; assumption that the compiler will dword-align the fields. (Thus,\r
-;;; changing the definition of deflate_state could easily cause this\r
-;;; program to crash horribly, without so much as a warning at\r
-;;; compile time. Sigh.)\r
-\r
-dsWSize     equ 36+zlib1222add\r
-dsWMask     equ 44+zlib1222add\r
-dsWindow    equ 48+zlib1222add\r
-dsPrev      equ 56+zlib1222add\r
-dsMatchLen  equ 88+zlib1222add\r
-dsPrevMatch equ 92+zlib1222add\r
-dsStrStart  equ 100+zlib1222add\r
-dsMatchStart    equ 104+zlib1222add\r
-dsLookahead equ 108+zlib1222add\r
-dsPrevLen   equ 112+zlib1222add\r
-dsMaxChainLen   equ 116+zlib1222add\r
-dsGoodMatch equ 132+zlib1222add\r
-dsNiceMatch equ 136+zlib1222add\r
-\r
-\r
-;;; match.asm -- Pentium-Pro-optimized version of longest_match()\r
-;;; Written for zlib 1.1.2\r
-;;; Copyright (C) 1998 Brian Raiter <breadbox@muppetlabs.com>\r
-;;; You can look at http://www.muppetlabs.com/~breadbox/software/assembly.html\r
-;;;\r
-;;; This is free software; you can redistribute it and/or modify it\r
-;;; under the terms of the GNU General Public License.\r
-\r
-;GLOBAL _longest_match, _match_init\r
-\r
-\r
-;SECTION    .text\r
-\r
-;;; uInt longest_match(deflate_state *deflatestate, IPos curmatch)\r
-\r
-;_longest_match:\r
-IFDEF NOOLDPENTIUMCODE\r
-    IFDEF NOUNDERLINE\r
-    longest_match       proc near\r
-    ELSE\r
-    _longest_match      proc near\r
-    ENDIF\r
-ELSE\r
-    IFDEF NOUNDERLINE\r
-    longest_match_686   proc near\r
-    ELSE\r
-    _longest_match_686  proc near\r
-    ENDIF\r
-ENDIF\r
-\r
-;;; Save registers that the compiler may be using, and adjust esp to\r
-;;; make room for our stack frame.\r
-\r
-        push    ebp\r
-        push    edi\r
-        push    esi\r
-        push    ebx\r
-        sub esp, LocalVarsSize\r
-\r
-;;; Retrieve the function arguments. ecx will hold cur_match\r
-;;; throughout the entire function. edx will hold the pointer to the\r
-;;; deflate_state structure during the function's setup (before\r
-;;; entering the main loop.\r
-\r
-        mov edx, [deflatestate]\r
-        mov ecx, [curmatch]\r
-\r
-;;; uInt wmask = s->w_mask;\r
-;;; unsigned chain_length = s->max_chain_length;\r
-;;; if (s->prev_length >= s->good_match) {\r
-;;;     chain_length >>= 2;\r
-;;; }\r
-\r
-        mov eax, [edx + dsPrevLen]\r
-        mov ebx, [edx + dsGoodMatch]\r
-        cmp eax, ebx\r
-        mov eax, [edx + dsWMask]\r
-        mov ebx, [edx + dsMaxChainLen]\r
-        jl  LastMatchGood\r
-        shr ebx, 2\r
-LastMatchGood:\r
-\r
-;;; chainlen is decremented once beforehand so that the function can\r
-;;; use the sign flag instead of the zero flag for the exit test.\r
-;;; It is then shifted into the high word, to make room for the wmask\r
-;;; value, which it will always accompany.\r
-\r
-        dec ebx\r
-        shl ebx, 16\r
-        or  ebx, eax\r
-        mov [chainlenwmask], ebx\r
-\r
-;;; if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead;\r
-\r
-        mov eax, [edx + dsNiceMatch]\r
-        mov ebx, [edx + dsLookahead]\r
-        cmp ebx, eax\r
-        jl  LookaheadLess\r
-        mov ebx, eax\r
-LookaheadLess:  mov [nicematch], ebx\r
-\r
-;;; register Bytef *scan = s->window + s->strstart;\r
-\r
-        mov esi, [edx + dsWindow]\r
-        mov [window], esi\r
-        mov ebp, [edx + dsStrStart]\r
-        lea edi, [esi + ebp]\r
-        mov [scan], edi\r
-\r
-;;; Determine how many bytes the scan ptr is off from being\r
-;;; dword-aligned.\r
-\r
-        mov eax, edi\r
-        neg eax\r
-        and eax, 3\r
-        mov [scanalign], eax\r
-\r
-;;; IPos limit = s->strstart > (IPos)MAX_DIST(s) ?\r
-;;;     s->strstart - (IPos)MAX_DIST(s) : NIL;\r
-\r
-        mov eax, [edx + dsWSize]\r
-        sub eax, MIN_LOOKAHEAD\r
-        sub ebp, eax\r
-        jg  LimitPositive\r
-        xor ebp, ebp\r
-LimitPositive:\r
-\r
-;;; int best_len = s->prev_length;\r
-\r
-        mov eax, [edx + dsPrevLen]\r
-        mov [bestlen], eax\r
-\r
-;;; Store the sum of s->window + best_len in esi locally, and in esi.\r
-\r
-        add esi, eax\r
-        mov [windowbestlen], esi\r
-\r
-;;; register ush scan_start = *(ushf*)scan;\r
-;;; register ush scan_end   = *(ushf*)(scan+best_len-1);\r
-;;; Posf *prev = s->prev;\r
-\r
-        movzx   ebx, word ptr [edi]\r
-        mov [scanstart], ebx\r
-        movzx   ebx, word ptr [edi + eax - 1]\r
-        mov [scanend], ebx\r
-        mov edi, [edx + dsPrev]\r
-\r
-;;; Jump into the main loop.\r
-\r
-        mov edx, [chainlenwmask]\r
-        jmp short LoopEntry\r
-\r
-align 4\r
-\r
-;;; do {\r
-;;;     match = s->window + cur_match;\r
-;;;     if (*(ushf*)(match+best_len-1) != scan_end ||\r
-;;;         *(ushf*)match != scan_start) continue;\r
-;;;     [...]\r
-;;; } while ((cur_match = prev[cur_match & wmask]) > limit\r
-;;;          && --chain_length != 0);\r
-;;;\r
-;;; Here is the inner loop of the function. The function will spend the\r
-;;; majority of its time in this loop, and majority of that time will\r
-;;; be spent in the first ten instructions.\r
-;;;\r
-;;; Within this loop:\r
-;;; ebx = scanend\r
-;;; ecx = curmatch\r
-;;; edx = chainlenwmask - i.e., ((chainlen << 16) | wmask)\r
-;;; esi = windowbestlen - i.e., (window + bestlen)\r
-;;; edi = prev\r
-;;; ebp = limit\r
-\r
-LookupLoop:\r
-        and ecx, edx\r
-        movzx   ecx, word ptr [edi + ecx*2]\r
-        cmp ecx, ebp\r
-        jbe LeaveNow\r
-        sub edx, 00010000h\r
-        js  LeaveNow\r
-LoopEntry:  movzx   eax, word ptr [esi + ecx - 1]\r
-        cmp eax, ebx\r
-        jnz LookupLoop\r
-        mov eax, [window]\r
-        movzx   eax, word ptr [eax + ecx]\r
-        cmp eax, [scanstart]\r
-        jnz LookupLoop\r
-\r
-;;; Store the current value of chainlen.\r
-\r
-        mov [chainlenwmask], edx\r
-\r
-;;; Point edi to the string under scrutiny, and esi to the string we\r
-;;; are hoping to match it up with. In actuality, esi and edi are\r
-;;; both pointed (MAX_MATCH_8 - scanalign) bytes ahead, and edx is\r
-;;; initialized to -(MAX_MATCH_8 - scanalign).\r
-\r
-        mov esi, [window]\r
-        mov edi, [scan]\r
-        add esi, ecx\r
-        mov eax, [scanalign]\r
-        mov edx, 0fffffef8h; -(MAX_MATCH_8)\r
-        lea edi, [edi + eax + 0108h] ;MAX_MATCH_8]\r
-        lea esi, [esi + eax + 0108h] ;MAX_MATCH_8]\r
-\r
-;;; Test the strings for equality, 8 bytes at a time. At the end,\r
-;;; adjust edx so that it is offset to the exact byte that mismatched.\r
-;;;\r
-;;; We already know at this point that the first three bytes of the\r
-;;; strings match each other, and they can be safely passed over before\r
-;;; starting the compare loop. So what this code does is skip over 0-3\r
-;;; bytes, as much as necessary in order to dword-align the edi\r
-;;; pointer. (esi will still be misaligned three times out of four.)\r
-;;;\r
-;;; It should be confessed that this loop usually does not represent\r
-;;; much of the total running time. Replacing it with a more\r
-;;; straightforward "rep cmpsb" would not drastically degrade\r
-;;; performance.\r
-\r
-LoopCmps:\r
-        mov eax, [esi + edx]\r
-        xor eax, [edi + edx]\r
-        jnz LeaveLoopCmps\r
-        mov eax, [esi + edx + 4]\r
-        xor eax, [edi + edx + 4]\r
-        jnz LeaveLoopCmps4\r
-        add edx, 8\r
-        jnz LoopCmps\r
-        jmp short LenMaximum\r
-LeaveLoopCmps4: add edx, 4\r
-LeaveLoopCmps:  test    eax, 0000FFFFh\r
-        jnz LenLower\r
-        add edx,  2\r
-        shr eax, 16\r
-LenLower:   sub al, 1\r
-        adc edx, 0\r
-\r
-;;; Calculate the length of the match. If it is longer than MAX_MATCH,\r
-;;; then automatically accept it as the best possible match and leave.\r
-\r
-        lea eax, [edi + edx]\r
-        mov edi, [scan]\r
-        sub eax, edi\r
-        cmp eax, MAX_MATCH\r
-        jge LenMaximum\r
-\r
-;;; If the length of the match is not longer than the best match we\r
-;;; have so far, then forget it and return to the lookup loop.\r
-\r
-        mov edx, [deflatestate]\r
-        mov ebx, [bestlen]\r
-        cmp eax, ebx\r
-        jg  LongerMatch\r
-        mov esi, [windowbestlen]\r
-        mov edi, [edx + dsPrev]\r
-        mov ebx, [scanend]\r
-        mov edx, [chainlenwmask]\r
-        jmp LookupLoop\r
-\r
-;;;         s->match_start = cur_match;\r
-;;;         best_len = len;\r
-;;;         if (len >= nice_match) break;\r
-;;;         scan_end = *(ushf*)(scan+best_len-1);\r
-\r
-LongerMatch:    mov ebx, [nicematch]\r
-        mov [bestlen], eax\r
-        mov [edx + dsMatchStart], ecx\r
-        cmp eax, ebx\r
-        jge LeaveNow\r
-        mov esi, [window]\r
-        add esi, eax\r
-        mov [windowbestlen], esi\r
-        movzx   ebx, word ptr [edi + eax - 1]\r
-        mov edi, [edx + dsPrev]\r
-        mov [scanend], ebx\r
-        mov edx, [chainlenwmask]\r
-        jmp LookupLoop\r
-\r
-;;; Accept the current string, with the maximum possible length.\r
-\r
-LenMaximum: mov edx, [deflatestate]\r
-        mov dword ptr [bestlen], MAX_MATCH\r
-        mov [edx + dsMatchStart], ecx\r
-\r
-;;; if ((uInt)best_len <= s->lookahead) return (uInt)best_len;\r
-;;; return s->lookahead;\r
-\r
-LeaveNow:\r
-        mov edx, [deflatestate]\r
-        mov ebx, [bestlen]\r
-        mov eax, [edx + dsLookahead]\r
-        cmp ebx, eax\r
-        jg  LookaheadRet\r
-        mov eax, ebx\r
-LookaheadRet:\r
-\r
-;;; Restore the stack and return from whence we came.\r
-\r
-        add esp, LocalVarsSize\r
-        pop ebx\r
-        pop esi\r
-        pop edi\r
-        pop ebp\r
-\r
-        ret\r
-; please don't remove this string !\r
-; Your can freely use gvmat32 in any free or commercial app if you don't remove the string in the binary!\r
-    db     0dh,0ah,"asm686 with masm, optimised assembly code from Brian Raiter, written 1998",0dh,0ah\r
-\r
-\r
-IFDEF NOOLDPENTIUMCODE\r
-    IFDEF NOUNDERLINE\r
-    longest_match       endp\r
-    ELSE\r
-    _longest_match      endp\r
-    ENDIF\r
-\r
-    IFDEF NOUNDERLINE\r
-    match_init      proc near\r
-                    ret\r
-    match_init      endp\r
-    ELSE\r
-    _match_init     proc near\r
-                    ret\r
-    _match_init     endp\r
-    ENDIF\r
-ELSE\r
-    IFDEF NOUNDERLINE\r
-    longest_match_686   endp\r
-    ELSE\r
-    _longest_match_686  endp\r
-    ENDIF\r
-ENDIF\r
-\r
-_TEXT   ends\r
-end\r
diff --git a/contrib/masmx86/gvmat32c.c b/contrib/masmx86/gvmat32c.c
deleted file mode 100644 (file)
index 7ad2b27..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-/* gvmat32.c -- C portion of the optimized longest_match for 32 bits x86\r
- * Copyright (C) 1995-1996 Jean-loup Gailly and Gilles Vollant.\r
- * File written by Gilles Vollant, by modifiying the longest_match\r
- *  from Jean-loup Gailly in deflate.c\r
- *  it prepare all parameters and call the assembly longest_match_gvasm\r
- *  longest_match execute standard C code is wmask != 0x7fff\r
- *     (assembly code is faster with a fixed wmask)\r
- *\r
- * Read comment at beginning of gvmat32.asm for more information\r
- */\r
-\r
-#if defined(ASMV) && (!defined(NOOLDPENTIUMCODE))\r
-#include "deflate.h"\r
-\r
-/* if your C compiler don't add underline before function name,\r
-        define ADD_UNDERLINE_ASMFUNC */\r
-#ifdef ADD_UNDERLINE_ASMFUNC\r
-#define longest_match_7fff _longest_match_7fff\r
-#define longest_match_686  _longest_match_686\r
-#define cpudetect32        _cpudetect32\r
-#endif\r
-\r
-\r
-unsigned long cpudetect32();\r
-\r
-uInt longest_match_c(\r
-    deflate_state *s,\r
-    IPos cur_match);                             /* current match */\r
-\r
-\r
-uInt longest_match_7fff(\r
-    deflate_state *s,\r
-    IPos cur_match);                             /* current match */\r
-\r
-uInt longest_match_686(\r
-    deflate_state *s,\r
-    IPos cur_match);                             /* current match */\r
-\r
-\r
-static uInt iIsPPro=2;\r
-\r
-void match_init ()\r
-{\r
-    iIsPPro = (((cpudetect32()/0x100)&0xf)>=6) ? 1 : 0;\r
-}\r
-\r
-uInt longest_match(\r
-    deflate_state *s,\r
-    IPos cur_match)                             /* current match */\r
-{\r
-    if (iIsPPro!=0)\r
-        return longest_match_686(s,cur_match);\r
-\r
-    if (s->w_mask != 0x7fff)\r
-        return longest_match_686(s,cur_match);\r
-\r
-    /* now ((s->w_mask == 0x7fff) && (iIsPPro==0)) */\r
-        return longest_match_7fff(s,cur_match);\r
-}\r
-\r
-\r
-#endif /* defined(ASMV) && (!defined(NOOLDPENTIUMCODE)) */\r
diff --git a/contrib/masmx86/match686.asm b/contrib/masmx86/match686.asm
new file mode 100644 (file)
index 0000000..1eaf555
--- /dev/null
@@ -0,0 +1,478 @@
+; match686.asm -- Asm portion of the optimized longest_match for 32 bits x86\r
+; Copyright (C) 1995-1996 Jean-loup Gailly, Brian Raiter and Gilles Vollant.\r
+; File written by Gilles Vollant, by converting match686.S from Brian Raiter\r
+; for MASM. This is as assembly version of longest_match\r
+;  from Jean-loup Gailly in deflate.c\r
+;\r
+;         http://www.zlib.net\r
+;         http://www.winimage.com/zLibDll\r
+;         http://www.muppetlabs.com/~breadbox/software/assembly.html\r
+;\r
+; For Visual C++ 4.x and higher and ML 6.x and higher\r
+;   ml.exe is distributed in\r
+;  http://www.microsoft.com/downloads/details.aspx?FamilyID=7a1c9da0-0510-44a2-b042-7ef370530c64\r
+;\r
+; this file contain two implementation of longest_match\r
+;\r
+;  this longest_match was written by Brian raiter (1998), optimized for Pentium Pro\r
+;   (and the faster known version of match_init on modern Core 2 Duo and AMD Phenom)\r
+;\r
+;  for using an assembly version of longest_match, you need define ASMV in project\r
+;\r
+;    compile the asm file running\r
+;           ml /coff /Zi /c /Flmatch686.lst match686.asm\r
+;    and do not include match686.obj in your project\r
+;\r
+; note: contrib of zLib 1.2.3 and earlier contained both a deprecated version for\r
+;  Pentium (prior Pentium Pro) and this version for Pentium Pro and modern processor\r
+;  with autoselect (with cpu detection code)\r
+;  if you want support the old pentium optimization, you can still use these version\r
+;\r
+; this file is not optimized for old pentium, but it compatible with all x86 32 bits\r
+; processor (starting 80386)\r
+;\r
+;\r
+; see below : zlib1222add must be adjuster if you use a zlib version < 1.2.2.2\r
+\r
+;uInt longest_match(s, cur_match)\r
+;    deflate_state *s;\r
+;    IPos cur_match;                             /* current match */\r
+\r
+    NbStack         equ     76\r
+    cur_match       equ     dword ptr[esp+NbStack-0]\r
+    str_s           equ     dword ptr[esp+NbStack-4]\r
+; 5 dword on top (ret,ebp,esi,edi,ebx)\r
+    adrret          equ     dword ptr[esp+NbStack-8]\r
+    pushebp         equ     dword ptr[esp+NbStack-12]\r
+    pushedi         equ     dword ptr[esp+NbStack-16]\r
+    pushesi         equ     dword ptr[esp+NbStack-20]\r
+    pushebx         equ     dword ptr[esp+NbStack-24]\r
+\r
+    chain_length    equ     dword ptr [esp+NbStack-28]\r
+    limit           equ     dword ptr [esp+NbStack-32]\r
+    best_len        equ     dword ptr [esp+NbStack-36]\r
+    window          equ     dword ptr [esp+NbStack-40]\r
+    prev            equ     dword ptr [esp+NbStack-44]\r
+    scan_start      equ      word ptr [esp+NbStack-48]\r
+    wmask           equ     dword ptr [esp+NbStack-52]\r
+    match_start_ptr equ     dword ptr [esp+NbStack-56]\r
+    nice_match      equ     dword ptr [esp+NbStack-60]\r
+    scan            equ     dword ptr [esp+NbStack-64]\r
+\r
+    windowlen       equ     dword ptr [esp+NbStack-68]\r
+    match_start     equ     dword ptr [esp+NbStack-72]\r
+    strend          equ     dword ptr [esp+NbStack-76]\r
+    NbStackAdd      equ     (NbStack-24)\r
+\r
+    .386p\r
+\r
+    name    gvmatch\r
+    .MODEL  FLAT\r
+\r
+\r
+\r
+;  all the +zlib1222add offsets are due to the addition of fields\r
+;  in zlib in the deflate_state structure since the asm code was first written\r
+;  (if you compile with zlib 1.0.4 or older, use "zlib1222add equ (-4)").\r
+;  (if you compile with zlib between 1.0.5 and 1.2.2.1, use "zlib1222add equ 0").\r
+;  if you compile with zlib 1.2.2.2 or later , use "zlib1222add equ 8").\r
+\r
+    zlib1222add         equ     8\r
+\r
+;  Note : these value are good with a 8 bytes boundary pack structure\r
+    dep_chain_length    equ     74h+zlib1222add\r
+    dep_window          equ     30h+zlib1222add\r
+    dep_strstart        equ     64h+zlib1222add\r
+    dep_prev_length     equ     70h+zlib1222add\r
+    dep_nice_match      equ     88h+zlib1222add\r
+    dep_w_size          equ     24h+zlib1222add\r
+    dep_prev            equ     38h+zlib1222add\r
+    dep_w_mask          equ     2ch+zlib1222add\r
+    dep_good_match      equ     84h+zlib1222add\r
+    dep_match_start     equ     68h+zlib1222add\r
+    dep_lookahead       equ     6ch+zlib1222add\r
+\r
+\r
+_TEXT                   segment\r
+\r
+IFDEF NOUNDERLINE\r
+            public  longest_match\r
+            public  match_init\r
+ELSE\r
+            public  _longest_match\r
+            public  _match_init\r
+ENDIF\r
+\r
+    MAX_MATCH           equ     258\r
+    MIN_MATCH           equ     3\r
+    MIN_LOOKAHEAD       equ     (MAX_MATCH+MIN_MATCH+1)\r
+\r
+\r
+\r
+MAX_MATCH       equ     258\r
+MIN_MATCH       equ     3\r
+MIN_LOOKAHEAD   equ     (MAX_MATCH + MIN_MATCH + 1)\r
+MAX_MATCH_8_     equ     ((MAX_MATCH + 7) AND 0FFF0h)\r
+\r
+\r
+;;; stack frame offsets\r
+\r
+chainlenwmask   equ  esp + 0    ; high word: current chain len\r
+                    ; low word: s->wmask\r
+window      equ  esp + 4    ; local copy of s->window\r
+windowbestlen   equ  esp + 8    ; s->window + bestlen\r
+scanstart   equ  esp + 16   ; first two bytes of string\r
+scanend     equ  esp + 12   ; last two bytes of string\r
+scanalign   equ  esp + 20   ; dword-misalignment of string\r
+nicematch   equ  esp + 24   ; a good enough match size\r
+bestlen     equ  esp + 28   ; size of best match so far\r
+scan        equ  esp + 32   ; ptr to string wanting match\r
+\r
+LocalVarsSize   equ 36\r
+;   saved ebx   byte esp + 36\r
+;   saved edi   byte esp + 40\r
+;   saved esi   byte esp + 44\r
+;   saved ebp   byte esp + 48\r
+;   return address  byte esp + 52\r
+deflatestate    equ  esp + 56   ; the function arguments\r
+curmatch    equ  esp + 60\r
+\r
+;;; Offsets for fields in the deflate_state structure. These numbers\r
+;;; are calculated from the definition of deflate_state, with the\r
+;;; assumption that the compiler will dword-align the fields. (Thus,\r
+;;; changing the definition of deflate_state could easily cause this\r
+;;; program to crash horribly, without so much as a warning at\r
+;;; compile time. Sigh.)\r
+\r
+dsWSize     equ 36+zlib1222add\r
+dsWMask     equ 44+zlib1222add\r
+dsWindow    equ 48+zlib1222add\r
+dsPrev      equ 56+zlib1222add\r
+dsMatchLen  equ 88+zlib1222add\r
+dsPrevMatch equ 92+zlib1222add\r
+dsStrStart  equ 100+zlib1222add\r
+dsMatchStart    equ 104+zlib1222add\r
+dsLookahead equ 108+zlib1222add\r
+dsPrevLen   equ 112+zlib1222add\r
+dsMaxChainLen   equ 116+zlib1222add\r
+dsGoodMatch equ 132+zlib1222add\r
+dsNiceMatch equ 136+zlib1222add\r
+\r
+\r
+;;; match686.asm -- Pentium-Pro-optimized version of longest_match()\r
+;;; Written for zlib 1.1.2\r
+;;; Copyright (C) 1998 Brian Raiter <breadbox@muppetlabs.com>\r
+;;; You can look at http://www.muppetlabs.com/~breadbox/software/assembly.html\r
+;;;\r
+;;\r
+;;  This software is provided 'as-is', without any express or implied\r
+;;  warranty.  In no event will the authors be held liable for any damages\r
+;;  arising from the use of this software.\r
+;;\r
+;;  Permission is granted to anyone to use this software for any purpose,\r
+;;  including commercial applications, and to alter it and redistribute it\r
+;;  freely, subject to the following restrictions:\r
+;;\r
+;;  1. The origin of this software must not be misrepresented; you must not\r
+;;     claim that you wrote the original software. If you use this software\r
+;;     in a product, an acknowledgment in the product documentation would be\r
+;;     appreciated but is not required.\r
+;;  2. Altered source versions must be plainly marked as such, and must not be\r
+;;     misrepresented as being the original software\r
+;;  3. This notice may not be removed or altered from any source distribution.\r
+;;\r
+\r
+;GLOBAL _longest_match, _match_init\r
+\r
+\r
+;SECTION    .text\r
+\r
+;;; uInt longest_match(deflate_state *deflatestate, IPos curmatch)\r
+\r
+;_longest_match:\r
+    IFDEF NOUNDERLINE\r
+    longest_match       proc near\r
+    ELSE\r
+    _longest_match      proc near\r
+    ENDIF\r
+\r
+;;; Save registers that the compiler may be using, and adjust esp to\r
+;;; make room for our stack frame.\r
+\r
+        push    ebp\r
+        push    edi\r
+        push    esi\r
+        push    ebx\r
+        sub esp, LocalVarsSize\r
+\r
+;;; Retrieve the function arguments. ecx will hold cur_match\r
+;;; throughout the entire function. edx will hold the pointer to the\r
+;;; deflate_state structure during the function's setup (before\r
+;;; entering the main loop.\r
+\r
+        mov edx, [deflatestate]\r
+        mov ecx, [curmatch]\r
+\r
+;;; uInt wmask = s->w_mask;\r
+;;; unsigned chain_length = s->max_chain_length;\r
+;;; if (s->prev_length >= s->good_match) {\r
+;;;     chain_length >>= 2;\r
+;;; }\r
+\r
+        mov eax, [edx + dsPrevLen]\r
+        mov ebx, [edx + dsGoodMatch]\r
+        cmp eax, ebx\r
+        mov eax, [edx + dsWMask]\r
+        mov ebx, [edx + dsMaxChainLen]\r
+        jl  LastMatchGood\r
+        shr ebx, 2\r
+LastMatchGood:\r
+\r
+;;; chainlen is decremented once beforehand so that the function can\r
+;;; use the sign flag instead of the zero flag for the exit test.\r
+;;; It is then shifted into the high word, to make room for the wmask\r
+;;; value, which it will always accompany.\r
+\r
+        dec ebx\r
+        shl ebx, 16\r
+        or  ebx, eax\r
+        mov [chainlenwmask], ebx\r
+\r
+;;; if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead;\r
+\r
+        mov eax, [edx + dsNiceMatch]\r
+        mov ebx, [edx + dsLookahead]\r
+        cmp ebx, eax\r
+        jl  LookaheadLess\r
+        mov ebx, eax\r
+LookaheadLess:  mov [nicematch], ebx\r
+\r
+;;; register Bytef *scan = s->window + s->strstart;\r
+\r
+        mov esi, [edx + dsWindow]\r
+        mov [window], esi\r
+        mov ebp, [edx + dsStrStart]\r
+        lea edi, [esi + ebp]\r
+        mov [scan], edi\r
+\r
+;;; Determine how many bytes the scan ptr is off from being\r
+;;; dword-aligned.\r
+\r
+        mov eax, edi\r
+        neg eax\r
+        and eax, 3\r
+        mov [scanalign], eax\r
+\r
+;;; IPos limit = s->strstart > (IPos)MAX_DIST(s) ?\r
+;;;     s->strstart - (IPos)MAX_DIST(s) : NIL;\r
+\r
+        mov eax, [edx + dsWSize]\r
+        sub eax, MIN_LOOKAHEAD\r
+        sub ebp, eax\r
+        jg  LimitPositive\r
+        xor ebp, ebp\r
+LimitPositive:\r
+\r
+;;; int best_len = s->prev_length;\r
+\r
+        mov eax, [edx + dsPrevLen]\r
+        mov [bestlen], eax\r
+\r
+;;; Store the sum of s->window + best_len in esi locally, and in esi.\r
+\r
+        add esi, eax\r
+        mov [windowbestlen], esi\r
+\r
+;;; register ush scan_start = *(ushf*)scan;\r
+;;; register ush scan_end   = *(ushf*)(scan+best_len-1);\r
+;;; Posf *prev = s->prev;\r
+\r
+        movzx   ebx, word ptr [edi]\r
+        mov [scanstart], ebx\r
+        movzx   ebx, word ptr [edi + eax - 1]\r
+        mov [scanend], ebx\r
+        mov edi, [edx + dsPrev]\r
+\r
+;;; Jump into the main loop.\r
+\r
+        mov edx, [chainlenwmask]\r
+        jmp short LoopEntry\r
+\r
+align 4\r
+\r
+;;; do {\r
+;;;     match = s->window + cur_match;\r
+;;;     if (*(ushf*)(match+best_len-1) != scan_end ||\r
+;;;         *(ushf*)match != scan_start) continue;\r
+;;;     [...]\r
+;;; } while ((cur_match = prev[cur_match & wmask]) > limit\r
+;;;          && --chain_length != 0);\r
+;;;\r
+;;; Here is the inner loop of the function. The function will spend the\r
+;;; majority of its time in this loop, and majority of that time will\r
+;;; be spent in the first ten instructions.\r
+;;;\r
+;;; Within this loop:\r
+;;; ebx = scanend\r
+;;; ecx = curmatch\r
+;;; edx = chainlenwmask - i.e., ((chainlen << 16) | wmask)\r
+;;; esi = windowbestlen - i.e., (window + bestlen)\r
+;;; edi = prev\r
+;;; ebp = limit\r
+\r
+LookupLoop:\r
+        and ecx, edx\r
+        movzx   ecx, word ptr [edi + ecx*2]\r
+        cmp ecx, ebp\r
+        jbe LeaveNow\r
+        sub edx, 00010000h\r
+        js  LeaveNow\r
+LoopEntry:  movzx   eax, word ptr [esi + ecx - 1]\r
+        cmp eax, ebx\r
+        jnz LookupLoop\r
+        mov eax, [window]\r
+        movzx   eax, word ptr [eax + ecx]\r
+        cmp eax, [scanstart]\r
+        jnz LookupLoop\r
+\r
+;;; Store the current value of chainlen.\r
+\r
+        mov [chainlenwmask], edx\r
+\r
+;;; Point edi to the string under scrutiny, and esi to the string we\r
+;;; are hoping to match it up with. In actuality, esi and edi are\r
+;;; both pointed (MAX_MATCH_8 - scanalign) bytes ahead, and edx is\r
+;;; initialized to -(MAX_MATCH_8 - scanalign).\r
+\r
+        mov esi, [window]\r
+        mov edi, [scan]\r
+        add esi, ecx\r
+        mov eax, [scanalign]\r
+        mov edx, 0fffffef8h; -(MAX_MATCH_8)\r
+        lea edi, [edi + eax + 0108h] ;MAX_MATCH_8]\r
+        lea esi, [esi + eax + 0108h] ;MAX_MATCH_8]\r
+\r
+;;; Test the strings for equality, 8 bytes at a time. At the end,\r
+;;; adjust edx so that it is offset to the exact byte that mismatched.\r
+;;;\r
+;;; We already know at this point that the first three bytes of the\r
+;;; strings match each other, and they can be safely passed over before\r
+;;; starting the compare loop. So what this code does is skip over 0-3\r
+;;; bytes, as much as necessary in order to dword-align the edi\r
+;;; pointer. (esi will still be misaligned three times out of four.)\r
+;;;\r
+;;; It should be confessed that this loop usually does not represent\r
+;;; much of the total running time. Replacing it with a more\r
+;;; straightforward "rep cmpsb" would not drastically degrade\r
+;;; performance.\r
+\r
+LoopCmps:\r
+        mov eax, [esi + edx]\r
+        xor eax, [edi + edx]\r
+        jnz LeaveLoopCmps\r
+        mov eax, [esi + edx + 4]\r
+        xor eax, [edi + edx + 4]\r
+        jnz LeaveLoopCmps4\r
+        add edx, 8\r
+        jnz LoopCmps\r
+        jmp short LenMaximum\r
+LeaveLoopCmps4: add edx, 4\r
+LeaveLoopCmps:  test    eax, 0000FFFFh\r
+        jnz LenLower\r
+        add edx,  2\r
+        shr eax, 16\r
+LenLower:   sub al, 1\r
+        adc edx, 0\r
+\r
+;;; Calculate the length of the match. If it is longer than MAX_MATCH,\r
+;;; then automatically accept it as the best possible match and leave.\r
+\r
+        lea eax, [edi + edx]\r
+        mov edi, [scan]\r
+        sub eax, edi\r
+        cmp eax, MAX_MATCH\r
+        jge LenMaximum\r
+\r
+;;; If the length of the match is not longer than the best match we\r
+;;; have so far, then forget it and return to the lookup loop.\r
+\r
+        mov edx, [deflatestate]\r
+        mov ebx, [bestlen]\r
+        cmp eax, ebx\r
+        jg  LongerMatch\r
+        mov esi, [windowbestlen]\r
+        mov edi, [edx + dsPrev]\r
+        mov ebx, [scanend]\r
+        mov edx, [chainlenwmask]\r
+        jmp LookupLoop\r
+\r
+;;;         s->match_start = cur_match;\r
+;;;         best_len = len;\r
+;;;         if (len >= nice_match) break;\r
+;;;         scan_end = *(ushf*)(scan+best_len-1);\r
+\r
+LongerMatch:    mov ebx, [nicematch]\r
+        mov [bestlen], eax\r
+        mov [edx + dsMatchStart], ecx\r
+        cmp eax, ebx\r
+        jge LeaveNow\r
+        mov esi, [window]\r
+        add esi, eax\r
+        mov [windowbestlen], esi\r
+        movzx   ebx, word ptr [edi + eax - 1]\r
+        mov edi, [edx + dsPrev]\r
+        mov [scanend], ebx\r
+        mov edx, [chainlenwmask]\r
+        jmp LookupLoop\r
+\r
+;;; Accept the current string, with the maximum possible length.\r
+\r
+LenMaximum: mov edx, [deflatestate]\r
+        mov dword ptr [bestlen], MAX_MATCH\r
+        mov [edx + dsMatchStart], ecx\r
+\r
+;;; if ((uInt)best_len <= s->lookahead) return (uInt)best_len;\r
+;;; return s->lookahead;\r
+\r
+LeaveNow:\r
+        mov edx, [deflatestate]\r
+        mov ebx, [bestlen]\r
+        mov eax, [edx + dsLookahead]\r
+        cmp ebx, eax\r
+        jg  LookaheadRet\r
+        mov eax, ebx\r
+LookaheadRet:\r
+\r
+;;; Restore the stack and return from whence we came.\r
+\r
+        add esp, LocalVarsSize\r
+        pop ebx\r
+        pop esi\r
+        pop edi\r
+        pop ebp\r
+\r
+        ret\r
+; please don't remove this string !\r
+; Your can freely use match686 in any free or commercial app if you don't remove the string in the binary!\r
+    db     0dh,0ah,"asm686 with masm, optimised assembly code from Brian Raiter, written 1998",0dh,0ah\r
+\r
+\r
+    IFDEF NOUNDERLINE\r
+    longest_match       endp\r
+    ELSE\r
+    _longest_match      endp\r
+    ENDIF\r
+\r
+    IFDEF NOUNDERLINE\r
+    match_init      proc near\r
+                    ret\r
+    match_init      endp\r
+    ELSE\r
+    _match_init     proc near\r
+                    ret\r
+    _match_init     endp\r
+    ENDIF\r
+\r
+\r
+_TEXT   ends\r
+end\r
diff --git a/contrib/masmx86/match686.obj b/contrib/masmx86/match686.obj
new file mode 100644 (file)
index 0000000..2e4631f
Binary files /dev/null and b/contrib/masmx86/match686.obj differ
diff --git a/contrib/masmx86/mkasm.bat b/contrib/masmx86/mkasm.bat
deleted file mode 100755 (executable)
index 70a51f8..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-cl /DASMV /I..\.. /O2 /c gvmat32c.c\r
-ml /coff /Zi /c /Flgvmat32.lst gvmat32.asm\r
-ml /coff /Zi /c /Flinffas32.lst inffas32.asm\r
index 7b57167b71caa09d6a74833b40dc2a8fb2004cbc..413580ebcaa62814788ae49d1233d1e611c4d230 100644 (file)
@@ -14,8 +14,8 @@ appropriate makefile, as suggested below.
 Build instructions
 ------------------
 * With Microsoft C and MASM:
-nmake -f win32/Makefile.msc LOC="-DASMV -DASMINF" OBJA="gvmat32c.obj gvmat32.obj inffas32.obj"
+nmake -f win32/Makefile.msc LOC="-DASMV -DASMINF" OBJA="match686.obj inffas32.obj"
 
 * With Borland C and TASM:
-make -f win32/Makefile.bor LOCAL_ZLIB="-DASMV -DASMINF" OBJA="gvmat32c.obj gvmat32.obj inffas32.obj" OBJPA="+gvmat32c.obj+gvmat32.obj+inffas32.obj"
+make -f win32/Makefile.bor LOCAL_ZLIB="-DASMV -DASMINF" OBJA="match686.obj inffas32.obj" OBJPA="+match686c.obj+match686.obj+inffas32.obj"
 
index 836848c2b7ba9fb0585b409a085a461209a72152..dc7d37dae023ac3d190524c55123ec4959825cbf 100644 (file)
@@ -10,7 +10,7 @@ unit zlibpas;
 interface
 
 const
-  ZLIB_VERSION = '1.2.3';
+  ZLIB_VERSION = '1.2.4';
 
 type
   alloc_func = function(opaque: Pointer; items, size: Integer): Pointer;
index a7b7247871ac65db291f5470140d01ddeb1fa710..904888ba3931ff864067ab741dbee58e07827d54 100644 (file)
@@ -1,8 +1,8 @@
-Building instructions for the DLL versions of Zlib 1.2.3\r
+Building instructions for the DLL versions of Zlib 1.2.4\r
 ========================================================\r
 \r
 This directory contains projects that build zlib and minizip using\r
-Microsoft Visual C++ 7.0/7.1/8.0/9.0/10.0, and Visual C++ .\r
+Microsoft Visual C++ 9.0/10.0, and Visual C++ .\r
 \r
 You don't need to build these projects yourself. You can download the\r
 binaries from:\r
@@ -15,51 +15,17 @@ bld_ml64.bat in contrib\masmx64
 bld_ml32.bat in contrib\masmx86\r
 \r
 \r
-Build instructions for Visual Studio 7.x (32 bits)\r
---------------------------------------------------\r
-- Uncompress current zlib, including all contrib/* files\r
-- Download the crtdll library from\r
-    http://www.winimage.com/zLibDll/crtdll.zip\r
-  Unzip crtdll.zip to extract crtdll.lib on contrib\vstudio\vc7.\r
-- Open contrib\vstudio\vc7\zlibvc.sln with Microsoft Visual C++ 7.x\r
-  (Visual Studio .Net 2002 or 2003).\r
-\r
-Build instructions for Visual Studio 2005 (32 bits or 64 bits)\r
---------------------------------------------------------------\r
-- Uncompress current zlib, including all contrib/* files\r
-- For 32 bits only: download the crtdll library from\r
-    http://www.winimage.com/zLibDll/crtdll.zip\r
-  Unzip crtdll.zip to extract crtdll.lib on contrib\vstudio\vc8.\r
-- Open contrib\vstudio\vc8\zlibvc.sln with Microsoft Visual C++ 2005\r
-\r
-Build instructions for Visual Studio 2005 64 bits, PSDK compiler\r
-----------------------------------------------------------------\r
-at the time of writing this text file, Visual Studio 2005 (and\r
-  Microsoft Visual C++ 8.0) is on the beta 2 stage.\r
-Using you can get the free 64 bits compiler from Platform SDK,\r
-  which is NOT a beta, and compile using the Visual studio 2005 IDE\r
-see http://www.winimage.com/misc/sdk64onvs2005/ for instruction\r
-\r
-- Uncompress current zlib, including all contrib/* files\r
-- start Visual Studio 2005 from a platform SDK command prompt, using\r
-  the /useenv switch\r
-- Open contrib\vstudio\vc8\zlibvc.sln with Microsoft Visual C++ 2005\r
 \r
 \r
 Build instructions for Visual Studio 2008 (32 bits or 64 bits)\r
 --------------------------------------------------------------\r
 - Uncompress current zlib, including all contrib/* files\r
-- For 32 bits only: download the crtdll library from\r
-    http://www.winimage.com/zLibDll/crtdll.zip\r
-  Unzip crtdll.zip to extract crtdll.lib on contrib\vstudio\vc9.\r
 - Open contrib\vstudio\vc9\zlibvc.sln with Microsoft Visual C++ 2008.0\r
+- Or run: vcbuild /rebuild contrib\vstudio\vc9\zlibvc.sln "Release|Win32"\r
 \r
 Build instructions for Visual Studio 2010 (32 bits or 64 bits)\r
 --------------------------------------------------------------\r
 - Uncompress current zlib, including all contrib/* files\r
-- For 32 bits only: download the crtdll library from\r
-    http://www.winimage.com/zLibDll/crtdll.zip\r
-  Unzip crtdll.zip to extract crtdll.lib on contrib\vstudio\vc10.\r
 - Open contrib\vstudio\vc10\zlibvc.sln with Microsoft Visual C++ 2010.0\r
 \r
 \r
index 9810412bbb6168c6eccceccd8d8577c395efca81..9088d176f8ce9f3c4e584dec6c513b3fc0a78306 100644 (file)
       <DebugInformationFormat>EditAndContinue</DebugInformationFormat>\r
     </ClCompile>\r
     <Link>\r
-      <AdditionalDependencies>..\..\masmx86\gvmat32.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>\r
+      <AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>\r
       <OutputFile>$(OutDir)testzlib.exe</OutputFile>\r
       <GenerateDebugInformation>true</GenerateDebugInformation>\r
       <ProgramDatabaseFile>$(OutDir)testzlib.pdb</ProgramDatabaseFile>\r
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
     </ClCompile>\r
     <Link>\r
-      <AdditionalDependencies>..\..\masmx86\gvmat32.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>\r
+      <AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>\r
       <OutputFile>$(OutDir)testzlib.exe</OutputFile>\r
       <GenerateDebugInformation>true</GenerateDebugInformation>\r
       <SubSystem>Console</SubSystem>\r
     <ClCompile Include="..\..\..\compress.c" />\r
     <ClCompile Include="..\..\..\crc32.c" />\r
     <ClCompile Include="..\..\..\deflate.c" />\r
-    <ClCompile Include="..\..\masmx86\gvmat32c.c">\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</ExcludedFromBuild>\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">true</ExcludedFromBuild>\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">true</ExcludedFromBuild>\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">true</ExcludedFromBuild>\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>\r
-    </ClCompile>\r
     <ClCompile Include="..\..\..\infback.c" />\r
     <ClCompile Include="..\..\masmx64\inffas8664.c">\r
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</ExcludedFromBuild>\r
index a0d9b23fc1b4b9d7d6432d13e75be1c857a7527a..249daa89caf99e98b077b58873859a8d25ab6d6b 100644 (file)
@@ -27,9 +27,6 @@
     <ClCompile Include="..\..\..\deflate.c">\r
       <Filter>Source Files</Filter>\r
     </ClCompile>\r
-    <ClCompile Include="..\..\masmx86\gvmat32c.c">\r
-      <Filter>Source Files</Filter>\r
-    </ClCompile>\r
     <ClCompile Include="..\..\..\infback.c">\r
       <Filter>Source Files</Filter>\r
     </ClCompile>\r
index 72cb8b4c31e2f867f87526db67cbe95f130db348..23802d86a266b3c35a800f340f09804326b6eb79 100644 (file)
@@ -2,8 +2,8 @@
 \r
 #define IDR_VERSION1  1\r
 IDR_VERSION1   VERSIONINFO     MOVEABLE IMPURE LOADONCALL DISCARDABLE\r
-  FILEVERSION   1,2,3,0\r
-  PRODUCTVERSION 1,2,3,0\r
+  FILEVERSION   1,2,4,0\r
+  PRODUCTVERSION 1,2,4,0\r
   FILEFLAGSMASK        VS_FFI_FILEFLAGSMASK\r
   FILEFLAGS    0\r
   FILEOS       VOS_DOS_WINDOWS32\r
@@ -16,13 +16,13 @@ BEGIN
     //language ID = U.S. English, char set = Windows, Multilingual\r
 \r
     BEGIN\r
-      VALUE "FileDescription", "zlib data compression library\0"\r
-      VALUE "FileVersion",     "1.2.3.0\0"\r
+      VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0"\r
+      VALUE "FileVersion",     "1.2.4.0\0"\r
       VALUE "InternalName",    "zlib\0"\r
       VALUE "OriginalFilename",        "zlib.dll\0"\r
       VALUE "ProductName",     "ZLib.DLL\0"\r
       VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0"\r
-      VALUE "LegalCopyright", "(C) 1995-2003 Jean-loup Gailly & Mark Adler\0"\r
+      VALUE "LegalCopyright", "(C) 1995-2010 Jean-loup Gailly & Mark Adler\0"\r
     END\r
   END\r
   BLOCK "VarFileInfo"\r
index fbf6c1bb870f563500c78beeabd5147b81ac2afa..2682fca24a6272e25081c9cc69926f84f2dd6a6b 100644 (file)
     </ResourceCompile>\r
     <Lib>\r
       <AdditionalOptions>/MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>\r
-      <AdditionalDependencies>..\..\masmx86\gvmat32.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>\r
+      <AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>\r
       <OutputFile>$(OutDir)zlibstat.lib</OutputFile>\r
       <SuppressStartupBanner>true</SuppressStartupBanner>\r
     </Lib>\r
     <ClCompile Include="..\..\..\compress.c" />\r
     <ClCompile Include="..\..\..\crc32.c" />\r
     <ClCompile Include="..\..\..\deflate.c" />\r
-    <ClCompile Include="..\..\masmx86\gvmat32c.c">\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</ExcludedFromBuild>\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">true</ExcludedFromBuild>\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">true</ExcludedFromBuild>\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">true</ExcludedFromBuild>\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>\r
-    </ClCompile>\r
     <ClCompile Include="..\..\..\gzclose.c" />\r
-    <ClCompile Include="..\..\..\gzio.c" />\r
     <ClCompile Include="..\..\..\gzlib.c" />\r
     <ClCompile Include="..\..\..\gzread.c" />\r
     <ClCompile Include="..\..\..\gzwrite.c" />\r
index f676c2dc2b3993184117f5dc3707b9a2fa4c4b4e..c8c7f7ea395ca448ec7753636e4c6806ad2e7c17 100644 (file)
     <ClCompile Include="..\..\..\deflate.c">\r
       <Filter>Source Files</Filter>\r
     </ClCompile>\r
-    <ClCompile Include="..\..\masmx86\gvmat32c.c">\r
-      <Filter>Source Files</Filter>\r
-    </ClCompile>\r
     <ClCompile Include="..\..\..\gzclose.c">\r
       <Filter>Source Files</Filter>\r
     </ClCompile>\r
-    <ClCompile Include="..\..\..\gzio.c">\r
-      <Filter>Source Files</Filter>\r
-    </ClCompile>\r
     <ClCompile Include="..\..\..\gzlib.c">\r
       <Filter>Source Files</Filter>\r
     </ClCompile>\r
index 0b6a9e9071cec75a201d71245f30af3a5f9e7d53..b3b7caba703b44019bf9caebac139cb160eae857 100644 (file)
@@ -1,7 +1,7 @@
+LIBRARY\r
+; zlib data compression and ZIP file I/O library\r
 \r
-VERSION                1.23\r
-\r
-HEAPSIZE       1048576,8192\r
+VERSION                1.24\r
 \r
 EXPORTS\r
         adler32                                  @1\r
@@ -90,25 +90,47 @@ EXPORTS
         unzGoToFilePos                           @101\r
 \r
         fill_win32_filefunc                      @110\r
-        fill_win32_filefunc64                    @111\r
-        fill_win32_filefunc64A                   @112\r
-        fill_win32_filefunc64W                   @113\r
 \r
-; quick hack by hkuno@microhouse.co.jp\r
-        unzOpen64                         @120\r
-        unzOpen2_64                       @121\r
-        unzGetGlobalInfo64                @122\r
-        unzGetCurrentFileInfo64           @124\r
-        unzGetCurrentFileZStreamPos64     @125\r
-        unztell64                         @126\r
-        unzGetFilePos64                   @127\r
-        unzGoToFilePos64                  @128\r
+; zlibwapi v1.2.4 added:\r
+        fill_win32_filefunc64                   @111\r
+        fill_win32_filefunc64A                  @112\r
+        fill_win32_filefunc64W                  @113\r
+\r
+        unzOpen64                               @120\r
+        unzOpen2_64                             @121\r
+        unzGetGlobalInfo64                      @122\r
+        unzGetCurrentFileInfo64                 @124\r
+        unzGetCurrentFileZStreamPos64           @125\r
+        unztell64                               @126\r
+        unzGetFilePos64                         @127\r
+        unzGoToFilePos64                        @128\r
+\r
+        zipOpen64                               @130\r
+        zipOpen2_64                             @131\r
+        zipOpenNewFileInZip64                   @132\r
+        zipOpenNewFileInZip2_64                 @133\r
+        zipOpenNewFileInZip3_64                 @134\r
+        zipOpenNewFileInZip4_64                 @135\r
+        zipCloseFileInZipRaw64                  @136\r
 \r
-        zipOpen64                         @130\r
-        zipOpen2_64                       @131\r
-        zipOpenNewFileInZip64             @132\r
-        zipOpenNewFileInZip2_64           @133\r
-        zipOpenNewFileInZip3_64           @134\r
-        zipOpenNewFileInZip4_64           @135\r
-        zipCloseFileInZipRaw64            @136\r
-; end hack\r
+; zlib1 v1.2.4 added:\r
+        adler32_combine                         @140\r
+        adler32_combine64                       @141\r
+        crc32_combine                           @142\r
+        crc32_combine64                         @143\r
+        deflateSetHeader                        @144\r
+        deflateTune                             @145\r
+        gzbuffer                                @146\r
+        gzclose_r                               @147\r
+        gzclose_w                               @148\r
+        gzdirect                                @149\r
+        gzoffset                                @150\r
+        gzoffset64                              @151\r
+        gzopen64                                @152\r
+        gzseek64                                @153\r
+        gztell64                                @154\r
+        inflateGetHeader                        @156\r
+        inflateMark                             @157\r
+        inflatePrime                            @158\r
+        inflateReset2                           @159\r
+        inflateUndermine                        @160\r
index 6d2ef6487ba88fa19b0b78d731d7aa39a2f5d786..6f6ffd5eea13b661512f1fe3e8f6cb2d30023e36 100644 (file)
@@ -36,8 +36,8 @@ Global
                {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Itanium.Build.0 = Release|Itanium\r
                {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.ActiveCfg = Release|Win32\r
                {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.Build.0 = Release|Win32\r
-               {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.ActiveCfg = ReleaseWithoutAsm|x64\r
-               {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.Build.0 = ReleaseWithoutAsm|x64\r
+               {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.ActiveCfg = Release|x64\r
+               {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.Build.0 = Release|x64\r
                {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Itanium\r
                {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Itanium.Build.0 = ReleaseWithoutAsm|Itanium\r
                {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32\r
@@ -94,8 +94,8 @@ Global
                {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.Build.0 = Release|x64\r
                {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Itanium\r
                {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Itanium.Build.0 = Release|Itanium\r
-               {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Itanium\r
-               {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|Itanium\r
+               {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32\r
+               {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64\r
                {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.ActiveCfg = Debug|Itanium\r
                {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.Build.0 = Debug|Itanium\r
                {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32\r
@@ -110,8 +110,8 @@ Global
                {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64\r
                {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Itanium\r
                {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.Build.0 = Release|Itanium\r
-               {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Itanium\r
-               {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = Release|Itanium\r
+               {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32\r
+               {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64\r
                {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Itanium.ActiveCfg = Debug|Itanium\r
                {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Itanium.Build.0 = Debug|Itanium\r
                {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.ActiveCfg = Debug|Win32\r
@@ -126,8 +126,8 @@ Global
                {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.Build.0 = Release|x64\r
                {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Itanium\r
                {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Itanium.Build.0 = Release|Itanium\r
-               {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Itanium\r
-               {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|Itanium\r
+               {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32\r
+               {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64\r
        EndGlobalSection\r
        GlobalSection(SolutionProperties) = preSolution\r
                HideSolutionNode = FALSE\r
index e1067fa4e697fc26e0bfb55ed71a7a3ead43a4e7..98623989343e437cec320e767cf023bcc0ce579a 100644 (file)
     </ResourceCompile>\r
     <Link>\r
       <AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions>\r
-      <AdditionalDependencies>..\..\masmx86\gvmat32.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>\r
+      <AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>\r
       <OutputFile>$(OutDir)zlibwapi.dll</OutputFile>\r
       <SuppressStartupBanner>true</SuppressStartupBanner>\r
       <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>\r
       <StringPooling>true</StringPooling>\r
       <ExceptionHandling>\r
       </ExceptionHandling>\r
-      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>\r
       <BufferSecurityCheck>false</BufferSecurityCheck>\r
       <FunctionLevelLinking>true</FunctionLevelLinking>\r
       <PrecompiledHeaderOutputFile>$(IntDir)zlibvc.pch</PrecompiledHeaderOutputFile>\r
     </ResourceCompile>\r
     <Link>\r
       <AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions>\r
-      <AdditionalDependencies>..\..\masmx86\gvmat32.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>\r
+      <AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>\r
       <OutputFile>$(OutDir)zlibwapi.dll</OutputFile>\r
       <SuppressStartupBanner>true</SuppressStartupBanner>\r
       <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>\r
     <ClCompile Include="..\..\..\compress.c" />\r
     <ClCompile Include="..\..\..\crc32.c" />\r
     <ClCompile Include="..\..\..\deflate.c" />\r
-    <ClCompile Include="..\..\masmx86\gvmat32c.c">\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</ExcludedFromBuild>\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">true</ExcludedFromBuild>\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">true</ExcludedFromBuild>\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">true</ExcludedFromBuild>\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">true</ExcludedFromBuild>\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>\r
-    </ClCompile>\r
     <ClCompile Include="..\..\..\gzclose.c" />\r
-    <ClCompile Include="..\..\..\gzio.c" />\r
     <ClCompile Include="..\..\..\gzlib.c" />\r
     <ClCompile Include="..\..\..\gzread.c" />\r
     <ClCompile Include="..\..\..\gzwrite.c" />\r
index 7b595c49100a8840723f375e99d3dcfc5d8d3b87..180b71cd61df64afb4f8c13f84e73426c4cd7d2e 100644 (file)
     <ClCompile Include="..\..\..\deflate.c">\r
       <Filter>Source Files</Filter>\r
     </ClCompile>\r
-    <ClCompile Include="..\..\masmx86\gvmat32c.c">\r
-      <Filter>Source Files</Filter>\r
-    </ClCompile>\r
     <ClCompile Include="..\..\..\gzclose.c">\r
       <Filter>Source Files</Filter>\r
     </ClCompile>\r
-    <ClCompile Include="..\..\..\gzio.c">\r
-      <Filter>Source Files</Filter>\r
-    </ClCompile>\r
     <ClCompile Include="..\..\..\gzlib.c">\r
       <Filter>Source Files</Filter>\r
     </ClCompile>\r
diff --git a/contrib/vstudio/vc7/zlibvc.def b/contrib/vstudio/vc7/zlibvc.def
deleted file mode 100644 (file)
index 0b6a9e9..0000000
+++ /dev/null
@@ -1,114 +0,0 @@
-\r
-VERSION                1.23\r
-\r
-HEAPSIZE       1048576,8192\r
-\r
-EXPORTS\r
-        adler32                                  @1\r
-        compress                                 @2\r
-        crc32                                    @3\r
-        deflate                                  @4\r
-        deflateCopy                              @5\r
-        deflateEnd                               @6\r
-        deflateInit2_                            @7\r
-        deflateInit_                             @8\r
-        deflateParams                            @9\r
-        deflateReset                             @10\r
-        deflateSetDictionary                     @11\r
-        gzclose                                  @12\r
-        gzdopen                                  @13\r
-        gzerror                                  @14\r
-        gzflush                                  @15\r
-        gzopen                                   @16\r
-        gzread                                   @17\r
-        gzwrite                                  @18\r
-        inflate                                  @19\r
-        inflateEnd                               @20\r
-        inflateInit2_                            @21\r
-        inflateInit_                             @22\r
-        inflateReset                             @23\r
-        inflateSetDictionary                     @24\r
-        inflateSync                              @25\r
-        uncompress                               @26\r
-        zlibVersion                              @27\r
-        gzprintf                                 @28\r
-        gzputc                                   @29\r
-        gzgetc                                   @30\r
-        gzseek                                   @31\r
-        gzrewind                                 @32\r
-        gztell                                   @33\r
-        gzeof                                    @34\r
-        gzsetparams                              @35\r
-        zError                                   @36\r
-        inflateSyncPoint                         @37\r
-        get_crc_table                            @38\r
-        compress2                                @39\r
-        gzputs                                   @40\r
-        gzgets                                   @41\r
-        inflateCopy                              @42\r
-        inflateBackInit_                         @43\r
-        inflateBack                              @44\r
-        inflateBackEnd                           @45\r
-        compressBound                            @46\r
-        deflateBound                             @47\r
-        gzclearerr                               @48\r
-        gzungetc                                 @49\r
-        zlibCompileFlags                         @50\r
-        deflatePrime                             @51\r
-\r
-        unzOpen                                  @61\r
-        unzClose                                 @62\r
-        unzGetGlobalInfo                         @63\r
-        unzGetCurrentFileInfo                    @64\r
-        unzGoToFirstFile                         @65\r
-        unzGoToNextFile                          @66\r
-        unzOpenCurrentFile                       @67\r
-        unzReadCurrentFile                       @68\r
-        unzOpenCurrentFile3                      @69\r
-        unztell                                  @70\r
-        unzeof                                   @71\r
-        unzCloseCurrentFile                      @72\r
-        unzGetGlobalComment                      @73\r
-        unzStringFileNameCompare                 @74\r
-        unzLocateFile                            @75\r
-        unzGetLocalExtrafield                    @76\r
-        unzOpen2                                 @77\r
-        unzOpenCurrentFile2                      @78\r
-        unzOpenCurrentFilePassword               @79\r
-\r
-        zipOpen                                  @80\r
-        zipOpenNewFileInZip                      @81\r
-        zipWriteInFileInZip                      @82\r
-        zipCloseFileInZip                        @83\r
-        zipClose                                 @84\r
-        zipOpenNewFileInZip2                     @86\r
-        zipCloseFileInZipRaw                     @87\r
-        zipOpen2                                 @88\r
-        zipOpenNewFileInZip3                     @89\r
-\r
-        unzGetFilePos                            @100\r
-        unzGoToFilePos                           @101\r
-\r
-        fill_win32_filefunc                      @110\r
-        fill_win32_filefunc64                    @111\r
-        fill_win32_filefunc64A                   @112\r
-        fill_win32_filefunc64W                   @113\r
-\r
-; quick hack by hkuno@microhouse.co.jp\r
-        unzOpen64                         @120\r
-        unzOpen2_64                       @121\r
-        unzGetGlobalInfo64                @122\r
-        unzGetCurrentFileInfo64           @124\r
-        unzGetCurrentFileZStreamPos64     @125\r
-        unztell64                         @126\r
-        unzGetFilePos64                   @127\r
-        unzGoToFilePos64                  @128\r
-\r
-        zipOpen64                         @130\r
-        zipOpen2_64                       @131\r
-        zipOpenNewFileInZip64             @132\r
-        zipOpenNewFileInZip2_64           @133\r
-        zipOpenNewFileInZip3_64           @134\r
-        zipOpenNewFileInZip4_64           @135\r
-        zipCloseFileInZipRaw64            @136\r
-; end hack\r
diff --git a/contrib/vstudio/vc8/zlibvc.def b/contrib/vstudio/vc8/zlibvc.def
deleted file mode 100644 (file)
index 0b6a9e9..0000000
+++ /dev/null
@@ -1,114 +0,0 @@
-\r
-VERSION                1.23\r
-\r
-HEAPSIZE       1048576,8192\r
-\r
-EXPORTS\r
-        adler32                                  @1\r
-        compress                                 @2\r
-        crc32                                    @3\r
-        deflate                                  @4\r
-        deflateCopy                              @5\r
-        deflateEnd                               @6\r
-        deflateInit2_                            @7\r
-        deflateInit_                             @8\r
-        deflateParams                            @9\r
-        deflateReset                             @10\r
-        deflateSetDictionary                     @11\r
-        gzclose                                  @12\r
-        gzdopen                                  @13\r
-        gzerror                                  @14\r
-        gzflush                                  @15\r
-        gzopen                                   @16\r
-        gzread                                   @17\r
-        gzwrite                                  @18\r
-        inflate                                  @19\r
-        inflateEnd                               @20\r
-        inflateInit2_                            @21\r
-        inflateInit_                             @22\r
-        inflateReset                             @23\r
-        inflateSetDictionary                     @24\r
-        inflateSync                              @25\r
-        uncompress                               @26\r
-        zlibVersion                              @27\r
-        gzprintf                                 @28\r
-        gzputc                                   @29\r
-        gzgetc                                   @30\r
-        gzseek                                   @31\r
-        gzrewind                                 @32\r
-        gztell                                   @33\r
-        gzeof                                    @34\r
-        gzsetparams                              @35\r
-        zError                                   @36\r
-        inflateSyncPoint                         @37\r
-        get_crc_table                            @38\r
-        compress2                                @39\r
-        gzputs                                   @40\r
-        gzgets                                   @41\r
-        inflateCopy                              @42\r
-        inflateBackInit_                         @43\r
-        inflateBack                              @44\r
-        inflateBackEnd                           @45\r
-        compressBound                            @46\r
-        deflateBound                             @47\r
-        gzclearerr                               @48\r
-        gzungetc                                 @49\r
-        zlibCompileFlags                         @50\r
-        deflatePrime                             @51\r
-\r
-        unzOpen                                  @61\r
-        unzClose                                 @62\r
-        unzGetGlobalInfo                         @63\r
-        unzGetCurrentFileInfo                    @64\r
-        unzGoToFirstFile                         @65\r
-        unzGoToNextFile                          @66\r
-        unzOpenCurrentFile                       @67\r
-        unzReadCurrentFile                       @68\r
-        unzOpenCurrentFile3                      @69\r
-        unztell                                  @70\r
-        unzeof                                   @71\r
-        unzCloseCurrentFile                      @72\r
-        unzGetGlobalComment                      @73\r
-        unzStringFileNameCompare                 @74\r
-        unzLocateFile                            @75\r
-        unzGetLocalExtrafield                    @76\r
-        unzOpen2                                 @77\r
-        unzOpenCurrentFile2                      @78\r
-        unzOpenCurrentFilePassword               @79\r
-\r
-        zipOpen                                  @80\r
-        zipOpenNewFileInZip                      @81\r
-        zipWriteInFileInZip                      @82\r
-        zipCloseFileInZip                        @83\r
-        zipClose                                 @84\r
-        zipOpenNewFileInZip2                     @86\r
-        zipCloseFileInZipRaw                     @87\r
-        zipOpen2                                 @88\r
-        zipOpenNewFileInZip3                     @89\r
-\r
-        unzGetFilePos                            @100\r
-        unzGoToFilePos                           @101\r
-\r
-        fill_win32_filefunc                      @110\r
-        fill_win32_filefunc64                    @111\r
-        fill_win32_filefunc64A                   @112\r
-        fill_win32_filefunc64W                   @113\r
-\r
-; quick hack by hkuno@microhouse.co.jp\r
-        unzOpen64                         @120\r
-        unzOpen2_64                       @121\r
-        unzGetGlobalInfo64                @122\r
-        unzGetCurrentFileInfo64           @124\r
-        unzGetCurrentFileZStreamPos64     @125\r
-        unztell64                         @126\r
-        unzGetFilePos64                   @127\r
-        unzGoToFilePos64                  @128\r
-\r
-        zipOpen64                         @130\r
-        zipOpen2_64                       @131\r
-        zipOpenNewFileInZip64             @132\r
-        zipOpenNewFileInZip2_64           @133\r
-        zipOpenNewFileInZip3_64           @134\r
-        zipOpenNewFileInZip4_64           @135\r
-        zipCloseFileInZipRaw64            @136\r
-; end hack\r
index 9ad07ae1344115424c3db23ced62bd36e0eb84b1..9cb0bf877f3d2145e335b03491cc30dd7a12dc0f 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="Windows-1252"?>\r
 <VisualStudioProject\r
        ProjectType="Visual C++"\r
-       Version="9.00"\r
+       Version="9,00"\r
        Name="testzlib"\r
        ProjectGUID="{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}"\r
        RootNamespace="testzlib"\r
@@ -71,7 +71,7 @@
                        />\r
                        <Tool\r
                                Name="VCLinkerTool"\r
-                               AdditionalDependencies="..\..\masmx86\gvmat32.obj ..\..\masmx86\inffas32.obj"\r
+                               AdditionalDependencies="..\..\masmx86\match686.obj ..\..\masmx86\inffas32.obj"\r
                                OutputFile="$(OutDir)/testzlib.exe"\r
                                LinkIncremental="2"\r
                                GenerateManifest="false"\r
                        />\r
                </Configuration>\r
                <Configuration\r
-                       Name="ReleaseWithoutAsm|Win32"\r
-                       OutputDirectory="x86\TestZlib$(ConfigurationName)"\r
-                       IntermediateDirectory="x86\TestZlib$(ConfigurationName)\Tmp"\r
+                       Name="Debug|x64"\r
+                       OutputDirectory="x64\TestZlib$(ConfigurationName)"\r
+                       IntermediateDirectory="x64\TestZlib$(ConfigurationName)\Tmp"\r
                        ConfigurationType="1"\r
-                       CharacterSet="2"\r
-                       WholeProgramOptimization="1"\r
                        >\r
                        <Tool\r
                                Name="VCPreBuildEventTool"\r
                        />\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
-                               Optimization="2"\r
-                               InlineFunctionExpansion="1"\r
-                               OmitFramePointers="true"\r
                                AdditionalIncludeDirectories="..\..\.."\r
-                               PreprocessorDefinitions="WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS"\r
-                               StringPooling="true"\r
+                               PreprocessorDefinitions="ASMV;ASMINF;WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS"\r
                                BasicRuntimeChecks="0"\r
-                               RuntimeLibrary="0"\r
+                               RuntimeLibrary="3"\r
                                BufferSecurityCheck="false"\r
-                               EnableFunctionLevelLinking="true"\r
-                               UsePrecompiledHeader="0"\r
                                AssemblerListingLocation="$(IntDir)\"\r
-                               WarningLevel="3"\r
-                               Detect64BitPortabilityProblems="true"\r
-                               DebugInformationFormat="3"\r
                        />\r
                        <Tool\r
                                Name="VCManagedResourceCompilerTool"\r
                        />\r
                        <Tool\r
                                Name="VCLinkerTool"\r
-                               OutputFile="$(OutDir)/testzlib.exe"\r
-                               LinkIncremental="1"\r
+                               AdditionalDependencies="..\..\masmx64\gvmat64.obj ..\..\masmx64\inffasx64.obj"\r
                                GenerateManifest="false"\r
-                               GenerateDebugInformation="true"\r
-                               SubSystem="1"\r
-                               OptimizeReferences="2"\r
-                               EnableCOMDATFolding="2"\r
-                               OptimizeForWindows98="1"\r
-                               RandomizedBaseAddress="1"\r
-                               DataExecutionPrevention="0"\r
-                               TargetMachine="1"\r
                        />\r
                        <Tool\r
                                Name="VCALinkTool"\r
                        />\r
                </Configuration>\r
                <Configuration\r
-                       Name="Release|Win32"\r
-                       OutputDirectory="x86\TestZlib$(ConfigurationName)"\r
-                       IntermediateDirectory="x86\TestZlib$(ConfigurationName)\Tmp"\r
+                       Name="Debug|Itanium"\r
+                       OutputDirectory="ia64\TestZlib$(ConfigurationName)"\r
+                       IntermediateDirectory="ia64\TestZlib$(ConfigurationName)\Tmp"\r
                        ConfigurationType="1"\r
                        CharacterSet="2"\r
-                       WholeProgramOptimization="1"\r
                        >\r
                        <Tool\r
                                Name="VCPreBuildEventTool"\r
                        />\r
                        <Tool\r
                                Name="VCMIDLTool"\r
+                               TargetEnvironment="2"\r
                        />\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
-                               Optimization="2"\r
-                               InlineFunctionExpansion="1"\r
-                               OmitFramePointers="true"\r
+                               Optimization="0"\r
                                AdditionalIncludeDirectories="..\..\.."\r
-                               PreprocessorDefinitions="ASMV;ASMINF;WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS"\r
-                               StringPooling="true"\r
+                               PreprocessorDefinitions="ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64"\r
+                               MinimalRebuild="true"\r
                                BasicRuntimeChecks="0"\r
-                               RuntimeLibrary="0"\r
+                               RuntimeLibrary="3"\r
                                BufferSecurityCheck="false"\r
-                               EnableFunctionLevelLinking="true"\r
                                UsePrecompiledHeader="0"\r
+                               AssemblerOutput="4"\r
                                AssemblerListingLocation="$(IntDir)\"\r
                                WarningLevel="3"\r
                                Detect64BitPortabilityProblems="true"\r
                        />\r
                        <Tool\r
                                Name="VCLinkerTool"\r
-                               AdditionalDependencies="..\..\masmx86\gvmat32.obj ..\..\masmx86\inffas32.obj"\r
                                OutputFile="$(OutDir)/testzlib.exe"\r
-                               LinkIncremental="1"\r
+                               LinkIncremental="2"\r
                                GenerateManifest="false"\r
                                GenerateDebugInformation="true"\r
+                               ProgramDatabaseFile="$(OutDir)/testzlib.pdb"\r
                                SubSystem="1"\r
-                               OptimizeReferences="2"\r
-                               EnableCOMDATFolding="2"\r
-                               OptimizeForWindows98="1"\r
-                               RandomizedBaseAddress="1"\r
-                               DataExecutionPrevention="0"\r
-                               TargetMachine="1"\r
+                               TargetMachine="5"\r
                        />\r
                        <Tool\r
                                Name="VCALinkTool"\r
                        />\r
                </Configuration>\r
                <Configuration\r
-                       Name="Debug|x64"\r
-                       OutputDirectory="x64\TestZlib$(ConfigurationName)"\r
-                       IntermediateDirectory="x64\TestZlib$(ConfigurationName)\Tmp"\r
+                       Name="ReleaseWithoutAsm|Win32"\r
+                       OutputDirectory="x86\TestZlib$(ConfigurationName)"\r
+                       IntermediateDirectory="x86\TestZlib$(ConfigurationName)\Tmp"\r
                        ConfigurationType="1"\r
+                       CharacterSet="2"\r
+                       WholeProgramOptimization="1"\r
                        >\r
                        <Tool\r
                                Name="VCPreBuildEventTool"\r
                        />\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
+                               Optimization="2"\r
+                               InlineFunctionExpansion="1"\r
+                               OmitFramePointers="true"\r
                                AdditionalIncludeDirectories="..\..\.."\r
-                               PreprocessorDefinitions="ASMV;ASMINF;WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS"\r
+                               PreprocessorDefinitions="WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS"\r
+                               StringPooling="true"\r
                                BasicRuntimeChecks="0"\r
-                               RuntimeLibrary="3"\r
+                               RuntimeLibrary="0"\r
                                BufferSecurityCheck="false"\r
+                               EnableFunctionLevelLinking="true"\r
+                               UsePrecompiledHeader="0"\r
                                AssemblerListingLocation="$(IntDir)\"\r
+                               WarningLevel="3"\r
+                               Detect64BitPortabilityProblems="true"\r
+                               DebugInformationFormat="3"\r
                        />\r
                        <Tool\r
                                Name="VCManagedResourceCompilerTool"\r
                        />\r
                        <Tool\r
                                Name="VCLinkerTool"\r
-                               AdditionalDependencies="..\..\masmx64\gvmat64.obj ..\..\masmx64\inffasx64.obj"\r
+                               OutputFile="$(OutDir)/testzlib.exe"\r
+                               LinkIncremental="1"\r
                                GenerateManifest="false"\r
+                               GenerateDebugInformation="true"\r
+                               SubSystem="1"\r
+                               OptimizeReferences="2"\r
+                               EnableCOMDATFolding="2"\r
+                               OptimizeForWindows98="1"\r
+                               RandomizedBaseAddress="1"\r
+                               DataExecutionPrevention="0"\r
+                               TargetMachine="1"\r
                        />\r
                        <Tool\r
                                Name="VCALinkTool"\r
                        <Tool\r
                                Name="VCAppVerifierTool"\r
                        />\r
-                       <Tool\r
-                               Name="VCWebDeploymentTool"\r
-                       />\r
                        <Tool\r
                                Name="VCPostBuildEventTool"\r
                        />\r
                </Configuration>\r
                <Configuration\r
-                       Name="Debug|Itanium"\r
-                       OutputDirectory="ia64\TestZlib$(ConfigurationName)"\r
-                       IntermediateDirectory="ia64\TestZlib$(ConfigurationName)\Tmp"\r
+                       Name="ReleaseWithoutAsm|x64"\r
+                       OutputDirectory="x64\TestZlib$(ConfigurationName)"\r
+                       IntermediateDirectory="x64\TestZlib$(ConfigurationName)\Tmp"\r
                        ConfigurationType="1"\r
-                       CharacterSet="2"\r
+                       WholeProgramOptimization="1"\r
                        >\r
                        <Tool\r
                                Name="VCPreBuildEventTool"\r
                        />\r
                        <Tool\r
                                Name="VCMIDLTool"\r
-                               TargetEnvironment="2"\r
                        />\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
-                               Optimization="0"\r
                                AdditionalIncludeDirectories="..\..\.."\r
-                               PreprocessorDefinitions="ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64"\r
-                               MinimalRebuild="true"\r
+                               PreprocessorDefinitions="WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS"\r
                                BasicRuntimeChecks="0"\r
-                               RuntimeLibrary="3"\r
+                               RuntimeLibrary="2"\r
                                BufferSecurityCheck="false"\r
-                               UsePrecompiledHeader="0"\r
-                               AssemblerOutput="4"\r
                                AssemblerListingLocation="$(IntDir)\"\r
-                               WarningLevel="3"\r
-                               Detect64BitPortabilityProblems="true"\r
-                               DebugInformationFormat="3"\r
                        />\r
                        <Tool\r
                                Name="VCManagedResourceCompilerTool"\r
                        />\r
                        <Tool\r
                                Name="VCLinkerTool"\r
-                               OutputFile="$(OutDir)/testzlib.exe"\r
-                               LinkIncremental="2"\r
+                               AdditionalDependencies=""\r
                                GenerateManifest="false"\r
-                               GenerateDebugInformation="true"\r
-                               ProgramDatabaseFile="$(OutDir)/testzlib.pdb"\r
-                               SubSystem="1"\r
-                               TargetMachine="5"\r
                        />\r
                        <Tool\r
                                Name="VCALinkTool"\r
                        <Tool\r
                                Name="VCAppVerifierTool"\r
                        />\r
-                       <Tool\r
-                               Name="VCWebDeploymentTool"\r
-                       />\r
                        <Tool\r
                                Name="VCPostBuildEventTool"\r
                        />\r
                </Configuration>\r
                <Configuration\r
-                       Name="ReleaseWithoutAsm|x64"\r
-                       OutputDirectory="x64\TestZlib$(ConfigurationName)"\r
-                       IntermediateDirectory="x64\TestZlib$(ConfigurationName)\Tmp"\r
+                       Name="ReleaseWithoutAsm|Itanium"\r
+                       OutputDirectory="ia64\TestZlib$(ConfigurationName)"\r
+                       IntermediateDirectory="ia64\TestZlib$(ConfigurationName)\Tmp"\r
                        ConfigurationType="1"\r
+                       CharacterSet="2"\r
                        WholeProgramOptimization="1"\r
                        >\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCMIDLTool"\r
+                               TargetEnvironment="2"\r
                        />\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
+                               Optimization="2"\r
+                               InlineFunctionExpansion="1"\r
+                               OmitFramePointers="true"\r
                                AdditionalIncludeDirectories="..\..\.."\r
-                               PreprocessorDefinitions="WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS"\r
+                               PreprocessorDefinitions="ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64"\r
+                               StringPooling="true"\r
                                BasicRuntimeChecks="0"\r
                                RuntimeLibrary="2"\r
                                BufferSecurityCheck="false"\r
+                               EnableFunctionLevelLinking="true"\r
+                               UsePrecompiledHeader="0"\r
                                AssemblerListingLocation="$(IntDir)\"\r
+                               WarningLevel="3"\r
+                               Detect64BitPortabilityProblems="true"\r
+                               DebugInformationFormat="3"\r
                        />\r
                        <Tool\r
                                Name="VCManagedResourceCompilerTool"\r
                        />\r
                        <Tool\r
                                Name="VCLinkerTool"\r
-                               AdditionalDependencies=""\r
+                               OutputFile="$(OutDir)/testzlib.exe"\r
+                               LinkIncremental="1"\r
                                GenerateManifest="false"\r
+                               GenerateDebugInformation="true"\r
+                               SubSystem="1"\r
+                               OptimizeReferences="2"\r
+                               EnableCOMDATFolding="2"\r
+                               OptimizeForWindows98="1"\r
+                               TargetMachine="5"\r
                        />\r
                        <Tool\r
                                Name="VCALinkTool"\r
                        <Tool\r
                                Name="VCAppVerifierTool"\r
                        />\r
-                       <Tool\r
-                               Name="VCWebDeploymentTool"\r
-                       />\r
                        <Tool\r
                                Name="VCPostBuildEventTool"\r
                        />\r
                </Configuration>\r
                <Configuration\r
-                       Name="ReleaseWithoutAsm|Itanium"\r
-                       OutputDirectory="ia64\TestZlib$(ConfigurationName)"\r
-                       IntermediateDirectory="ia64\TestZlib$(ConfigurationName)\Tmp"\r
+                       Name="Release|Win32"\r
+                       OutputDirectory="x86\TestZlib$(ConfigurationName)"\r
+                       IntermediateDirectory="x86\TestZlib$(ConfigurationName)\Tmp"\r
                        ConfigurationType="1"\r
                        CharacterSet="2"\r
                        WholeProgramOptimization="1"\r
                        />\r
                        <Tool\r
                                Name="VCMIDLTool"\r
-                               TargetEnvironment="2"\r
                        />\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
                                InlineFunctionExpansion="1"\r
                                OmitFramePointers="true"\r
                                AdditionalIncludeDirectories="..\..\.."\r
-                               PreprocessorDefinitions="ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64"\r
+                               PreprocessorDefinitions="ASMV;ASMINF;WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS"\r
                                StringPooling="true"\r
                                BasicRuntimeChecks="0"\r
-                               RuntimeLibrary="2"\r
+                               RuntimeLibrary="0"\r
                                BufferSecurityCheck="false"\r
                                EnableFunctionLevelLinking="true"\r
                                UsePrecompiledHeader="0"\r
                        />\r
                        <Tool\r
                                Name="VCLinkerTool"\r
+                               AdditionalDependencies="..\..\masmx86\match686.obj ..\..\masmx86\inffas32.obj"\r
                                OutputFile="$(OutDir)/testzlib.exe"\r
                                LinkIncremental="1"\r
                                GenerateManifest="false"\r
                                OptimizeReferences="2"\r
                                EnableCOMDATFolding="2"\r
                                OptimizeForWindows98="1"\r
-                               TargetMachine="5"\r
+                               RandomizedBaseAddress="1"\r
+                               DataExecutionPrevention="0"\r
+                               TargetMachine="1"\r
                        />\r
                        <Tool\r
                                Name="VCALinkTool"\r
                        <Tool\r
                                Name="VCAppVerifierTool"\r
                        />\r
-                       <Tool\r
-                               Name="VCWebDeploymentTool"\r
-                       />\r
                        <Tool\r
                                Name="VCPostBuildEventTool"\r
                        />\r
                                AdditionalIncludeDirectories="..\..\.."\r
                                PreprocessorDefinitions="ASMV;ASMINF;WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS"\r
                                BasicRuntimeChecks="0"\r
-                               RuntimeLibrary="2"\r
+                               RuntimeLibrary="0"\r
                                BufferSecurityCheck="false"\r
                                AssemblerListingLocation="$(IntDir)\"\r
                        />\r
                        <Tool\r
                                Name="VCAppVerifierTool"\r
                        />\r
-                       <Tool\r
-                               Name="VCWebDeploymentTool"\r
-                       />\r
                        <Tool\r
                                Name="VCPostBuildEventTool"\r
                        />\r
                        <Tool\r
                                Name="VCAppVerifierTool"\r
                        />\r
-                       <Tool\r
-                               Name="VCWebDeploymentTool"\r
-                       />\r
                        <Tool\r
                                Name="VCPostBuildEventTool"\r
                        />\r
                                RelativePath="..\..\..\deflate.c"\r
                                >\r
                        </File>\r
-                       <File\r
-                               RelativePath="..\..\masmx86\gvmat32c.c"\r
-                               >\r
-                               <FileConfiguration\r
-                                       Name="Debug|x64"\r
-                                       ExcludedFromBuild="true"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Debug|Itanium"\r
-                                       ExcludedFromBuild="true"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="ReleaseWithoutAsm|x64"\r
-                                       ExcludedFromBuild="true"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="ReleaseWithoutAsm|Itanium"\r
-                                       ExcludedFromBuild="true"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Release|x64"\r
-                                       ExcludedFromBuild="true"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Release|Itanium"\r
-                                       ExcludedFromBuild="true"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Debug|Win64 (AMD64)"\r
-                                       ExcludedFromBuild="TRUE"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Release|Win64 (AMD64)"\r
-                                       ExcludedFromBuild="TRUE"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="ReleaseAsm|Win64 (AMD64)"\r
-                                       ExcludedFromBuild="TRUE"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                       />\r
-                               </FileConfiguration>\r
-                       </File>\r
                        <File\r
                                RelativePath="..\..\..\infback.c"\r
                                >\r
                                        />\r
                                </FileConfiguration>\r
                                <FileConfiguration\r
-                                       Name="ReleaseWithoutAsm|Win32"\r
+                                       Name="Debug|Itanium"\r
                                        ExcludedFromBuild="true"\r
                                        >\r
                                        <Tool\r
                                        />\r
                                </FileConfiguration>\r
                                <FileConfiguration\r
-                                       Name="Release|Win32"\r
+                                       Name="ReleaseWithoutAsm|Win32"\r
                                        ExcludedFromBuild="true"\r
                                        >\r
                                        <Tool\r
                                        />\r
                                </FileConfiguration>\r
                                <FileConfiguration\r
-                                       Name="Debug|Itanium"\r
+                                       Name="ReleaseWithoutAsm|Itanium"\r
                                        ExcludedFromBuild="true"\r
                                        >\r
                                        <Tool\r
                                        />\r
                                </FileConfiguration>\r
                                <FileConfiguration\r
-                                       Name="ReleaseWithoutAsm|Itanium"\r
+                                       Name="Release|Win32"\r
                                        ExcludedFromBuild="true"\r
                                        >\r
                                        <Tool\r
index 72cb8b4c31e2f867f87526db67cbe95f130db348..23802d86a266b3c35a800f340f09804326b6eb79 100644 (file)
@@ -2,8 +2,8 @@
 \r
 #define IDR_VERSION1  1\r
 IDR_VERSION1   VERSIONINFO     MOVEABLE IMPURE LOADONCALL DISCARDABLE\r
-  FILEVERSION   1,2,3,0\r
-  PRODUCTVERSION 1,2,3,0\r
+  FILEVERSION   1,2,4,0\r
+  PRODUCTVERSION 1,2,4,0\r
   FILEFLAGSMASK        VS_FFI_FILEFLAGSMASK\r
   FILEFLAGS    0\r
   FILEOS       VOS_DOS_WINDOWS32\r
@@ -16,13 +16,13 @@ BEGIN
     //language ID = U.S. English, char set = Windows, Multilingual\r
 \r
     BEGIN\r
-      VALUE "FileDescription", "zlib data compression library\0"\r
-      VALUE "FileVersion",     "1.2.3.0\0"\r
+      VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0"\r
+      VALUE "FileVersion",     "1.2.4.0\0"\r
       VALUE "InternalName",    "zlib\0"\r
       VALUE "OriginalFilename",        "zlib.dll\0"\r
       VALUE "ProductName",     "ZLib.DLL\0"\r
       VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0"\r
-      VALUE "LegalCopyright", "(C) 1995-2003 Jean-loup Gailly & Mark Adler\0"\r
+      VALUE "LegalCopyright", "(C) 1995-2010 Jean-loup Gailly & Mark Adler\0"\r
     END\r
   END\r
   BLOCK "VarFileInfo"\r
index ff9813a7cdc1b0c5a00f3ac51ee3e01ff3101e30..61c76c7c5bc504e0c21d0cea1b7ed462d719702e 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="Windows-1252"?>\r
 <VisualStudioProject\r
        ProjectType="Visual C++"\r
-       Version="9.00"\r
+       Version="9,00"\r
        Name="zlibstat"\r
        ProjectGUID="{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}"\r
        TargetFrameworkVersion="131072"\r
@@ -94,9 +94,9 @@
                        />\r
                </Configuration>\r
                <Configuration\r
-                       Name="Release|Win32"\r
-                       OutputDirectory="x86\ZlibStat$(ConfigurationName)"\r
-                       IntermediateDirectory="x86\ZlibStat$(ConfigurationName)\Tmp"\r
+                       Name="Debug|x64"\r
+                       OutputDirectory="x64\ZlibStat$(ConfigurationName)"\r
+                       IntermediateDirectory="x64\ZlibStat$(ConfigurationName)\Tmp"\r
                        ConfigurationType="4"\r
                        InheritedPropertySheets="UpgradeFromVC70.vsprops"\r
                        UseOfMFC="0"\r
                        />\r
                        <Tool\r
                                Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
                        />\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
-                               InlineFunctionExpansion="1"\r
+                               Optimization="0"\r
                                AdditionalIncludeDirectories="..\..\..;..\..\masmx86"\r
-                               PreprocessorDefinitions="WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ASMV;ASMINF"\r
-                               StringPooling="true"\r
+                               PreprocessorDefinitions="ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64"\r
                                ExceptionHandling="0"\r
-                               RuntimeLibrary="0"\r
+                               RuntimeLibrary="3"\r
                                BufferSecurityCheck="false"\r
-                               EnableFunctionLevelLinking="true"\r
                                PrecompiledHeaderFile="$(IntDir)/zlibstat.pch"\r
                                AssemblerListingLocation="$(IntDir)\"\r
                                ObjectFile="$(IntDir)\"\r
                                ProgramDataBaseFileName="$(OutDir)\"\r
                                WarningLevel="3"\r
                                SuppressStartupBanner="true"\r
+                               Detect64BitPortabilityProblems="true"\r
+                               DebugInformationFormat="1"\r
                        />\r
                        <Tool\r
                                Name="VCManagedResourceCompilerTool"\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               AdditionalOptions="/MACHINE:X86 /NODEFAULTLIB"\r
-                               AdditionalDependencies="..\..\masmx86\gvmat32.obj ..\..\masmx86\inffas32.obj "\r
+                               AdditionalOptions="/MACHINE:AMD64 /NODEFAULTLIB"\r
                                OutputFile="$(OutDir)\zlibstat.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        />\r
                </Configuration>\r
                <Configuration\r
-                       Name="ReleaseWithoutAsm|Win32"\r
-                       OutputDirectory="x86\ZlibStat$(ConfigurationName)"\r
-                       IntermediateDirectory="x86\ZlibStat$(ConfigurationName)\Tmp"\r
+                       Name="Debug|Itanium"\r
+                       OutputDirectory="ia64\ZlibStat$(ConfigurationName)"\r
+                       IntermediateDirectory="ia64\ZlibStat$(ConfigurationName)\Tmp"\r
                        ConfigurationType="4"\r
                        InheritedPropertySheets="UpgradeFromVC70.vsprops"\r
                        UseOfMFC="0"\r
                        />\r
                        <Tool\r
                                Name="VCMIDLTool"\r
+                               TargetEnvironment="2"\r
                        />\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
-                               InlineFunctionExpansion="1"\r
+                               Optimization="0"\r
                                AdditionalIncludeDirectories="..\..\..;..\..\masmx86"\r
-                               PreprocessorDefinitions="WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS"\r
-                               StringPooling="true"\r
+                               PreprocessorDefinitions="ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64"\r
                                ExceptionHandling="0"\r
-                               RuntimeLibrary="0"\r
+                               RuntimeLibrary="3"\r
                                BufferSecurityCheck="false"\r
-                               EnableFunctionLevelLinking="true"\r
                                PrecompiledHeaderFile="$(IntDir)/zlibstat.pch"\r
                                AssemblerListingLocation="$(IntDir)\"\r
                                ObjectFile="$(IntDir)\"\r
                                ProgramDataBaseFileName="$(OutDir)\"\r
                                WarningLevel="3"\r
                                SuppressStartupBanner="true"\r
+                               Detect64BitPortabilityProblems="true"\r
+                               DebugInformationFormat="1"\r
                        />\r
                        <Tool\r
                                Name="VCManagedResourceCompilerTool"\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               AdditionalOptions="/MACHINE:X86 /NODEFAULTLIB"\r
+                               AdditionalOptions="/MACHINE:IA64 /NODEFAULTLIB"\r
                                OutputFile="$(OutDir)\zlibstat.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        />\r
                </Configuration>\r
                <Configuration\r
-                       Name="Debug|x64"\r
-                       OutputDirectory="x64\ZlibStat$(ConfigurationName)"\r
-                       IntermediateDirectory="x64\ZlibStat$(ConfigurationName)\Tmp"\r
+                       Name="Release|Win32"\r
+                       OutputDirectory="x86\ZlibStat$(ConfigurationName)"\r
+                       IntermediateDirectory="x86\ZlibStat$(ConfigurationName)\Tmp"\r
                        ConfigurationType="4"\r
                        InheritedPropertySheets="UpgradeFromVC70.vsprops"\r
                        UseOfMFC="0"\r
                        />\r
                        <Tool\r
                                Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
                        />\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
-                               Optimization="0"\r
+                               InlineFunctionExpansion="1"\r
                                AdditionalIncludeDirectories="..\..\..;..\..\masmx86"\r
-                               PreprocessorDefinitions="ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64"\r
+                               PreprocessorDefinitions="WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ASMV;ASMINF"\r
+                               StringPooling="true"\r
                                ExceptionHandling="0"\r
-                               RuntimeLibrary="3"\r
+                               RuntimeLibrary="0"\r
                                BufferSecurityCheck="false"\r
+                               EnableFunctionLevelLinking="true"\r
                                PrecompiledHeaderFile="$(IntDir)/zlibstat.pch"\r
                                AssemblerListingLocation="$(IntDir)\"\r
                                ObjectFile="$(IntDir)\"\r
                                ProgramDataBaseFileName="$(OutDir)\"\r
                                WarningLevel="3"\r
                                SuppressStartupBanner="true"\r
-                               Detect64BitPortabilityProblems="true"\r
-                               DebugInformationFormat="1"\r
                        />\r
                        <Tool\r
                                Name="VCManagedResourceCompilerTool"\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               AdditionalOptions="/MACHINE:AMD64 /NODEFAULTLIB"\r
+                               AdditionalOptions="/MACHINE:X86 /NODEFAULTLIB"\r
+                               AdditionalDependencies="..\..\masmx86\match686.obj ..\..\masmx86\inffas32.obj "\r
                                OutputFile="$(OutDir)\zlibstat.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        />\r
                </Configuration>\r
                <Configuration\r
-                       Name="Debug|Itanium"\r
-                       OutputDirectory="ia64\ZlibStat$(ConfigurationName)"\r
-                       IntermediateDirectory="ia64\ZlibStat$(ConfigurationName)\Tmp"\r
+                       Name="Release|x64"\r
+                       OutputDirectory="x64\ZlibStat$(ConfigurationName)"\r
+                       IntermediateDirectory="x64\ZlibStat$(ConfigurationName)\Tmp"\r
                        ConfigurationType="4"\r
                        InheritedPropertySheets="UpgradeFromVC70.vsprops"\r
                        UseOfMFC="0"\r
                        />\r
                        <Tool\r
                                Name="VCMIDLTool"\r
-                               TargetEnvironment="2"\r
+                               TargetEnvironment="3"\r
                        />\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
-                               Optimization="0"\r
+                               InlineFunctionExpansion="1"\r
                                AdditionalIncludeDirectories="..\..\..;..\..\masmx86"\r
-                               PreprocessorDefinitions="ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64"\r
+                               PreprocessorDefinitions="ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ASMV;ASMINF;WIN64"\r
+                               StringPooling="true"\r
                                ExceptionHandling="0"\r
-                               RuntimeLibrary="3"\r
+                               RuntimeLibrary="2"\r
                                BufferSecurityCheck="false"\r
+                               EnableFunctionLevelLinking="true"\r
                                PrecompiledHeaderFile="$(IntDir)/zlibstat.pch"\r
                                AssemblerListingLocation="$(IntDir)\"\r
                                ObjectFile="$(IntDir)\"\r
                                ProgramDataBaseFileName="$(OutDir)\"\r
                                WarningLevel="3"\r
                                SuppressStartupBanner="true"\r
-                               Detect64BitPortabilityProblems="true"\r
-                               DebugInformationFormat="1"\r
                        />\r
                        <Tool\r
                                Name="VCManagedResourceCompilerTool"\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               AdditionalOptions="/MACHINE:IA64 /NODEFAULTLIB"\r
+                               AdditionalOptions="/MACHINE:AMD64 /NODEFAULTLIB"\r
+                               AdditionalDependencies="..\..\masmx64\gvmat64.obj ..\..\masmx64\inffasx64.obj "\r
                                OutputFile="$(OutDir)\zlibstat.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        />\r
                </Configuration>\r
                <Configuration\r
-                       Name="Release|x64"\r
-                       OutputDirectory="x64\ZlibStat$(ConfigurationName)"\r
-                       IntermediateDirectory="x64\ZlibStat$(ConfigurationName)\Tmp"\r
+                       Name="Release|Itanium"\r
+                       OutputDirectory="ia64\ZlibStat$(ConfigurationName)"\r
+                       IntermediateDirectory="ia64\ZlibStat$(ConfigurationName)\Tmp"\r
                        ConfigurationType="4"\r
                        InheritedPropertySheets="UpgradeFromVC70.vsprops"\r
                        UseOfMFC="0"\r
                        />\r
                        <Tool\r
                                Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
+                               TargetEnvironment="2"\r
                        />\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
                                InlineFunctionExpansion="1"\r
                                AdditionalIncludeDirectories="..\..\..;..\..\masmx86"\r
-                               PreprocessorDefinitions="ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ASMV;ASMINF;WIN64"\r
+                               PreprocessorDefinitions="ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64"\r
                                StringPooling="true"\r
                                ExceptionHandling="0"\r
                                RuntimeLibrary="2"\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               AdditionalOptions="/MACHINE:AMD64 /NODEFAULTLIB"\r
-                               AdditionalDependencies="..\..\masmx64\gvmat64.obj ..\..\masmx64\inffasx64.obj "\r
+                               AdditionalOptions="/MACHINE:IA64 /NODEFAULTLIB"\r
                                OutputFile="$(OutDir)\zlibstat.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        />\r
                </Configuration>\r
                <Configuration\r
-                       Name="Release|Itanium"\r
-                       OutputDirectory="ia64\ZlibStat$(ConfigurationName)"\r
-                       IntermediateDirectory="ia64\ZlibStat$(ConfigurationName)\Tmp"\r
+                       Name="ReleaseWithoutAsm|Win32"\r
+                       OutputDirectory="x86\ZlibStat$(ConfigurationName)"\r
+                       IntermediateDirectory="x86\ZlibStat$(ConfigurationName)\Tmp"\r
                        ConfigurationType="4"\r
                        InheritedPropertySheets="UpgradeFromVC70.vsprops"\r
                        UseOfMFC="0"\r
                        />\r
                        <Tool\r
                                Name="VCMIDLTool"\r
-                               TargetEnvironment="2"\r
                        />\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
                                InlineFunctionExpansion="1"\r
                                AdditionalIncludeDirectories="..\..\..;..\..\masmx86"\r
-                               PreprocessorDefinitions="ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64"\r
+                               PreprocessorDefinitions="WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS"\r
                                StringPooling="true"\r
                                ExceptionHandling="0"\r
-                               RuntimeLibrary="2"\r
+                               RuntimeLibrary="0"\r
                                BufferSecurityCheck="false"\r
                                EnableFunctionLevelLinking="true"\r
                                PrecompiledHeaderFile="$(IntDir)/zlibstat.pch"\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               AdditionalOptions="/MACHINE:IA64 /NODEFAULTLIB"\r
+                               AdditionalOptions="/MACHINE:X86 /NODEFAULTLIB"\r
                                OutputFile="$(OutDir)\zlibstat.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                                RelativePath="..\..\..\deflate.c"\r
                                >\r
                        </File>\r
-                       <File\r
-                               RelativePath="..\..\masmx86\gvmat32c.c"\r
-                               >\r
-                               <FileConfiguration\r
-                                       Name="Debug|x64"\r
-                                       ExcludedFromBuild="true"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Debug|Itanium"\r
-                                       ExcludedFromBuild="true"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Release|x64"\r
-                                       ExcludedFromBuild="true"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Release|Itanium"\r
-                                       ExcludedFromBuild="true"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="ReleaseWithoutAsm|x64"\r
-                                       ExcludedFromBuild="true"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="ReleaseWithoutAsm|Itanium"\r
-                                       ExcludedFromBuild="true"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                       />\r
-                               </FileConfiguration>\r
-                       </File>\r
                        <File\r
                                RelativePath="..\..\..\gzclose.c"\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath="..\..\..\gzio.c"\r
+                               RelativePath="..\..\..\gzguts.h"\r
                                >\r
                        </File>\r
                        <File\r
                                        />\r
                                </FileConfiguration>\r
                                <FileConfiguration\r
-                                       Name="Release|Win32"\r
+                                       Name="Debug|Itanium"\r
                                        ExcludedFromBuild="true"\r
                                        >\r
                                        <Tool\r
                                        />\r
                                </FileConfiguration>\r
                                <FileConfiguration\r
-                                       Name="ReleaseWithoutAsm|Win32"\r
+                                       Name="Release|Win32"\r
                                        ExcludedFromBuild="true"\r
                                        >\r
                                        <Tool\r
                                        />\r
                                </FileConfiguration>\r
                                <FileConfiguration\r
-                                       Name="Debug|Itanium"\r
+                                       Name="Release|Itanium"\r
                                        ExcludedFromBuild="true"\r
                                        >\r
                                        <Tool\r
                                        />\r
                                </FileConfiguration>\r
                                <FileConfiguration\r
-                                       Name="Release|Itanium"\r
+                                       Name="ReleaseWithoutAsm|Win32"\r
                                        ExcludedFromBuild="true"\r
                                        >\r
                                        <Tool\r
index 0b6a9e9071cec75a201d71245f30af3a5f9e7d53..b3b7caba703b44019bf9caebac139cb160eae857 100644 (file)
@@ -1,7 +1,7 @@
+LIBRARY\r
+; zlib data compression and ZIP file I/O library\r
 \r
-VERSION                1.23\r
-\r
-HEAPSIZE       1048576,8192\r
+VERSION                1.24\r
 \r
 EXPORTS\r
         adler32                                  @1\r
@@ -90,25 +90,47 @@ EXPORTS
         unzGoToFilePos                           @101\r
 \r
         fill_win32_filefunc                      @110\r
-        fill_win32_filefunc64                    @111\r
-        fill_win32_filefunc64A                   @112\r
-        fill_win32_filefunc64W                   @113\r
 \r
-; quick hack by hkuno@microhouse.co.jp\r
-        unzOpen64                         @120\r
-        unzOpen2_64                       @121\r
-        unzGetGlobalInfo64                @122\r
-        unzGetCurrentFileInfo64           @124\r
-        unzGetCurrentFileZStreamPos64     @125\r
-        unztell64                         @126\r
-        unzGetFilePos64                   @127\r
-        unzGoToFilePos64                  @128\r
+; zlibwapi v1.2.4 added:\r
+        fill_win32_filefunc64                   @111\r
+        fill_win32_filefunc64A                  @112\r
+        fill_win32_filefunc64W                  @113\r
+\r
+        unzOpen64                               @120\r
+        unzOpen2_64                             @121\r
+        unzGetGlobalInfo64                      @122\r
+        unzGetCurrentFileInfo64                 @124\r
+        unzGetCurrentFileZStreamPos64           @125\r
+        unztell64                               @126\r
+        unzGetFilePos64                         @127\r
+        unzGoToFilePos64                        @128\r
+\r
+        zipOpen64                               @130\r
+        zipOpen2_64                             @131\r
+        zipOpenNewFileInZip64                   @132\r
+        zipOpenNewFileInZip2_64                 @133\r
+        zipOpenNewFileInZip3_64                 @134\r
+        zipOpenNewFileInZip4_64                 @135\r
+        zipCloseFileInZipRaw64                  @136\r
 \r
-        zipOpen64                         @130\r
-        zipOpen2_64                       @131\r
-        zipOpenNewFileInZip64             @132\r
-        zipOpenNewFileInZip2_64           @133\r
-        zipOpenNewFileInZip3_64           @134\r
-        zipOpenNewFileInZip4_64           @135\r
-        zipCloseFileInZipRaw64            @136\r
-; end hack\r
+; zlib1 v1.2.4 added:\r
+        adler32_combine                         @140\r
+        adler32_combine64                       @141\r
+        crc32_combine                           @142\r
+        crc32_combine64                         @143\r
+        deflateSetHeader                        @144\r
+        deflateTune                             @145\r
+        gzbuffer                                @146\r
+        gzclose_r                               @147\r
+        gzclose_w                               @148\r
+        gzdirect                                @149\r
+        gzoffset                                @150\r
+        gzoffset64                              @151\r
+        gzopen64                                @152\r
+        gzseek64                                @153\r
+        gztell64                                @154\r
+        inflateGetHeader                        @156\r
+        inflateMark                             @157\r
+        inflatePrime                            @158\r
+        inflateReset2                           @159\r
+        inflateUndermine                        @160\r
index c7f1b0b4e21523f8d141ea7fd9e0c81eb7487333..b4829671f62a99d3a39d01a77f8fad86f5b0445c 100644 (file)
@@ -45,8 +45,8 @@ Global
                {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Itanium.Build.0 = Release|Itanium\r
                {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.ActiveCfg = Release|Win32\r
                {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.Build.0 = Release|Win32\r
-               {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.ActiveCfg = ReleaseWithoutAsm|x64\r
-               {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.Build.0 = ReleaseWithoutAsm|x64\r
+               {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.ActiveCfg = Release|x64\r
+               {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.Build.0 = Release|x64\r
                {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Itanium\r
                {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Itanium.Build.0 = ReleaseWithoutAsm|Itanium\r
                {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32\r
@@ -103,8 +103,8 @@ Global
                {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.Build.0 = Release|x64\r
                {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Itanium\r
                {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Itanium.Build.0 = Release|Itanium\r
-               {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Itanium\r
-               {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|Itanium\r
+               {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32\r
+               {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64\r
                {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.ActiveCfg = Debug|Itanium\r
                {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.Build.0 = Debug|Itanium\r
                {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32\r
@@ -119,8 +119,8 @@ Global
                {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64\r
                {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Itanium\r
                {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.Build.0 = Release|Itanium\r
-               {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Itanium\r
-               {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = Release|Itanium\r
+               {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32\r
+               {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64\r
                {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Itanium.ActiveCfg = Debug|Itanium\r
                {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Itanium.Build.0 = Debug|Itanium\r
                {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.ActiveCfg = Debug|Win32\r
@@ -135,8 +135,8 @@ Global
                {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.Build.0 = Release|x64\r
                {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Itanium\r
                {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Itanium.Build.0 = Release|Itanium\r
-               {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Itanium\r
-               {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|Itanium\r
+               {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32\r
+               {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64\r
        EndGlobalSection\r
        GlobalSection(SolutionProperties) = preSolution\r
                HideSolutionNode = FALSE\r
index ee8678689b4a25f25405dbd5ced13aaea7de9cbc..c9a89471e703a529f710b2a1520749ebcaba547e 100644 (file)
@@ -1,9 +1,10 @@
 <?xml version="1.0" encoding="Windows-1252"?>\r
 <VisualStudioProject\r
        ProjectType="Visual C++"\r
-       Version="9.00"\r
+       Version="9,00"\r
        Name="zlibvc"\r
        ProjectGUID="{8FD826F8-3739-44E6-8CC8-997122E53B8D}"\r
+       RootNamespace="zlibvc"\r
        TargetFrameworkVersion="131072"\r
        >\r
        <Platforms>\r
@@ -80,7 +81,7 @@
                        <Tool\r
                                Name="VCLinkerTool"\r
                                AdditionalOptions="/MACHINE:I386"\r
-                               AdditionalDependencies="..\..\masmx86\gvmat32.obj ..\..\masmx86\inffas32.obj"\r
+                               AdditionalDependencies="..\..\masmx86\match686.obj ..\..\masmx86\inffas32.obj"\r
                                OutputFile="$(OutDir)\zlibwapi.dll"\r
                                LinkIncremental="2"\r
                                SuppressStartupBanner="true"\r
                        />\r
                </Configuration>\r
                <Configuration\r
-                       Name="ReleaseWithoutAsm|Win32"\r
-                       OutputDirectory="x86\ZlibDll$(ConfigurationName)"\r
-                       IntermediateDirectory="x86\ZlibDll$(ConfigurationName)\Tmp"\r
+                       Name="Debug|x64"\r
+                       OutputDirectory="x64\ZlibDll$(ConfigurationName)"\r
+                       IntermediateDirectory="x64\ZlibDll$(ConfigurationName)\Tmp"\r
                        ConfigurationType="2"\r
                        InheritedPropertySheets="UpgradeFromVC70.vsprops"\r
                        UseOfMFC="0"\r
                        ATLMinimizesCRunTimeLibraryUsage="false"\r
-                       WholeProgramOptimization="1"\r
                        >\r
                        <Tool\r
                                Name="VCPreBuildEventTool"\r
                        />\r
                        <Tool\r
                                Name="VCMIDLTool"\r
-                               PreprocessorDefinitions="NDEBUG"\r
+                               PreprocessorDefinitions="_DEBUG"\r
                                MkTypLibCompatible="true"\r
                                SuppressStartupBanner="true"\r
-                               TargetEnvironment="1"\r
+                               TargetEnvironment="3"\r
                                TypeLibraryName="$(OutDir)/zlibvc.tlb"\r
                        />\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
-                               InlineFunctionExpansion="1"\r
+                               Optimization="0"\r
                                AdditionalIncludeDirectories="..\..\..;..\..\masmx86"\r
-                               PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI"\r
-                               StringPooling="true"\r
+                               PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;WIN64"\r
                                ExceptionHandling="0"\r
-                               RuntimeLibrary="2"\r
+                               RuntimeLibrary="3"\r
                                BufferSecurityCheck="false"\r
-                               EnableFunctionLevelLinking="true"\r
                                PrecompiledHeaderFile="$(IntDir)/zlibvc.pch"\r
-                               AssemblerOutput="2"\r
                                AssemblerListingLocation="$(IntDir)\"\r
                                ObjectFile="$(IntDir)\"\r
                                ProgramDataBaseFileName="$(OutDir)\"\r
                                BrowseInformation="0"\r
                                WarningLevel="3"\r
                                SuppressStartupBanner="true"\r
+                               DebugInformationFormat="3"\r
                        />\r
                        <Tool\r
                                Name="VCManagedResourceCompilerTool"\r
                        />\r
                        <Tool\r
                                Name="VCResourceCompilerTool"\r
-                               PreprocessorDefinitions="NDEBUG"\r
+                               PreprocessorDefinitions="_DEBUG"\r
                                Culture="1036"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLinkerTool"\r
-                               AdditionalOptions="/MACHINE:I386"\r
+                               AdditionalDependencies="..\..\masmx64\gvmat64.obj ..\..\masmx64\inffasx64.obj "\r
                                OutputFile="$(OutDir)\zlibwapi.dll"\r
-                               LinkIncremental="1"\r
+                               LinkIncremental="2"\r
                                SuppressStartupBanner="true"\r
                                GenerateManifest="false"\r
-                               IgnoreAllDefaultLibraries="false"\r
                                ModuleDefinitionFile=".\zlibvc.def"\r
+                               GenerateDebugInformation="true"\r
                                ProgramDatabaseFile="$(OutDir)/zlibwapi.pdb"\r
                                GenerateMapFile="true"\r
                                MapFileName="$(OutDir)/zlibwapi.map"\r
                                SubSystem="2"\r
-                               OptimizeForWindows98="1"\r
-                               RandomizedBaseAddress="1"\r
-                               DataExecutionPrevention="0"\r
                                ImportLibrary="$(OutDir)/zlibwapi.lib"\r
+                               TargetMachine="17"\r
                        />\r
                        <Tool\r
                                Name="VCALinkTool"\r
                        />\r
                </Configuration>\r
                <Configuration\r
-                       Name="Release|Win32"\r
-                       OutputDirectory="x86\ZlibDll$(ConfigurationName)"\r
-                       IntermediateDirectory="x86\ZlibDll$(ConfigurationName)\Tmp"\r
+                       Name="Debug|Itanium"\r
+                       OutputDirectory="ia64\ZlibDll$(ConfigurationName)"\r
+                       IntermediateDirectory="ia64\ZlibDll$(ConfigurationName)\Tmp"\r
                        ConfigurationType="2"\r
                        InheritedPropertySheets="UpgradeFromVC70.vsprops"\r
                        UseOfMFC="0"\r
                        ATLMinimizesCRunTimeLibraryUsage="false"\r
-                       WholeProgramOptimization="1"\r
                        >\r
                        <Tool\r
                                Name="VCPreBuildEventTool"\r
                        />\r
                        <Tool\r
                                Name="VCMIDLTool"\r
-                               PreprocessorDefinitions="NDEBUG"\r
+                               PreprocessorDefinitions="_DEBUG"\r
                                MkTypLibCompatible="true"\r
                                SuppressStartupBanner="true"\r
-                               TargetEnvironment="1"\r
+                               TargetEnvironment="2"\r
                                TypeLibraryName="$(OutDir)/zlibvc.tlb"\r
                        />\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
-                               InlineFunctionExpansion="1"\r
+                               Optimization="0"\r
                                AdditionalIncludeDirectories="..\..\..;..\..\masmx86"\r
-                               PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF"\r
-                               StringPooling="true"\r
+                               PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64"\r
                                ExceptionHandling="0"\r
-                               RuntimeLibrary="2"\r
+                               RuntimeLibrary="3"\r
                                BufferSecurityCheck="false"\r
-                               EnableFunctionLevelLinking="true"\r
                                PrecompiledHeaderFile="$(IntDir)/zlibvc.pch"\r
-                               AssemblerOutput="2"\r
                                AssemblerListingLocation="$(IntDir)\"\r
                                ObjectFile="$(IntDir)\"\r
                                ProgramDataBaseFileName="$(OutDir)\"\r
                                BrowseInformation="0"\r
                                WarningLevel="3"\r
                                SuppressStartupBanner="true"\r
+                               DebugInformationFormat="3"\r
                        />\r
                        <Tool\r
                                Name="VCManagedResourceCompilerTool"\r
                        />\r
                        <Tool\r
                                Name="VCResourceCompilerTool"\r
-                               PreprocessorDefinitions="NDEBUG"\r
+                               PreprocessorDefinitions="_DEBUG"\r
                                Culture="1036"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLinkerTool"\r
-                               AdditionalOptions="/MACHINE:I386"\r
-                               AdditionalDependencies="..\..\masmx86\gvmat32.obj ..\..\masmx86\inffas32.obj "\r
                                OutputFile="$(OutDir)\zlibwapi.dll"\r
-                               LinkIncremental="1"\r
+                               LinkIncremental="2"\r
                                SuppressStartupBanner="true"\r
                                GenerateManifest="false"\r
-                               IgnoreAllDefaultLibraries="false"\r
                                ModuleDefinitionFile=".\zlibvc.def"\r
+                               GenerateDebugInformation="true"\r
                                ProgramDatabaseFile="$(OutDir)/zlibwapi.pdb"\r
                                GenerateMapFile="true"\r
                                MapFileName="$(OutDir)/zlibwapi.map"\r
                                SubSystem="2"\r
-                               OptimizeForWindows98="1"\r
-                               RandomizedBaseAddress="1"\r
-                               DataExecutionPrevention="0"\r
                                ImportLibrary="$(OutDir)/zlibwapi.lib"\r
+                               TargetMachine="5"\r
                        />\r
                        <Tool\r
                                Name="VCALinkTool"\r
                        />\r
                </Configuration>\r
                <Configuration\r
-                       Name="Debug|x64"\r
-                       OutputDirectory="x64\ZlibDll$(ConfigurationName)"\r
-                       IntermediateDirectory="x64\ZlibDll$(ConfigurationName)\Tmp"\r
+                       Name="ReleaseWithoutAsm|Win32"\r
+                       OutputDirectory="x86\ZlibDll$(ConfigurationName)"\r
+                       IntermediateDirectory="x86\ZlibDll$(ConfigurationName)\Tmp"\r
                        ConfigurationType="2"\r
                        InheritedPropertySheets="UpgradeFromVC70.vsprops"\r
                        UseOfMFC="0"\r
                        ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       WholeProgramOptimization="1"\r
                        >\r
                        <Tool\r
                                Name="VCPreBuildEventTool"\r
                        />\r
                        <Tool\r
                                Name="VCMIDLTool"\r
-                               PreprocessorDefinitions="_DEBUG"\r
+                               PreprocessorDefinitions="NDEBUG"\r
                                MkTypLibCompatible="true"\r
                                SuppressStartupBanner="true"\r
-                               TargetEnvironment="3"\r
+                               TargetEnvironment="1"\r
                                TypeLibraryName="$(OutDir)/zlibvc.tlb"\r
                        />\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
-                               Optimization="0"\r
+                               InlineFunctionExpansion="1"\r
                                AdditionalIncludeDirectories="..\..\..;..\..\masmx86"\r
-                               PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;WIN64"\r
+                               PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI"\r
+                               StringPooling="true"\r
                                ExceptionHandling="0"\r
-                               RuntimeLibrary="3"\r
+                               RuntimeLibrary="2"\r
                                BufferSecurityCheck="false"\r
+                               EnableFunctionLevelLinking="true"\r
                                PrecompiledHeaderFile="$(IntDir)/zlibvc.pch"\r
+                               AssemblerOutput="2"\r
                                AssemblerListingLocation="$(IntDir)\"\r
                                ObjectFile="$(IntDir)\"\r
                                ProgramDataBaseFileName="$(OutDir)\"\r
                                BrowseInformation="0"\r
                                WarningLevel="3"\r
                                SuppressStartupBanner="true"\r
-                               DebugInformationFormat="3"\r
                        />\r
                        <Tool\r
                                Name="VCManagedResourceCompilerTool"\r
                        />\r
                        <Tool\r
                                Name="VCResourceCompilerTool"\r
-                               PreprocessorDefinitions="_DEBUG"\r
+                               PreprocessorDefinitions="NDEBUG"\r
                                Culture="1036"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLinkerTool"\r
-                               AdditionalDependencies="..\..\masmx64\gvmat64.obj ..\..\masmx64\inffasx64.obj "\r
+                               AdditionalOptions="/MACHINE:I386"\r
                                OutputFile="$(OutDir)\zlibwapi.dll"\r
-                               LinkIncremental="2"\r
+                               LinkIncremental="1"\r
                                SuppressStartupBanner="true"\r
                                GenerateManifest="false"\r
+                               IgnoreAllDefaultLibraries="false"\r
                                ModuleDefinitionFile=".\zlibvc.def"\r
-                               GenerateDebugInformation="true"\r
                                ProgramDatabaseFile="$(OutDir)/zlibwapi.pdb"\r
                                GenerateMapFile="true"\r
                                MapFileName="$(OutDir)/zlibwapi.map"\r
                                SubSystem="2"\r
+                               OptimizeForWindows98="1"\r
+                               RandomizedBaseAddress="1"\r
+                               DataExecutionPrevention="0"\r
                                ImportLibrary="$(OutDir)/zlibwapi.lib"\r
-                               TargetMachine="17"\r
                        />\r
                        <Tool\r
                                Name="VCALinkTool"\r
                        <Tool\r
                                Name="VCAppVerifierTool"\r
                        />\r
-                       <Tool\r
-                               Name="VCWebDeploymentTool"\r
-                       />\r
                        <Tool\r
                                Name="VCPostBuildEventTool"\r
                        />\r
                </Configuration>\r
                <Configuration\r
-                       Name="Debug|Itanium"\r
-                       OutputDirectory="ia64\ZlibDll$(ConfigurationName)"\r
-                       IntermediateDirectory="ia64\ZlibDll$(ConfigurationName)\Tmp"\r
+                       Name="ReleaseWithoutAsm|x64"\r
+                       OutputDirectory="x64\ZlibDll$(ConfigurationName)"\r
+                       IntermediateDirectory="x64\ZlibDll$(ConfigurationName)\Tmp"\r
                        ConfigurationType="2"\r
                        InheritedPropertySheets="UpgradeFromVC70.vsprops"\r
                        UseOfMFC="0"\r
                        ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       WholeProgramOptimization="1"\r
                        >\r
                        <Tool\r
                                Name="VCPreBuildEventTool"\r
                        />\r
                        <Tool\r
                                Name="VCMIDLTool"\r
-                               PreprocessorDefinitions="_DEBUG"\r
+                               PreprocessorDefinitions="NDEBUG"\r
                                MkTypLibCompatible="true"\r
                                SuppressStartupBanner="true"\r
-                               TargetEnvironment="2"\r
+                               TargetEnvironment="3"\r
                                TypeLibraryName="$(OutDir)/zlibvc.tlb"\r
                        />\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
-                               Optimization="0"\r
+                               InlineFunctionExpansion="1"\r
                                AdditionalIncludeDirectories="..\..\..;..\..\masmx86"\r
                                PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64"\r
+                               StringPooling="true"\r
                                ExceptionHandling="0"\r
-                               RuntimeLibrary="3"\r
+                               RuntimeLibrary="2"\r
                                BufferSecurityCheck="false"\r
+                               EnableFunctionLevelLinking="true"\r
                                PrecompiledHeaderFile="$(IntDir)/zlibvc.pch"\r
+                               AssemblerOutput="2"\r
                                AssemblerListingLocation="$(IntDir)\"\r
                                ObjectFile="$(IntDir)\"\r
                                ProgramDataBaseFileName="$(OutDir)\"\r
                                BrowseInformation="0"\r
                                WarningLevel="3"\r
                                SuppressStartupBanner="true"\r
-                               DebugInformationFormat="3"\r
                        />\r
                        <Tool\r
                                Name="VCManagedResourceCompilerTool"\r
                        />\r
                        <Tool\r
                                Name="VCResourceCompilerTool"\r
-                               PreprocessorDefinitions="_DEBUG"\r
+                               PreprocessorDefinitions="NDEBUG"\r
                                Culture="1036"\r
                        />\r
                        <Tool\r
                        <Tool\r
                                Name="VCLinkerTool"\r
                                OutputFile="$(OutDir)\zlibwapi.dll"\r
-                               LinkIncremental="2"\r
+                               LinkIncremental="1"\r
                                SuppressStartupBanner="true"\r
                                GenerateManifest="false"\r
+                               IgnoreAllDefaultLibraries="false"\r
                                ModuleDefinitionFile=".\zlibvc.def"\r
-                               GenerateDebugInformation="true"\r
                                ProgramDatabaseFile="$(OutDir)/zlibwapi.pdb"\r
                                GenerateMapFile="true"\r
                                MapFileName="$(OutDir)/zlibwapi.map"\r
                                SubSystem="2"\r
+                               OptimizeForWindows98="1"\r
                                ImportLibrary="$(OutDir)/zlibwapi.lib"\r
-                               TargetMachine="5"\r
+                               TargetMachine="17"\r
                        />\r
                        <Tool\r
                                Name="VCALinkTool"\r
                        <Tool\r
                                Name="VCAppVerifierTool"\r
                        />\r
-                       <Tool\r
-                               Name="VCWebDeploymentTool"\r
-                       />\r
                        <Tool\r
                                Name="VCPostBuildEventTool"\r
                        />\r
                </Configuration>\r
                <Configuration\r
-                       Name="ReleaseWithoutAsm|x64"\r
-                       OutputDirectory="x64\ZlibDll$(ConfigurationName)"\r
-                       IntermediateDirectory="x64\ZlibDll$(ConfigurationName)\Tmp"\r
+                       Name="ReleaseWithoutAsm|Itanium"\r
+                       OutputDirectory="ia64\ZlibDll$(ConfigurationName)"\r
+                       IntermediateDirectory="ia64\ZlibDll$(ConfigurationName)\Tmp"\r
                        ConfigurationType="2"\r
                        InheritedPropertySheets="UpgradeFromVC70.vsprops"\r
                        UseOfMFC="0"\r
                                PreprocessorDefinitions="NDEBUG"\r
                                MkTypLibCompatible="true"\r
                                SuppressStartupBanner="true"\r
-                               TargetEnvironment="3"\r
+                               TargetEnvironment="2"\r
                                TypeLibraryName="$(OutDir)/zlibvc.tlb"\r
                        />\r
                        <Tool\r
                                SubSystem="2"\r
                                OptimizeForWindows98="1"\r
                                ImportLibrary="$(OutDir)/zlibwapi.lib"\r
-                               TargetMachine="17"\r
+                               TargetMachine="5"\r
                        />\r
                        <Tool\r
                                Name="VCALinkTool"\r
                        <Tool\r
                                Name="VCAppVerifierTool"\r
                        />\r
-                       <Tool\r
-                               Name="VCWebDeploymentTool"\r
-                       />\r
                        <Tool\r
                                Name="VCPostBuildEventTool"\r
                        />\r
                </Configuration>\r
                <Configuration\r
-                       Name="ReleaseWithoutAsm|Itanium"\r
-                       OutputDirectory="ia64\ZlibDll$(ConfigurationName)"\r
-                       IntermediateDirectory="ia64\ZlibDll$(ConfigurationName)\Tmp"\r
+                       Name="Release|Win32"\r
+                       OutputDirectory="x86\ZlibDll$(ConfigurationName)"\r
+                       IntermediateDirectory="x86\ZlibDll$(ConfigurationName)\Tmp"\r
                        ConfigurationType="2"\r
                        InheritedPropertySheets="UpgradeFromVC70.vsprops"\r
                        UseOfMFC="0"\r
                                PreprocessorDefinitions="NDEBUG"\r
                                MkTypLibCompatible="true"\r
                                SuppressStartupBanner="true"\r
-                               TargetEnvironment="2"\r
+                               TargetEnvironment="1"\r
                                TypeLibraryName="$(OutDir)/zlibvc.tlb"\r
                        />\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
                                InlineFunctionExpansion="1"\r
                                AdditionalIncludeDirectories="..\..\..;..\..\masmx86"\r
-                               PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64"\r
+                               PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF"\r
                                StringPooling="true"\r
                                ExceptionHandling="0"\r
-                               RuntimeLibrary="2"\r
+                               RuntimeLibrary="0"\r
                                BufferSecurityCheck="false"\r
                                EnableFunctionLevelLinking="true"\r
                                PrecompiledHeaderFile="$(IntDir)/zlibvc.pch"\r
                        />\r
                        <Tool\r
                                Name="VCLinkerTool"\r
+                               AdditionalOptions="/MACHINE:I386"\r
+                               AdditionalDependencies="..\..\masmx86\match686.obj ..\..\masmx86\inffas32.obj "\r
                                OutputFile="$(OutDir)\zlibwapi.dll"\r
                                LinkIncremental="1"\r
                                SuppressStartupBanner="true"\r
                                MapFileName="$(OutDir)/zlibwapi.map"\r
                                SubSystem="2"\r
                                OptimizeForWindows98="1"\r
+                               RandomizedBaseAddress="1"\r
+                               DataExecutionPrevention="0"\r
                                ImportLibrary="$(OutDir)/zlibwapi.lib"\r
-                               TargetMachine="5"\r
                        />\r
                        <Tool\r
                                Name="VCALinkTool"\r
                        <Tool\r
                                Name="VCAppVerifierTool"\r
                        />\r
-                       <Tool\r
-                               Name="VCWebDeploymentTool"\r
-                       />\r
                        <Tool\r
                                Name="VCPostBuildEventTool"\r
                        />\r
                        <Tool\r
                                Name="VCAppVerifierTool"\r
                        />\r
-                       <Tool\r
-                               Name="VCWebDeploymentTool"\r
-                       />\r
                        <Tool\r
                                Name="VCPostBuildEventTool"\r
                        />\r
                        <Tool\r
                                Name="VCAppVerifierTool"\r
                        />\r
-                       <Tool\r
-                               Name="VCWebDeploymentTool"\r
-                       />\r
                        <Tool\r
                                Name="VCPostBuildEventTool"\r
                        />\r
                                RelativePath="..\..\..\deflate.c"\r
                                >\r
                        </File>\r
-                       <File\r
-                               RelativePath="..\..\masmx86\gvmat32c.c"\r
-                               >\r
-                               <FileConfiguration\r
-                                       Name="ReleaseWithoutAsm|Win32"\r
-                                       ExcludedFromBuild="true"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Debug|x64"\r
-                                       ExcludedFromBuild="true"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Debug|Itanium"\r
-                                       ExcludedFromBuild="true"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="ReleaseWithoutAsm|x64"\r
-                                       ExcludedFromBuild="true"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="ReleaseWithoutAsm|Itanium"\r
-                                       ExcludedFromBuild="true"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Release|x64"\r
-                                       ExcludedFromBuild="true"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Release|Itanium"\r
-                                       ExcludedFromBuild="true"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                       />\r
-                               </FileConfiguration>\r
-                       </File>\r
                        <File\r
                                RelativePath="..\..\..\gzclose.c"\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath="..\..\..\gzio.c"\r
+                               RelativePath="..\..\..\gzguts.h"\r
                                >\r
                        </File>\r
                        <File\r
                                        />\r
                                </FileConfiguration>\r
                                <FileConfiguration\r
-                                       Name="ReleaseWithoutAsm|Win32"\r
+                                       Name="Debug|Itanium"\r
                                        ExcludedFromBuild="true"\r
                                        >\r
                                        <Tool\r
                                        />\r
                                </FileConfiguration>\r
                                <FileConfiguration\r
-                                       Name="Release|Win32"\r
+                                       Name="ReleaseWithoutAsm|Win32"\r
                                        ExcludedFromBuild="true"\r
                                        >\r
                                        <Tool\r
                                        />\r
                                </FileConfiguration>\r
                                <FileConfiguration\r
-                                       Name="Debug|Itanium"\r
+                                       Name="ReleaseWithoutAsm|Itanium"\r
                                        ExcludedFromBuild="true"\r
                                        >\r
                                        <Tool\r
                                        />\r
                                </FileConfiguration>\r
                                <FileConfiguration\r
-                                       Name="ReleaseWithoutAsm|Itanium"\r
+                                       Name="Release|Win32"\r
                                        ExcludedFromBuild="true"\r
                                        >\r
                                        <Tool\r
index 414a67afa4ee99d1bc6a4eb8cf41864f84a1e362..fcd698cc62f872e6369e2d20d8cf08aaa92a4051 100644 (file)
--- a/deflate.c
+++ b/deflate.c
@@ -52,7 +52,7 @@
 #include "deflate.h"
 
 const char deflate_copyright[] =
-   " deflate 1.2.3.9 Copyright 1995-2010 Jean-loup Gailly and Mark Adler ";
+   " deflate 1.2.4 Copyright 1995-2010 Jean-loup Gailly and 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
@@ -1433,21 +1433,21 @@ local void fill_window(s)
  * Flush the current block, with given end-of-file flag.
  * IN assertion: strstart is set to the end of the current match.
  */
-#define FLUSH_BLOCK_ONLY(s, eof) { \
+#define FLUSH_BLOCK_ONLY(s, last) { \
    _tr_flush_block(s, (s->block_start >= 0L ? \
                    (charf *)&s->window[(unsigned)s->block_start] : \
                    (charf *)Z_NULL), \
                 (ulg)((long)s->strstart - s->block_start), \
-                (eof)); \
+                (last)); \
    s->block_start = s->strstart; \
    flush_pending(s->strm); \
    Tracev((stderr,"[FLUSH]")); \
 }
 
 /* Same but force premature exit if necessary. */
-#define FLUSH_BLOCK(s, eof) { \
-   FLUSH_BLOCK_ONLY(s, eof); \
-   if (s->strm->avail_out == 0) return (eof) ? finish_started : need_more; \
+#define FLUSH_BLOCK(s, last) { \
+   FLUSH_BLOCK_ONLY(s, last); \
+   if (s->strm->avail_out == 0) return (last) ? finish_started : need_more; \
 }
 
 /* ===========================================================================
index f1df04cd5439e5dc549a06b6b8c7165f429011e0..f53deba852b310183b9514a2dddfd1fafd2b8062 100644 (file)
--- a/deflate.h
+++ b/deflate.h
@@ -293,10 +293,10 @@ typedef struct internal_state {
 void _tr_init         OF((deflate_state *s));
 int  _tr_tally        OF((deflate_state *s, unsigned dist, unsigned lc));
 void _tr_flush_block  OF((deflate_state *s, charf *buf, ulg stored_len,
-                          int eof));
+                          int last));
 void _tr_align        OF((deflate_state *s));
 void _tr_stored_block OF((deflate_state *s, charf *buf, ulg stored_len,
-                          int eof));
+                          int last));
 
 #define d_code(dist) \
    ((dist) < 256 ? _dist_code[dist] : _dist_code[256+((dist)>>7)])
diff --git a/gzlib.c b/gzlib.c
index 03240b1133ccfd2ceb77f0fefb7207fae9c15b78..6fdb08a81453fe1f2a229882863b1d292d9af706 100644 (file)
--- a/gzlib.c
+++ b/gzlib.c
@@ -147,6 +147,14 @@ local gzFile gz_open(path, fd, mode)
         return NULL;
     }
 
+    /* save the path name for error messages */
+    state->path = malloc(strlen(path) + 1);
+    if (state->path == NULL) {
+        free(state);
+        return NULL;
+    }
+    strcpy(state->path, path);
+
     /* open the file with the appropriate mode (or just use fd) */
     state->fd = fd != -1 ? fd :
         open(path,
@@ -170,14 +178,6 @@ local gzFile gz_open(path, fd, mode)
     if (state->mode == GZ_APPEND)
         state->mode = GZ_WRITE;         /* simplify later checks */
 
-    /* save the path name for error messages */
-    state->path = malloc(strlen(path) + 1);
-    if (state->path == NULL) {
-        free(state);
-        return NULL;
-    }
-    strcpy(state->path, path);
-
     /* save the current position for rewinding (only if reading) */
     if (state->mode == GZ_READ) {
         state->start = LSEEK(state->fd, 0, SEEK_CUR);
@@ -450,7 +450,8 @@ const char * ZEXPORT gzerror(file, errnum)
         return NULL;
 
     /* return error information */
-    *errnum = state->err;
+    if (errnum != NULL)
+        *errnum = state->err;
     return state->msg == NULL ? "" : state->msg;
 }
 
index 7f68055040339116eeacc5b88c64f47a51c9b9db..434ef023e0a78a523642324ad0a851a37a82dd95 100644 (file)
--- a/gzread.c
+++ b/gzread.c
@@ -645,6 +645,7 @@ int ZEXPORT gzclose_r(file)
         free(state->in);
     }
     gz_error(state, Z_OK, NULL);
+    free(state->path);
     ret = close(state->fd);
     free(state);
     return ret ? Z_ERRNO : Z_OK;
index 844312a0c3ed5d979d25b1ba6d49b3528a74b321..427840d91cdd2750a2b1d3e85ab7c2791dd338e1 100644 (file)
--- a/gzwrite.c
+++ b/gzwrite.c
@@ -523,8 +523,9 @@ int ZEXPORT gzclose_w(file)
     (void)deflateEnd(&(state->strm));
     free(state->out);
     free(state->in);
-    ret += close(state->fd);
     gz_error(state, Z_OK, NULL);
+    free(state->path);
+    ret += close(state->fd);
     free(state);
     return ret ? Z_ERRNO : Z_OK;
 }
index b7667998afa0797f1b754890f3a1733502c2c269..3ee7d06367f9f9411fa9b0e10d6d12ca320a8a99 100644 (file)
@@ -9,7 +9,7 @@
 #define MAXBITS 15
 
 const char inflate_copyright[] =
-   " inflate 1.2.3.9 Copyright 1995-2010 Mark Adler ";
+   " inflate 1.2.4 Copyright 1995-2010 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
@@ -62,7 +62,7 @@ unsigned short FAR *work;
         35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0};
     static const unsigned short lext[31] = { /* Length codes 257..285 extra */
         16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,
-        19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 193, 201};
+        19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 66, 199};
     static const unsigned short dbase[32] = { /* Distance codes 0..29 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, 4097, 6145,
index f35a48fc657b71143557b3773efb81242dc2ec17..deee87f31594b58cfc78b09c9189052546432a37 100644 (file)
@@ -13,8 +13,10 @@ $! 0.01 20060120 First version to receive a number
 $! 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
 $!
 $ on error then goto err_exit
+$ set proc/parse=ext
 $!
 $ true  = 1
 $ false = 0
@@ -38,7 +40,7 @@ $ v_file   = "zlib.h"
 $ ccopt   = ""
 $ lopts   = ""
 $ dnsrl   = ""
-$ aconf_in_file = "config.hin"
+$ aconf_in_file = "zconf.h.in#zconf.h_in"
 $ conf_check_string = ""
 $ linkonly = false
 $ optfile  = name + ".opt"
@@ -104,13 +106,16 @@ $   i = i + 1
 $   goto find_aconf
 $ endif
 $ open/read/err=aconf_err aconf_in 'fname'
-$ open/write aconf zlibdefs.h
+$ open/write aconf zconf.h
 $ACONF_LOOP:
 $ read/end_of_file=aconf_exit aconf_in line
 $ work = f$edit(line, "compress,trim")
 $ if f$extract(0,6,work) .nes. "#undef"
 $ then
-$   write aconf line
+$   if f$extract(0,12,work) .nes. "#cmakedefine"
+$   then
+$       write aconf line
+$   endif
 $ else
 $   cdef = f$element(1," ",work)
 $   gosub check_config
index 9d18266e241866b68aaa2e6c9470845a8494cf41..84d823b72f9c4ec04c9f7fbed89dc76be585d9ad 100644 (file)
@@ -262,6 +262,11 @@ void file_compress(file, mode)
     FILE  *in;
     gzFile out;
 
+    if (strlen(file) + strlen(GZ_SUFFIX) >= sizeof(outfile)) {
+        fprintf(stderr, "%s: filename too long\n", prog);
+        exit(1);
+    }
+
     strcpy(outfile, file);
     strcat(outfile, GZ_SUFFIX);
 
@@ -291,7 +296,12 @@ void file_uncompress(file)
     char *infile, *outfile;
     FILE  *out;
     gzFile in;
-    uInt len = (uInt)strlen(file);
+    size_t len = strlen(file);
+
+    if (len + strlen(GZ_SUFFIX) >= sizeof(buf)) {
+        fprintf(stderr, "%s: filename too long\n", prog);
+        exit(1);
+    }
 
     strcpy(buf, file);
 
@@ -322,7 +332,8 @@ void file_uncompress(file)
 
 
 /* ===========================================================================
- * Usage:  minigzip [-d] [-f] [-h] [-r] [-1 to -9] [files...]
+ * Usage:  minigzip [-c] [-d] [-f] [-h] [-r] [-1 to -9] [files...]
+ *   -c : write to standard output
  *   -d : decompress
  *   -f : compress with Z_FILTERED
  *   -h : compress with Z_HUFFMAN_ONLY
@@ -334,17 +345,30 @@ int main(argc, argv)
     int argc;
     char *argv[];
 {
+    int copyout = 0;
     int uncompr = 0;
     gzFile file;
-    char outmode[20];
+    char *bname, outmode[20];
 
     strcpy(outmode, "wb6 ");
 
     prog = argv[0];
+    bname = strrchr(argv[0], '/');
+    if (bname)
+      bname++;
+    else
+      bname = argv[0];
     argc--, argv++;
 
+    if (!strcmp(bname, "gunzip"))
+      uncompr = 1;
+    else if (!strcmp(bname, "zcat"))
+      copyout = uncompr = 1;
+
     while (argc > 0) {
-      if (strcmp(*argv, "-d") == 0)
+      if (strcmp(*argv, "-c") == 0)
+        copyout = 1;
+      else if (strcmp(*argv, "-d") == 0)
         uncompr = 1;
       else if (strcmp(*argv, "-f") == 0)
         outmode[3] = 'f';
@@ -374,11 +398,36 @@ int main(argc, argv)
             gz_compress(stdin, file);
         }
     } else {
+        if (copyout) {
+            SET_BINARY_MODE(stdout);
+        }
         do {
             if (uncompr) {
-                file_uncompress(*argv);
+                if (copyout) {
+                    file = gzopen(*argv, "rb");
+                    if (file == NULL)
+                        fprintf(stderr, "%s: can't gzopen %s\n", prog, *argv);
+                    else
+                        gz_uncompress(file, stdout);
+                } else {
+                    file_uncompress(*argv);
+                }
             } else {
-                file_compress(*argv, outmode);
+                if (copyout) {
+                    FILE * in = fopen(*argv, "rb");
+
+                    if (in == NULL) {
+                        perror(*argv);
+                    } else {
+                        file = gzdopen(fileno(stdout), outmode);
+                        if (file == NULL) error("can't gzdopen stdout");
+
+                        gz_compress(in, file);
+                    }
+
+                } else {
+                    file_compress(*argv, outmode);
+                }
             }
         } while (argv++, --argc);
     }
index fea73cc6696b3858c8fe00508493925e5f987328..470d2d5315fcc210249d400f63b10fb870953769 100644 (file)
       <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.3.9" 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.3.9"/>
-         <QPG:Add file="libz.so.1" install="/opt/lib/" filetype="symlink" linkto="libz.so.1.2.3.9"/>
-         <QPG:Add file="../libz.so.1.2.3.9" install="/opt/lib/" component="slib"/>
+         <QPG:Add file="../libz.so.1.2.4" 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.4"/>
+         <QPG:Add file="libz.so.1" install="/opt/lib/" filetype="symlink" linkto="libz.so.1.2.4"/>
+         <QPG:Add file="../libz.so.1.2.4" install="/opt/lib/" component="slib"/>
       </QPG:Files>
 
       <QPG:PackageFilter>
@@ -63,7 +63,7 @@
             </QPM:ProductDescription>
 
             <QPM:ReleaseDescription>
-               <QPM:ReleaseVersion>1.2.3.9</QPM:ReleaseVersion>
+               <QPM:ReleaseVersion>1.2.4</QPM:ReleaseVersion>
                <QPM:ReleaseUrgency>Medium</QPM:ReleaseUrgency>
                <QPM:ReleaseStability>Stable</QPM:ReleaseStability>
                <QPM:ReleaseNoteMinor></QPM:ReleaseNoteMinor>
index f81b449503af5e827365691856337e3bfe8351b8..91ee8912ef34f17603d2658018c2c8065660d626 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0" ?>
-<package name="zlib" version="1.2.3">
-    <library name="zlib" dlversion="1.2.3" dlname="z">
+<package name="zlib" version="1.2.4">
+    <library name="zlib" dlversion="1.2.4" dlname="z">
        <property name="description"> zip compression library </property>
        <property name="include-target-dir" value="$(@PACKAGE/install-includedir)" />
 
diff --git a/trees.c b/trees.c
index aa599a54c8e2041c26dbca47a862da2e58e36912..1a6e997ac0a859f99050303063e4208a18fb8946 100644 (file)
--- a/trees.c
+++ b/trees.c
@@ -867,13 +867,13 @@ local void send_all_trees(s, lcodes, dcodes, blcodes)
 /* ===========================================================================
  * Send a stored block
  */
-void _tr_stored_block(s, buf, stored_len, eof)
+void _tr_stored_block(s, buf, stored_len, last)
     deflate_state *s;
     charf *buf;       /* input block */
     ulg stored_len;   /* length of input block */
-    int eof;          /* true if this is the last block for a file */
+    int last;         /* one if this is the last block for a file */
 {
-    send_bits(s, (STORED_BLOCK<<1)+eof, 3);  /* send block type */
+    send_bits(s, (STORED_BLOCK<<1)+last, 3);    /* send block type */
 #ifdef DEBUG
     s->compressed_len = (s->compressed_len + 3 + 7) & (ulg)~7L;
     s->compressed_len += (stored_len + 4) << 3;
@@ -921,11 +921,11 @@ void _tr_align(s)
  * Determine the best encoding for the current block: dynamic trees, static
  * trees or store, and output the encoded block to the zip file.
  */
-void _tr_flush_block(s, buf, stored_len, eof)
+void _tr_flush_block(s, buf, stored_len, last)
     deflate_state *s;
     charf *buf;       /* input block, or NULL if too old */
     ulg stored_len;   /* length of input block */
-    int eof;          /* true if this is the last block for a file */
+    int last;         /* one if this is the last block for a file */
 {
     ulg opt_lenb, static_lenb; /* opt_len and static_len in bytes */
     int max_blindex = 0;  /* index of last bit length code of non zero freq */
@@ -981,20 +981,20 @@ void _tr_flush_block(s, buf, stored_len, eof)
          * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to
          * transform a block into a stored block.
          */
-        _tr_stored_block(s, buf, stored_len, eof);
+        _tr_stored_block(s, buf, stored_len, last);
 
 #ifdef FORCE_STATIC
     } else if (static_lenb >= 0) { /* force static trees */
 #else
     } else if (s->strategy == Z_FIXED || static_lenb == opt_lenb) {
 #endif
-        send_bits(s, (STATIC_TREES<<1)+eof, 3);
+        send_bits(s, (STATIC_TREES<<1)+last, 3);
         compress_block(s, (ct_data *)static_ltree, (ct_data *)static_dtree);
 #ifdef DEBUG
         s->compressed_len += 3 + s->static_len;
 #endif
     } else {
-        send_bits(s, (DYN_TREES<<1)+eof, 3);
+        send_bits(s, (DYN_TREES<<1)+last, 3);
         send_all_trees(s, s->l_desc.max_code+1, s->d_desc.max_code+1,
                        max_blindex+1);
         compress_block(s, (ct_data *)s->dyn_ltree, (ct_data *)s->dyn_dtree);
@@ -1008,14 +1008,14 @@ void _tr_flush_block(s, buf, stored_len, eof)
      */
     init_block(s);
 
-    if (eof) {
+    if (last) {
         bi_windup(s);
 #ifdef DEBUG
         s->compressed_len += 7;  /* align on byte boundary */
 #endif
     }
     Tracev((stderr,"\ncomprlen %lu(%lu) ", s->compressed_len>>3,
-           s->compressed_len-7*eof));
+           s->compressed_len-7*last));
 }
 
 /* ===========================================================================
index 97571c2f6dd9a61da131c7970b16815975d33825..abe3d5a365a9329c908017fd13b60fc362766635 100644 (file)
@@ -25,7 +25,7 @@
 
 STATICLIB = libz.a
 SHAREDLIB = zlib1.dll
-IMPLIB    = libz.dll.a
+IMPLIB    = libzdll.a
 
 #LOC = -DASMV
 #LOC = -DDEBUG -g
index 3722b233ad61117ed892d4e36210902ded757268..a731c0c6214fcc143a76d40bc4bd0b014e744227 100644 (file)
@@ -21,10 +21,10 @@ AS = ml
 LD = link
 AR = lib
 RC = rc
-CFLAGS  = -nologo -MD -O2 -Oy- $(LOC)
+CFLAGS  = -nologo -MD -W3 -O2 -Oy- -Zi -Fd"zlib" $(LOC)
 WFLAGS  = -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE
-ASFLAGS = -coff
-LDFLAGS = -nologo -debug -release
+ASFLAGS = -coff -Zi
+LDFLAGS = -nologo -debug -incremental:no -opt:ref
 ARFLAGS = -nologo
 RCFLAGS = /dWIN32 /r
 
@@ -44,7 +44,7 @@ $(IMPLIB): $(SHAREDLIB)
 
 $(SHAREDLIB): win32/zlib.def $(OBJS) $(OBJA) zlib1.res
        $(LD) $(LDFLAGS) -def:win32/zlib.def -dll -implib:$(IMPLIB) \
-         -out:$@ $(OBJS) $(OBJA) zlib1.res
+         -out:$@ -base:0x5A4C0000 $(OBJS) $(OBJA) zlib1.res
        if exist $@.manifest \
          mt -nologo -manifest $@.manifest -outputresource:$@;2
 
diff --git a/zconf.h b/zconf.h
new file mode 100644 (file)
index 0000000..5888024
--- /dev/null
+++ b/zconf.h
@@ -0,0 +1,416 @@
+/* zconf.h -- configuration of the zlib compression library
+ * Copyright (C) 1995-2010 Jean-loup Gailly.
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+/* @(#) $Id$ */
+
+#ifndef ZCONF_H
+#define ZCONF_H
+
+/*
+ * If you *really* need a unique prefix for all types and library functions,
+ * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
+ * Even better than compiling with -DZ_PREFIX would be to use configure to set
+ * this permanently in zconf.h using "./configure --zprefix".
+ */
+#ifdef Z_PREFIX     /* may be set to #if 1 by ./configure */
+
+/* all linked symbols */
+#  define _dist_code            z__dist_code
+#  define _length_code          z__length_code
+#  define _tr_align             z__tr_align
+#  define _tr_flush_block       z__tr_flush_block
+#  define _tr_init              z__tr_init
+#  define _tr_stored_block      z__tr_stored_block
+#  define _tr_tally             z__tr_tally
+#  define adler32               z_adler32
+#  define adler32_combine       z_adler32_combine
+#  define adler32_combine64     z_adler32_combine64
+#  define compress              z_compress
+#  define compress2             z_compress2
+#  define compressBound         z_compressBound
+#  define crc32                 z_crc32
+#  define crc32_combine         z_crc32_combine
+#  define crc32_combine64       z_crc32_combine64
+#  define deflate               z_deflate
+#  define deflateBound          z_deflateBound
+#  define deflateCopy           z_deflateCopy
+#  define deflateEnd            z_deflateEnd
+#  define deflateInit2_         z_deflateInit2_
+#  define deflateInit_          z_deflateInit_
+#  define deflateParams         z_deflateParams
+#  define deflatePrime          z_deflatePrime
+#  define deflateReset          z_deflateReset
+#  define deflateSetDictionary  z_deflateSetDictionary
+#  define deflateSetHeader      z_deflateSetHeader
+#  define deflateTune           z_deflateTune
+#  define deflate_copyright     z_deflate_copyright
+#  define get_crc_table         z_get_crc_table
+#  define gz_error              z_gz_error
+#  define gz_intmax             z_gz_intmax
+#  define gz_strwinerror        z_gz_strwinerror
+#  define gzbuffer              z_gzbuffer
+#  define gzclearerr            z_gzclearerr
+#  define gzclose               z_gzclose
+#  define gzclose_r             z_gzclose_r
+#  define gzclose_w             z_gzclose_w
+#  define gzdirect              z_gzdirect
+#  define gzdopen               z_gzdopen
+#  define gzeof                 z_gzeof
+#  define gzerror               z_gzerror
+#  define gzflush               z_gzflush
+#  define gzgetc                z_gzgetc
+#  define gzgets                z_gzgets
+#  define gzoffset              z_gzoffset
+#  define gzoffset64            z_gzoffset64
+#  define gzopen                z_gzopen
+#  define gzopen64              z_gzopen64
+#  define gzprintf              z_gzprintf
+#  define gzputc                z_gzputc
+#  define gzputs                z_gzputs
+#  define gzread                z_gzread
+#  define gzrewind              z_gzrewind
+#  define gzseek                z_gzseek
+#  define gzseek64              z_gzseek64
+#  define gzsetparams           z_gzsetparams
+#  define gztell                z_gztell
+#  define gztell64              z_gztell64
+#  define gzungetc              z_gzungetc
+#  define gzwrite               z_gzwrite
+#  define inflate               z_inflate
+#  define inflateBack           z_inflateBack
+#  define inflateBackEnd        z_inflateBackEnd
+#  define inflateBackInit_      z_inflateBackInit_
+#  define inflateCopy           z_inflateCopy
+#  define inflateEnd            z_inflateEnd
+#  define inflateGetHeader      z_inflateGetHeader
+#  define inflateInit2_         z_inflateInit2_
+#  define inflateInit_          z_inflateInit_
+#  define inflateMark           z_inflateMark
+#  define inflatePrime          z_inflatePrime
+#  define inflateReset          z_inflateReset
+#  define inflateReset2         z_inflateReset2
+#  define inflateSetDictionary  z_inflateSetDictionary
+#  define inflateSync           z_inflateSync
+#  define inflateSyncPoint      z_inflateSyncPoint
+#  define inflateUndermine      z_inflateUndermine
+#  define inflate_copyright     z_inflate_copyright
+#  define inflate_fast          z_inflate_fast
+#  define inflate_table         z_inflate_table
+#  define uncompress            z_uncompress
+#  define zError                z_zError
+#  define zcalloc               z_zcalloc
+#  define zcfree                z_zcfree
+#  define zlibCompileFlags      z_zlibCompileFlags
+#  define zlibVersion           z_zlibVersion
+
+/* all zlib typedefs in zlib.h and zconf.h */
+#  define Byte                  z_Byte
+#  define Bytef                 z_Bytef
+#  define alloc_func            z_alloc_func
+#  define charf                 z_charf
+#  define free_func             z_free_func
+#  define gzFile                z_gzFile
+#  define gz_header             z_gz_header
+#  define gz_headerp            z_gz_headerp
+#  define in_func               z_in_func
+#  define intf                  z_intf
+#  define out_func              z_out_func
+#  define uInt                  z_uInt
+#  define uIntf                 z_uIntf
+#  define uLong                 z_uLong
+#  define uLongf                z_uLongf
+#  define voidp                 z_voidp
+#  define voidpc                z_voidpc
+#  define voidpf                z_voidpf
+
+/* all zlib structs in zlib.h and zconf.h */
+#  define gz_header_s           z_gz_header_s
+#  define internal_state        z_internal_state
+
+#endif
+
+#if defined(__MSDOS__) && !defined(MSDOS)
+#  define MSDOS
+#endif
+#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
+#  define OS2
+#endif
+#if defined(_WINDOWS) && !defined(WINDOWS)
+#  define WINDOWS
+#endif
+#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
+#  ifndef WIN32
+#    define WIN32
+#  endif
+#endif
+#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
+#  if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
+#    ifndef SYS16BIT
+#      define SYS16BIT
+#    endif
+#  endif
+#endif
+
+/*
+ * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
+ * than 64k bytes at a time (needed on systems with 16-bit int).
+ */
+#ifdef SYS16BIT
+#  define MAXSEG_64K
+#endif
+#ifdef MSDOS
+#  define UNALIGNED_OK
+#endif
+
+#ifdef __STDC_VERSION__
+#  ifndef STDC
+#    define STDC
+#  endif
+#  if __STDC_VERSION__ >= 199901L
+#    ifndef STDC99
+#      define STDC99
+#    endif
+#  endif
+#endif
+#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
+#  define STDC
+#endif
+#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
+#  define STDC
+#endif
+#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
+#  define STDC
+#endif
+#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
+#  define STDC
+#endif
+
+#if defined(__OS400__) && !defined(STDC)    /* iSeries (formerly AS/400). */
+#  define STDC
+#endif
+
+#ifndef STDC
+#  ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
+#    define const       /* note: need a more gentle solution here */
+#  endif
+#endif
+
+/* Some Mac compilers merge all .h files incorrectly: */
+#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
+#  define NO_DUMMY_DECL
+#endif
+
+/* Maximum value for memLevel in deflateInit2 */
+#ifndef MAX_MEM_LEVEL
+#  ifdef MAXSEG_64K
+#    define MAX_MEM_LEVEL 8
+#  else
+#    define MAX_MEM_LEVEL 9
+#  endif
+#endif
+
+/* Maximum value for windowBits in deflateInit2 and inflateInit2.
+ * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
+ * created by gzip. (Files created by minigzip can still be extracted by
+ * gzip.)
+ */
+#ifndef MAX_WBITS
+#  define MAX_WBITS   15 /* 32K LZ77 window */
+#endif
+
+/* The memory requirements for deflate are (in bytes):
+            (1 << (windowBits+2)) +  (1 << (memLevel+9))
+ that is: 128K for windowBits=15  +  128K for memLevel = 8  (default values)
+ plus a few kilobytes for small objects. For example, if you want to reduce
+ the default memory requirements from 256K to 128K, compile with
+     make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
+ Of course this will generally degrade compression (there's no free lunch).
+
+   The memory requirements for inflate are (in bytes) 1 << windowBits
+ that is, 32K for windowBits=15 (default value) plus a few kilobytes
+ for small objects.
+*/
+
+                        /* Type declarations */
+
+#ifndef OF /* function prototypes */
+#  ifdef STDC
+#    define OF(args)  args
+#  else
+#    define OF(args)  ()
+#  endif
+#endif
+
+/* The following definitions for FAR are needed only for MSDOS mixed
+ * model programming (small or medium model with some far allocations).
+ * This was tested only with MSC; for other MSDOS compilers you may have
+ * to define NO_MEMCPY in zutil.h.  If you don't need the mixed model,
+ * just define FAR to be empty.
+ */
+#ifdef SYS16BIT
+#  if defined(M_I86SM) || defined(M_I86MM)
+     /* MSC small or medium model */
+#    define SMALL_MEDIUM
+#    ifdef _MSC_VER
+#      define FAR _far
+#    else
+#      define FAR far
+#    endif
+#  endif
+#  if (defined(__SMALL__) || defined(__MEDIUM__))
+     /* Turbo C small or medium model */
+#    define SMALL_MEDIUM
+#    ifdef __BORLANDC__
+#      define FAR _far
+#    else
+#      define FAR far
+#    endif
+#  endif
+#endif
+
+#if defined(WINDOWS) || defined(WIN32)
+   /* If building or using zlib as a DLL, define ZLIB_DLL.
+    * This is not mandatory, but it offers a little performance increase.
+    */
+#  ifdef ZLIB_DLL
+#    if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
+#      ifdef ZLIB_INTERNAL
+#        define ZEXTERN extern __declspec(dllexport)
+#      else
+#        define ZEXTERN extern __declspec(dllimport)
+#      endif
+#    endif
+#  endif  /* ZLIB_DLL */
+   /* If building or using zlib with the WINAPI/WINAPIV calling convention,
+    * define ZLIB_WINAPI.
+    * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
+    */
+#  ifdef ZLIB_WINAPI
+#    ifdef FAR
+#      undef FAR
+#    endif
+#    include <windows.h>
+     /* No need for _export, use ZLIB.DEF instead. */
+     /* For complete Windows compatibility, use WINAPI, not __stdcall. */
+#    define ZEXPORT WINAPI
+#    ifdef WIN32
+#      define ZEXPORTVA WINAPIV
+#    else
+#      define ZEXPORTVA FAR CDECL
+#    endif
+#  endif
+#endif
+
+#if defined (__BEOS__)
+#  ifdef ZLIB_DLL
+#    ifdef ZLIB_INTERNAL
+#      define ZEXPORT   __declspec(dllexport)
+#      define ZEXPORTVA __declspec(dllexport)
+#    else
+#      define ZEXPORT   __declspec(dllimport)
+#      define ZEXPORTVA __declspec(dllimport)
+#    endif
+#  endif
+#endif
+
+#ifdef HAVE_VISIBILITY_PRAGMA
+#  define ZEXTERN __attribute__((visibility ("default"))) extern
+#endif
+
+#ifndef ZEXTERN
+#  define ZEXTERN extern
+#endif
+#ifndef ZEXPORT
+#  define ZEXPORT
+#endif
+#ifndef ZEXPORTVA
+#  define ZEXPORTVA
+#endif
+
+#ifndef FAR
+#  define FAR
+#endif
+
+#if !defined(__MACTYPES__)
+typedef unsigned char  Byte;  /* 8 bits */
+#endif
+typedef unsigned int   uInt;  /* 16 bits or more */
+typedef unsigned long  uLong; /* 32 bits or more */
+
+#ifdef SMALL_MEDIUM
+   /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
+#  define Bytef Byte FAR
+#else
+   typedef Byte  FAR Bytef;
+#endif
+typedef char  FAR charf;
+typedef int   FAR intf;
+typedef uInt  FAR uIntf;
+typedef uLong FAR uLongf;
+
+#ifdef STDC
+   typedef void const *voidpc;
+   typedef void FAR   *voidpf;
+   typedef void       *voidp;
+#else
+   typedef Byte const *voidpc;
+   typedef Byte FAR   *voidpf;
+   typedef Byte       *voidp;
+#endif
+
+#ifdef HAVE_UNISTD_H    /* may be set to #if 1 by ./configure */
+#  define Z_HAVE_UNISTD_H
+#endif
+
+#ifdef Z_HAVE_UNISTD_H
+#  include <sys/types.h>    /* for off_t */
+#  include <unistd.h>       /* for SEEK_* and off_t */
+#  ifdef VMS
+#    include <unixio.h>     /* for off_t */
+#  endif
+#  ifndef z_off_t
+#    define z_off_t off_t
+#  endif
+#endif
+
+#ifdef _LARGEFILE64_SOURCE
+#  include <sys/types.h>
+#endif
+
+#ifndef SEEK_SET
+#  define SEEK_SET        0       /* Seek from beginning of file.  */
+#  define SEEK_CUR        1       /* Seek from current position.  */
+#  define SEEK_END        2       /* Set file pointer to EOF plus "offset" */
+#endif
+#ifndef z_off_t
+#  define z_off_t long
+#endif
+
+#if defined(__OS400__)
+#  define NO_vsnprintf
+#endif
+
+#if defined(__MVS__)
+#  define NO_vsnprintf
+#endif
+
+/* MVS linker does not support external names larger than 8 bytes */
+#if defined(__MVS__)
+  #pragma map(deflateInit_,"DEIN")
+  #pragma map(deflateInit2_,"DEIN2")
+  #pragma map(deflateEnd,"DEEND")
+  #pragma map(deflateBound,"DEBND")
+  #pragma map(inflateInit_,"ININ")
+  #pragma map(inflateInit2_,"ININ2")
+  #pragma map(inflateEnd,"INEND")
+  #pragma map(inflateSync,"INSY")
+  #pragma map(inflateSetDictionary,"INSEDI")
+  #pragma map(compressBound,"CMBND")
+  #pragma map(inflate_table,"INTABL")
+  #pragma map(inflate_fast,"INFA")
+  #pragma map(inflate_copyright,"INCOPY")
+#endif
+
+#endif /* ZCONF_H */
diff --git a/zconf.h.cmakein b/zconf.h.cmakein
new file mode 100644 (file)
index 0000000..eec8ab0
--- /dev/null
@@ -0,0 +1,418 @@
+/* zconf.h -- configuration of the zlib compression library
+ * Copyright (C) 1995-2010 Jean-loup Gailly.
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+/* @(#) $Id$ */
+
+#ifndef ZCONF_H
+#define ZCONF_H
+#cmakedefine Z_PREFIX
+#cmakedefine Z_HAVE_UNISTD_H
+
+/*
+ * If you *really* need a unique prefix for all types and library functions,
+ * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
+ * Even better than compiling with -DZ_PREFIX would be to use configure to set
+ * this permanently in zconf.h using "./configure --zprefix".
+ */
+#ifdef Z_PREFIX     /* may be set to #if 1 by ./configure */
+
+/* all linked symbols */
+#  define _dist_code            z__dist_code
+#  define _length_code          z__length_code
+#  define _tr_align             z__tr_align
+#  define _tr_flush_block       z__tr_flush_block
+#  define _tr_init              z__tr_init
+#  define _tr_stored_block      z__tr_stored_block
+#  define _tr_tally             z__tr_tally
+#  define adler32               z_adler32
+#  define adler32_combine       z_adler32_combine
+#  define adler32_combine64     z_adler32_combine64
+#  define compress              z_compress
+#  define compress2             z_compress2
+#  define compressBound         z_compressBound
+#  define crc32                 z_crc32
+#  define crc32_combine         z_crc32_combine
+#  define crc32_combine64       z_crc32_combine64
+#  define deflate               z_deflate
+#  define deflateBound          z_deflateBound
+#  define deflateCopy           z_deflateCopy
+#  define deflateEnd            z_deflateEnd
+#  define deflateInit2_         z_deflateInit2_
+#  define deflateInit_          z_deflateInit_
+#  define deflateParams         z_deflateParams
+#  define deflatePrime          z_deflatePrime
+#  define deflateReset          z_deflateReset
+#  define deflateSetDictionary  z_deflateSetDictionary
+#  define deflateSetHeader      z_deflateSetHeader
+#  define deflateTune           z_deflateTune
+#  define deflate_copyright     z_deflate_copyright
+#  define get_crc_table         z_get_crc_table
+#  define gz_error              z_gz_error
+#  define gz_intmax             z_gz_intmax
+#  define gz_strwinerror        z_gz_strwinerror
+#  define gzbuffer              z_gzbuffer
+#  define gzclearerr            z_gzclearerr
+#  define gzclose               z_gzclose
+#  define gzclose_r             z_gzclose_r
+#  define gzclose_w             z_gzclose_w
+#  define gzdirect              z_gzdirect
+#  define gzdopen               z_gzdopen
+#  define gzeof                 z_gzeof
+#  define gzerror               z_gzerror
+#  define gzflush               z_gzflush
+#  define gzgetc                z_gzgetc
+#  define gzgets                z_gzgets
+#  define gzoffset              z_gzoffset
+#  define gzoffset64            z_gzoffset64
+#  define gzopen                z_gzopen
+#  define gzopen64              z_gzopen64
+#  define gzprintf              z_gzprintf
+#  define gzputc                z_gzputc
+#  define gzputs                z_gzputs
+#  define gzread                z_gzread
+#  define gzrewind              z_gzrewind
+#  define gzseek                z_gzseek
+#  define gzseek64              z_gzseek64
+#  define gzsetparams           z_gzsetparams
+#  define gztell                z_gztell
+#  define gztell64              z_gztell64
+#  define gzungetc              z_gzungetc
+#  define gzwrite               z_gzwrite
+#  define inflate               z_inflate
+#  define inflateBack           z_inflateBack
+#  define inflateBackEnd        z_inflateBackEnd
+#  define inflateBackInit_      z_inflateBackInit_
+#  define inflateCopy           z_inflateCopy
+#  define inflateEnd            z_inflateEnd
+#  define inflateGetHeader      z_inflateGetHeader
+#  define inflateInit2_         z_inflateInit2_
+#  define inflateInit_          z_inflateInit_
+#  define inflateMark           z_inflateMark
+#  define inflatePrime          z_inflatePrime
+#  define inflateReset          z_inflateReset
+#  define inflateReset2         z_inflateReset2
+#  define inflateSetDictionary  z_inflateSetDictionary
+#  define inflateSync           z_inflateSync
+#  define inflateSyncPoint      z_inflateSyncPoint
+#  define inflateUndermine      z_inflateUndermine
+#  define inflate_copyright     z_inflate_copyright
+#  define inflate_fast          z_inflate_fast
+#  define inflate_table         z_inflate_table
+#  define uncompress            z_uncompress
+#  define zError                z_zError
+#  define zcalloc               z_zcalloc
+#  define zcfree                z_zcfree
+#  define zlibCompileFlags      z_zlibCompileFlags
+#  define zlibVersion           z_zlibVersion
+
+/* all zlib typedefs in zlib.h and zconf.h */
+#  define Byte                  z_Byte
+#  define Bytef                 z_Bytef
+#  define alloc_func            z_alloc_func
+#  define charf                 z_charf
+#  define free_func             z_free_func
+#  define gzFile                z_gzFile
+#  define gz_header             z_gz_header
+#  define gz_headerp            z_gz_headerp
+#  define in_func               z_in_func
+#  define intf                  z_intf
+#  define out_func              z_out_func
+#  define uInt                  z_uInt
+#  define uIntf                 z_uIntf
+#  define uLong                 z_uLong
+#  define uLongf                z_uLongf
+#  define voidp                 z_voidp
+#  define voidpc                z_voidpc
+#  define voidpf                z_voidpf
+
+/* all zlib structs in zlib.h and zconf.h */
+#  define gz_header_s           z_gz_header_s
+#  define internal_state        z_internal_state
+
+#endif
+
+#if defined(__MSDOS__) && !defined(MSDOS)
+#  define MSDOS
+#endif
+#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
+#  define OS2
+#endif
+#if defined(_WINDOWS) && !defined(WINDOWS)
+#  define WINDOWS
+#endif
+#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
+#  ifndef WIN32
+#    define WIN32
+#  endif
+#endif
+#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
+#  if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
+#    ifndef SYS16BIT
+#      define SYS16BIT
+#    endif
+#  endif
+#endif
+
+/*
+ * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
+ * than 64k bytes at a time (needed on systems with 16-bit int).
+ */
+#ifdef SYS16BIT
+#  define MAXSEG_64K
+#endif
+#ifdef MSDOS
+#  define UNALIGNED_OK
+#endif
+
+#ifdef __STDC_VERSION__
+#  ifndef STDC
+#    define STDC
+#  endif
+#  if __STDC_VERSION__ >= 199901L
+#    ifndef STDC99
+#      define STDC99
+#    endif
+#  endif
+#endif
+#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
+#  define STDC
+#endif
+#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
+#  define STDC
+#endif
+#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
+#  define STDC
+#endif
+#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
+#  define STDC
+#endif
+
+#if defined(__OS400__) && !defined(STDC)    /* iSeries (formerly AS/400). */
+#  define STDC
+#endif
+
+#ifndef STDC
+#  ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
+#    define const       /* note: need a more gentle solution here */
+#  endif
+#endif
+
+/* Some Mac compilers merge all .h files incorrectly: */
+#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
+#  define NO_DUMMY_DECL
+#endif
+
+/* Maximum value for memLevel in deflateInit2 */
+#ifndef MAX_MEM_LEVEL
+#  ifdef MAXSEG_64K
+#    define MAX_MEM_LEVEL 8
+#  else
+#    define MAX_MEM_LEVEL 9
+#  endif
+#endif
+
+/* Maximum value for windowBits in deflateInit2 and inflateInit2.
+ * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
+ * created by gzip. (Files created by minigzip can still be extracted by
+ * gzip.)
+ */
+#ifndef MAX_WBITS
+#  define MAX_WBITS   15 /* 32K LZ77 window */
+#endif
+
+/* The memory requirements for deflate are (in bytes):
+            (1 << (windowBits+2)) +  (1 << (memLevel+9))
+ that is: 128K for windowBits=15  +  128K for memLevel = 8  (default values)
+ plus a few kilobytes for small objects. For example, if you want to reduce
+ the default memory requirements from 256K to 128K, compile with
+     make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
+ Of course this will generally degrade compression (there's no free lunch).
+
+   The memory requirements for inflate are (in bytes) 1 << windowBits
+ that is, 32K for windowBits=15 (default value) plus a few kilobytes
+ for small objects.
+*/
+
+                        /* Type declarations */
+
+#ifndef OF /* function prototypes */
+#  ifdef STDC
+#    define OF(args)  args
+#  else
+#    define OF(args)  ()
+#  endif
+#endif
+
+/* The following definitions for FAR are needed only for MSDOS mixed
+ * model programming (small or medium model with some far allocations).
+ * This was tested only with MSC; for other MSDOS compilers you may have
+ * to define NO_MEMCPY in zutil.h.  If you don't need the mixed model,
+ * just define FAR to be empty.
+ */
+#ifdef SYS16BIT
+#  if defined(M_I86SM) || defined(M_I86MM)
+     /* MSC small or medium model */
+#    define SMALL_MEDIUM
+#    ifdef _MSC_VER
+#      define FAR _far
+#    else
+#      define FAR far
+#    endif
+#  endif
+#  if (defined(__SMALL__) || defined(__MEDIUM__))
+     /* Turbo C small or medium model */
+#    define SMALL_MEDIUM
+#    ifdef __BORLANDC__
+#      define FAR _far
+#    else
+#      define FAR far
+#    endif
+#  endif
+#endif
+
+#if defined(WINDOWS) || defined(WIN32)
+   /* If building or using zlib as a DLL, define ZLIB_DLL.
+    * This is not mandatory, but it offers a little performance increase.
+    */
+#  ifdef ZLIB_DLL
+#    if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
+#      ifdef ZLIB_INTERNAL
+#        define ZEXTERN extern __declspec(dllexport)
+#      else
+#        define ZEXTERN extern __declspec(dllimport)
+#      endif
+#    endif
+#  endif  /* ZLIB_DLL */
+   /* If building or using zlib with the WINAPI/WINAPIV calling convention,
+    * define ZLIB_WINAPI.
+    * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
+    */
+#  ifdef ZLIB_WINAPI
+#    ifdef FAR
+#      undef FAR
+#    endif
+#    include <windows.h>
+     /* No need for _export, use ZLIB.DEF instead. */
+     /* For complete Windows compatibility, use WINAPI, not __stdcall. */
+#    define ZEXPORT WINAPI
+#    ifdef WIN32
+#      define ZEXPORTVA WINAPIV
+#    else
+#      define ZEXPORTVA FAR CDECL
+#    endif
+#  endif
+#endif
+
+#if defined (__BEOS__)
+#  ifdef ZLIB_DLL
+#    ifdef ZLIB_INTERNAL
+#      define ZEXPORT   __declspec(dllexport)
+#      define ZEXPORTVA __declspec(dllexport)
+#    else
+#      define ZEXPORT   __declspec(dllimport)
+#      define ZEXPORTVA __declspec(dllimport)
+#    endif
+#  endif
+#endif
+
+#ifdef HAVE_VISIBILITY_PRAGMA
+#  define ZEXTERN __attribute__((visibility ("default"))) extern
+#endif
+
+#ifndef ZEXTERN
+#  define ZEXTERN extern
+#endif
+#ifndef ZEXPORT
+#  define ZEXPORT
+#endif
+#ifndef ZEXPORTVA
+#  define ZEXPORTVA
+#endif
+
+#ifndef FAR
+#  define FAR
+#endif
+
+#if !defined(__MACTYPES__)
+typedef unsigned char  Byte;  /* 8 bits */
+#endif
+typedef unsigned int   uInt;  /* 16 bits or more */
+typedef unsigned long  uLong; /* 32 bits or more */
+
+#ifdef SMALL_MEDIUM
+   /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
+#  define Bytef Byte FAR
+#else
+   typedef Byte  FAR Bytef;
+#endif
+typedef char  FAR charf;
+typedef int   FAR intf;
+typedef uInt  FAR uIntf;
+typedef uLong FAR uLongf;
+
+#ifdef STDC
+   typedef void const *voidpc;
+   typedef void FAR   *voidpf;
+   typedef void       *voidp;
+#else
+   typedef Byte const *voidpc;
+   typedef Byte FAR   *voidpf;
+   typedef Byte       *voidp;
+#endif
+
+#ifdef HAVE_UNISTD_H    /* may be set to #if 1 by ./configure */
+#  define Z_HAVE_UNISTD_H
+#endif
+
+#ifdef Z_HAVE_UNISTD_H
+#  include <sys/types.h>    /* for off_t */
+#  include <unistd.h>       /* for SEEK_* and off_t */
+#  ifdef VMS
+#    include <unixio.h>     /* for off_t */
+#  endif
+#  ifndef z_off_t
+#    define z_off_t off_t
+#  endif
+#endif
+
+#ifdef _LARGEFILE64_SOURCE
+#  include <sys/types.h>
+#endif
+
+#ifndef SEEK_SET
+#  define SEEK_SET        0       /* Seek from beginning of file.  */
+#  define SEEK_CUR        1       /* Seek from current position.  */
+#  define SEEK_END        2       /* Set file pointer to EOF plus "offset" */
+#endif
+#ifndef z_off_t
+#  define z_off_t long
+#endif
+
+#if defined(__OS400__)
+#  define NO_vsnprintf
+#endif
+
+#if defined(__MVS__)
+#  define NO_vsnprintf
+#endif
+
+/* MVS linker does not support external names larger than 8 bytes */
+#if defined(__MVS__)
+  #pragma map(deflateInit_,"DEIN")
+  #pragma map(deflateInit2_,"DEIN2")
+  #pragma map(deflateEnd,"DEEND")
+  #pragma map(deflateBound,"DEBND")
+  #pragma map(inflateInit_,"ININ")
+  #pragma map(inflateInit2_,"ININ2")
+  #pragma map(inflateEnd,"INEND")
+  #pragma map(inflateSync,"INSY")
+  #pragma map(inflateSetDictionary,"INSEDI")
+  #pragma map(compressBound,"CMBND")
+  #pragma map(inflate_table,"INTABL")
+  #pragma map(inflate_fast,"INFA")
+  #pragma map(inflate_copyright,"INCOPY")
+#endif
+
+#endif /* ZCONF_H */
index eec8ab04f7f86bea3be4373d2a28857437669efa..58880245c1e72896a4b4b837f5def928d8f44705 100644 (file)
@@ -7,8 +7,6 @@
 
 #ifndef ZCONF_H
 #define ZCONF_H
-#cmakedefine Z_PREFIX
-#cmakedefine Z_HAVE_UNISTD_H
 
 /*
  * If you *really* need a unique prefix for all types and library functions,
diff --git a/zlib.3 b/zlib.3
index 82b9eca623fc554a2c5e6916414acea1e975d4ae..57f0307886e051893828405907587201ae051d02 100644 (file)
--- a/zlib.3
+++ b/zlib.3
@@ -1,4 +1,4 @@
-.TH ZLIB 3 "21 February 2010"
+.TH ZLIB 3 "11 March 2010"
 .SH NAME
 zlib \- compression/decompression library
 .SH SYNOPSIS
@@ -9,12 +9,13 @@ for full description]
 The
 .I zlib
 library is a general purpose data compression library.
-The code is thread safe.
+The code is thread safe, assuming that the standard library functions
+used are thread safe, such as memory allocation routines.
 It provides in-memory compression and decompression functions,
 including integrity checks of the uncompressed data.
 This version of the library supports only one compression method (deflation)
-but other algorithms will be added later
-and will have the same stream interface.
+but other algorithms may be added later
+with the same stream interface.
 .LP
 Compression can be done in a single step if the buffers are large enough
 or can be done by repeated calls of the compression function.
@@ -29,7 +30,7 @@ with an interface similar to that of stdio.
 .LP
 The library does not install any signal handler.
 The decoder checks the consistency of the compressed data,
-so the library should never crash even in case of corrupted input.
+so the library should never crash even in the case of corrupted input.
 .LP
 All functions of the compression library are documented in the file
 .IR zlib.h .
@@ -37,18 +38,19 @@ The distribution source includes examples of use of the library
 in the files
 .I example.c
 and
-.IR minigzip.c .
+.IR minigzip.c,
+as well as other examples in the
+.IR examples/
+directory.
 .LP
 Changes to this version are documented in the file
 .I ChangeLog
-that accompanies the source,
-and are concerned primarily with bug fixes and portability enhancements.
+that accompanies the source.
 .LP
-A Java implementation of
 .I zlib
-is available in the Java Development Kit 1.1:
+is available in Java using the java.util.zip package:
 .IP
-http://www.javasoft.com/products/JDK/1.1/docs/api/Package-java.util.zip.html
+http://java.sun.com/developer/technicalArticles/Programming/compression/
 .LP
 A Perl interface to
 .IR zlib ,
@@ -56,7 +58,7 @@ written by Paul Marquess (pmqs@cpan.org),
 is available at CPAN (Comprehensive Perl Archive Network) sites,
 including:
 .IP
-http://www.cpan.org/modules/by-module/Compress/
+http://search.cpan.org/~pmqs/IO-Compress-Zlib/
 .LP
 A Python interface to
 .IR zlib ,
@@ -65,14 +67,11 @@ is available in Python 1.5 and later versions:
 .IP
 http://www.python.org/doc/lib/module-zlib.html
 .LP
-A
 .I zlib
-binding for
-.IR tcl (1),
-written by Andreas Kupries (a.kupries@westend.com),
-is availlable at:
+is built into
+.IR tcl:
 .IP
-http://www.westend.com/~kupries/doc/trf/man/man.html
+http://wiki.tcl.tk/4610
 .LP
 An experimental package to read and write files in .zip format,
 written on top of
@@ -80,40 +79,34 @@ written on top of
 by Gilles Vollant (info@winimage.com),
 is available at:
 .IP
-http://www.winimage.com/zLibDll/unzip.html
+http://www.winimage.com/zLibDll/minizip.html
 and also in the
 .I contrib/minizip
 directory of the main
 .I zlib
-web site.
+source distribution.
 .SH "SEE ALSO"
 The
 .I zlib
-web site can be found at either of these locations:
+web site can be found at:
 .IP
-http://www.zlib.org
-.br
-http://www.gzip.org/zlib/
+http://zlib.net/
 .LP
 The data format used by the zlib library is described by RFC
 (Request for Comments) 1950 to 1952 in the files:
 .IP
-http://www.ietf.org/rfc/rfc1950.txt (concerning zlib format)
+http://www.ietf.org/rfc/rfc1950.txt (for the zlib header and trailer format)
 .br
-http://www.ietf.org/rfc/rfc1951.txt (concerning deflate format)
+http://www.ietf.org/rfc/rfc1951.txt (for the deflate compressed data format)
 .br
-http://www.ietf.org/rfc/rfc1952.txt (concerning gzip format)
-.LP
-These documents are also available in other formats from:
-.IP
-ftp://ftp.uu.net/graphics/png/documents/zlib/zdoc-index.html
+http://www.ietf.org/rfc/rfc1952.txt (for the gzip header and trailer format)
 .LP
-Mark Nelson (markn@ieee.org) wrote an article about
+Mark Nelson wrote an article about
 .I zlib
 for the Jan. 1997 issue of  Dr. Dobb's Journal;
 a copy of the article is available at:
 .IP
-http://dogma.net/markn/articles/zlibtool/zlibtool.htm
+http://marknelson.us/1997/01/01/zlib-engine/
 .SH "REPORTING PROBLEMS"
 Before reporting a problem,
 please check the
@@ -126,13 +119,13 @@ Please read the
 .I zlib
 FAQ at:
 .IP
-http://www.gzip.org/zlib/zlib_faq.html
+http://zlib.net/zlib_faq.html
 .LP
 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
-Version 1.2.3.9
+Version 1.2.4
 Copyright (C) 1995-2010 Jean-loup Gailly (jloup@gzip.org)
 and Mark Adler (madler@alumni.caltech.edu).
 .LP
diff --git a/zlib.3.pdf b/zlib.3.pdf
new file mode 100644 (file)
index 0000000..3442d5b
Binary files /dev/null and b/zlib.3.pdf differ
diff --git a/zlib.h b/zlib.h
index e1cfd0e736e1c63598b8a82ca1a9477bee1c688c..dfc0bba4e4d32a932f2f377adbca3211b759964b 100644 (file)
--- a/zlib.h
+++ b/zlib.h
@@ -1,5 +1,5 @@
 /* zlib.h -- interface of the 'zlib' general purpose compression library
-  version 1.2.3.9, Feb 21st, 2010
+  version 1.2.3.9, Mar 11th, 2010
 
   Copyright (C) 1995-2010 Jean-loup Gailly and Mark Adler
 
 extern "C" {
 #endif
 
-#define ZLIB_VERSION "1.2.3.9"
-#define ZLIB_VERNUM 0x1239
+#define ZLIB_VERSION "1.2.4"
+#define ZLIB_VERNUM 0x1240
 #define ZLIB_VER_MAJOR 1
 #define ZLIB_VER_MINOR 2
-#define ZLIB_VER_REVISION 3
+#define ZLIB_VER_REVISION 4
+#define ZLIB_VER_SUBREVISION 0
 
 /*
     The 'zlib' compression library provides in-memory compression and