Commit 3ec980b1 by Tom Tromey

This commit was generated by cvs2svn to compensate for changes in r104181,

which included commits to RCS files with non-trunk default branches.

From-SVN: r104182
parent 303ae446
......@@ -118,6 +118,6 @@
&MODLIB/INFTREES &MODLIB/TREES +
&MODLIB/UNCOMPR &MODLIB/ZUTIL) +
SRCFILE(&SRCLIB/&CTLFILE) SRCMBR(BNDSRC) +
TEXT('ZLIB 1.2.1') TGTRLS(V4R4M0)
TEXT('ZLIB 1.2.3') TGTRLS(V4R4M0)
ENDPGM
ZLIB version 1.2.1 for AS400 installation instructions
ZLIB version 1.2.3 for AS400 installation instructions
I) From an AS400 *SAVF file:
......
* ZLIB.INC - Interface to the general purpose compression library
*
* ILE RPG400 version by Patrick Monnerat, DATASPHERE.
* Version 1.2.1
* Version 1.2.3
*
*
* WARNING:
......@@ -20,8 +20,12 @@
* Constants
**************************************************************************
*
D ZLIB_VERSION C '1.2.1' Header's version
D ZLIB_VERNUM C X'1210'
* Versioning information.
*
D ZLIB_VERSION C '1.2.3'
D ZLIB_VERNUM C X'1230'
*
* Other equates.
*
D Z_NO_FLUSH C 0
D Z_SYNC_FLUSH C 2
......
......@@ -5,10 +5,10 @@
-- --
-- Open source license information is in the zlib.ads file. --
----------------------------------------------------------------
-- Continuous test for ZLib multithreading. If the test is fail
-- Wou should provide thread safe allocation routines for the Z_Stream.
-- Continuous test for ZLib multithreading. If the test would fail
-- we should provide thread safe allocation routines for the Z_Stream.
--
-- $Id: mtest.adb,v 1.2 2003/08/12 12:11:05 vagul Exp $
-- $Id: mtest.adb,v 1.4 2004/07/23 07:49:54 vagul Exp $
with ZLib;
with Ada.Streams;
......@@ -148,6 +148,9 @@ procedure MTest is
pragma Unreferenced (Test);
Dummy : Character;
begin
null;
Ada.Text_IO.Get_Immediate (Dummy);
Stop := True;
end MTest;
......@@ -6,7 +6,7 @@
-- Open source license information is in the zlib.ads file. --
----------------------------------------------------------------
-- $Id: read.adb,v 1.7 2003/08/12 12:12:35 vagul Exp $
-- $Id: read.adb,v 1.8 2004/05/31 10:53:40 vagul Exp $
-- Test/demo program for the generic read interface.
......@@ -68,7 +68,11 @@ procedure Read is
-- ZLib.Read
-- reading data from the File_In.
procedure Read is new ZLib.Read (Read, Read_Buffer, Read_First, Read_Last);
procedure Read is new ZLib.Read
(Read,
Read_Buffer,
Rest_First => Read_First,
Rest_Last => Read_Last);
----------
-- Read --
......@@ -103,6 +107,7 @@ procedure Read is
Pack_Size := 0;
Offset := 1;
Read_First := Read_Buffer'Last + 1;
Read_Last := Read_Buffer'Last;
end Reset;
begin
......
ZLib for Ada thick binding (ZLib.Ada)
Release 1.2
Release 1.3
ZLib.Ada is a thick binding interface to the popular ZLib data
compression library, available at http://www.gzip.org/zlib/.
It provides Ada-style access to the ZLib C library.
Here are the main changes since ZLib.Ada 1.1:
Here are the main changes since ZLib.Ada 1.2:
- Attension: ZLib.Read generic routine have a initialization requirement
for Read_Last parameter now. It is a bit incompartible with previous version,
but extends functionality, we could use new parameters Allow_Read_Some and
Flush now.
- Added Is_Open routines to ZLib and ZLib.Streams packages.
- The default header type has a name "Default" now. Auto is used only for
automatic GZip/ZLib header detection.
- Add pragma Assert to check Stream_Element is 8 bit.
- Added test for multitasking mtest.adb.
- Fix extraction to buffer with exact known decompressed size. Error reported by
Steve Sangwine.
- Added GNAT project file zlib.gpr.
- Fix definition of ULong (changed to unsigned_long), fix regression on 64 bits
computers. Patch provided by Pascal Obry.
- Add Status_Error exception definition.
- Add pragma Assertion that Ada.Streams.Stream_Element size is 8 bit.
How to build ZLib.Ada under GNAT
......@@ -50,3 +61,5 @@ The routines from the package specifications are commented.
Homepage: http://zlib-ada.sourceforge.net/
Author: Dmitriy Anisimkov <anisimkov@yahoo.com>
Contributors: Pascal Obry <pascal@obry.org>, Steve Sangwine <sjs@essex.ac.uk>
......@@ -6,7 +6,7 @@
-- Open source license information is in the zlib.ads file. --
----------------------------------------------------------------
-- $Id: zlib-streams.adb,v 1.9 2003/08/12 13:15:31 vagul Exp $
-- $Id: zlib-streams.adb,v 1.10 2004/05/31 10:53:40 vagul Exp $
with Ada.Unchecked_Deallocation;
......@@ -90,6 +90,7 @@ package body ZLib.Streams is
Stream.Buffer := new Buffer_Subtype;
Stream.Rest_First := Stream.Buffer'Last + 1;
Stream.Rest_Last := Stream.Buffer'Last;
end if;
end Create;
......@@ -113,6 +114,15 @@ package body ZLib.Streams is
end loop;
end Flush;
-------------
-- Is_Open --
-------------
function Is_Open (Stream : Stream_Type) return Boolean is
begin
return Is_Open (Stream.Reader) or else Is_Open (Stream.Writer);
end Is_Open;
----------
-- Read --
----------
......
......@@ -6,7 +6,7 @@
-- Open source license information is in the zlib.ads file. --
----------------------------------------------------------------
-- $Id: zlib-streams.ads,v 1.11 2003/08/12 13:15:31 vagul Exp $
-- $Id: zlib-streams.ads,v 1.12 2004/05/31 10:53:40 vagul Exp $
package ZLib.Streams is
......@@ -77,6 +77,8 @@ package ZLib.Streams is
-- !!! When the Need_Header is False ZLib-Ada is using undocumented
-- ZLib 1.1.4 functionality to do not create/wait for ZLib headers.
function Is_Open (Stream : Stream_Type) return Boolean;
procedure Close (Stream : in out Stream_Type);
private
......
......@@ -6,12 +6,11 @@
-- Open source license information is in the zlib.ads file. --
----------------------------------------------------------------
-- $Id: zlib-thin.adb,v 1.6 2003/01/21 15:26:37 vagul Exp $
-- $Id: zlib-thin.adb,v 1.8 2003/12/14 18:27:31 vagul Exp $
package body ZLib.Thin is
ZLIB_VERSION : constant Chars_Ptr :=
Interfaces.C.Strings.New_String ("1.1.4");
ZLIB_VERSION : constant Chars_Ptr := zlibVersion;
Z_Stream_Size : constant Int := Z_Stream'Size / System.Storage_Unit;
......@@ -38,14 +37,6 @@ package body ZLib.Thin is
------------------
function Deflate_Init
(strm : in Z_Streamp;
level : in Int := Z_DEFAULT_COMPRESSION)
return Int is
begin
return deflateInit (strm, level, ZLIB_VERSION, Z_Stream_Size);
end Deflate_Init;
function Deflate_Init
(strm : Z_Streamp;
level : Int;
method : Int;
......@@ -69,16 +60,15 @@ package body ZLib.Thin is
-- Inflate_Init --
------------------
function Inflate_Init (strm : Z_Streamp) return Int is
begin
return inflateInit (strm, ZLIB_VERSION, Z_Stream_Size);
end Inflate_Init;
function Inflate_Init (strm : Z_Streamp; windowBits : Int) return Int is
begin
return inflateInit2 (strm, windowBits, ZLIB_VERSION, Z_Stream_Size);
end Inflate_Init;
------------------------
-- Last_Error_Message --
------------------------
function Last_Error_Message (Strm : in Z_Stream) return String is
use Interfaces.C.Strings;
begin
......@@ -89,45 +79,19 @@ package body ZLib.Thin is
end if;
end Last_Error_Message;
-------------
-- Need_In --
-------------
function Need_In (strm : Z_Stream) return Boolean is
begin
return strm.Avail_In = 0;
end Need_In;
--------------
-- Need_Out --
--------------
function Need_Out (strm : Z_Stream) return Boolean is
begin
return strm.Avail_Out = 0;
end Need_Out;
------------
-- Set_In --
------------
procedure Set_In
(Strm : in out Z_Stream;
Buffer : in Byte_Access;
Buffer : in Voidp;
Size : in UInt) is
begin
Strm.Next_In := Buffer;
Strm.Avail_In := Size;
end Set_In;
procedure Set_In
(Strm : in out Z_Stream;
Buffer : in Voidp;
Size : in UInt) is
begin
Set_In (Strm, Bytes.To_Pointer (Buffer), Size);
end Set_In;
------------------
-- Set_Mem_Func --
------------------
......@@ -149,21 +113,13 @@ package body ZLib.Thin is
procedure Set_Out
(Strm : in out Z_Stream;
Buffer : in Byte_Access;
Buffer : in Voidp;
Size : in UInt) is
begin
Strm.Next_Out := Buffer;
Strm.Avail_Out := Size;
end Set_Out;
procedure Set_Out
(Strm : in out Z_Stream;
Buffer : in Voidp;
Size : in UInt) is
begin
Set_Out (Strm, Bytes.To_Pointer (Buffer), Size);
end Set_Out;
--------------
-- Total_In --
--------------
......
......@@ -6,10 +6,11 @@
-- Open source license information is in the zlib.ads file. --
----------------------------------------------------------------
-- $Id: zlib-thin.ads,v 1.8 2003/08/12 13:16:51 vagul Exp $
-- $Id: zlib-thin.ads,v 1.11 2004/07/23 06:33:11 vagul Exp $
with Interfaces.C.Strings;
with System.Address_To_Access_Conversions;
with System;
private package ZLib.Thin is
......@@ -36,18 +37,18 @@ private package ZLib.Thin is
-- zconf.h:216
type Int is new Interfaces.C.int;
type ULong is new Interfaces.C.unsigned; -- 32 bits or more
type ULong is new Interfaces.C.unsigned_long; -- 32 bits or more
-- zconf.h:217
subtype Chars_Ptr is Interfaces.C.Strings.chars_ptr;
type ULong_Access is access ULong;
type Int_Access is access Int;
subtype Voidp is System.Address; -- zconf.h:232
package Bytes is new System.Address_To_Access_Conversions (Byte);
subtype Voidp is System.Address; -- zconf.h:232
subtype Byte_Access is Bytes.Object_Pointer;
subtype Byte_Access is Voidp;
Nul : constant Voidp := System.Null_Address;
-- end from zconf
Z_NO_FLUSH : constant := 8#0000#; -- zlib.h:125
......@@ -251,12 +252,6 @@ private package ZLib.Thin is
stream_size : Int)
return Int;
function Deflate_Init
(strm : in Z_Streamp;
level : in Int := Z_DEFAULT_COMPRESSION)
return Int;
pragma Inline (Deflate_Init);
function deflateInit2
(strm : Z_Streamp;
level : Int;
......@@ -284,9 +279,6 @@ private package ZLib.Thin is
stream_size : Int)
return Int;
function Inflate_Init (strm : Z_Streamp) return Int;
pragma Inline (Inflate_Init);
function inflateInit2
(strm : in Z_Streamp;
windowBits : in Int;
......@@ -318,20 +310,6 @@ private package ZLib.Thin is
-- has dropped to zero. The application must initialize zalloc, zfree and
-- opaque before calling the init function.
function Need_In (strm : in Z_Stream) return Boolean;
-- return true when we do not need to setup Next_In and Avail_In fields.
pragma Inline (Need_In);
function Need_Out (strm : in Z_Stream) return Boolean;
-- return true when we do not need to setup Next_Out and Avail_Out field.
pragma Inline (Need_Out);
procedure Set_In
(Strm : in out Z_Stream;
Buffer : in Byte_Access;
Size : in UInt);
pragma Inline (Set_In);
procedure Set_In
(Strm : in out Z_Stream;
Buffer : in Voidp;
......@@ -340,12 +318,6 @@ private package ZLib.Thin is
procedure Set_Out
(Strm : in out Z_Stream;
Buffer : in Byte_Access;
Size : in UInt);
pragma Inline (Set_Out);
procedure Set_Out
(Strm : in out Z_Stream;
Buffer : in Voidp;
Size : in UInt);
pragma Inline (Set_Out);
......@@ -388,19 +360,13 @@ private package ZLib.Thin is
function zlibCompileFlags return ULong;
function deflatePrime
(strm : Z_Streamp;
bits : Int;
value : Int)
return Int;
private
type Z_Stream is record -- zlib.h:68
Next_In : Byte_Access; -- next input byte
Next_In : Voidp := Nul; -- next input byte
Avail_In : UInt := 0; -- number of bytes available at next_in
Total_In : ULong := 0; -- total nb of input bytes read so far
Next_Out : Byte_Access; -- next output byte should be put there
Next_Out : Voidp := Nul; -- next output byte should be put there
Avail_Out : UInt := 0; -- remaining free space at next_out
Total_Out : ULong := 0; -- total nb of bytes output so far
msg : Chars_Ptr; -- last error message, NULL if no error
......@@ -460,14 +426,13 @@ private
pragma Import (C, inflateSyncPoint, "inflateSyncPoint");
pragma Import (C, get_crc_table, "get_crc_table");
-- added in zlib 1.2.1:
-- since zlib 1.2.0:
pragma Import (C, inflateCopy, "inflateCopy");
pragma Import (C, compressBound, "compressBound");
pragma Import (C, deflateBound, "deflateBound");
pragma Import (C, gzungetc, "gzungetc");
pragma Import (C, zlibCompileFlags, "zlibCompileFlags");
pragma Import (C, deflatePrime, "deflatePrime");
pragma Import (C, inflateBackInit, "inflateBackInit_");
......
----------------------------------------------------------------
-- ZLib for Ada thick binding. --
-- --
-- Copyright (C) 2002-2003 Dmitriy Anisimkov --
-- Copyright (C) 2002-2004 Dmitriy Anisimkov --
-- --
-- Open source license information is in the zlib.ads file. --
----------------------------------------------------------------
-- $Id: zlib.adb,v 1.19 2003/07/13 16:02:19 vagul Exp $
-- $Id: zlib.adb,v 1.31 2004/09/06 06:53:19 vagul Exp $
with Ada.Exceptions;
with Ada.Unchecked_Conversion;
......@@ -34,7 +34,7 @@ package body ZLib is
VERSION_ERROR);
type Flate_Step_Function is access
function (Strm : Thin.Z_Streamp; flush : Thin.Int) return Thin.Int;
function (Strm : in Thin.Z_Streamp; Flush : in Thin.Int) return Thin.Int;
pragma Convention (C, Flate_Step_Function);
type Flate_End_Function is access
......@@ -82,13 +82,13 @@ package body ZLib is
Flush_Finish : constant array (Boolean) of Flush_Mode
:= (True => Finish, False => No_Flush);
procedure Raise_Error (Stream : Z_Stream);
procedure Raise_Error (Stream : in Z_Stream);
pragma Inline (Raise_Error);
procedure Raise_Error (Message : String);
procedure Raise_Error (Message : in String);
pragma Inline (Raise_Error);
procedure Check_Error (Stream : Z_Stream; Code : Thin.Int);
procedure Check_Error (Stream : in Z_Stream; Code : in Thin.Int);
procedure Free is new Ada.Unchecked_Deallocation
(Z_Stream, Z_Stream_Access);
......@@ -118,7 +118,7 @@ package body ZLib is
-- Check_Error --
-----------------
procedure Check_Error (Stream : Z_Stream; Code : Thin.Int) is
procedure Check_Error (Stream : in Z_Stream; Code : in Thin.Int) is
use type Thin.Int;
begin
if Code /= Thin.Z_OK then
......@@ -138,10 +138,11 @@ package body ZLib is
is
Code : Thin.Int;
begin
Code := Flate (Filter.Compression).Done
(To_Thin_Access (Filter.Strm));
if not Ignore_Error and then not Is_Open (Filter) then
raise Status_Error;
end if;
Filter.Opened := False;
Code := Flate (Filter.Compression).Done (To_Thin_Access (Filter.Strm));
if Ignore_Error or else Code = Thin.Z_OK then
Free (Filter.Strm);
......@@ -170,9 +171,8 @@ package body ZLib is
is
use Thin;
begin
return Unsigned_32 (crc32
(ULong (CRC),
Bytes.To_Pointer (Data'Address),
return Unsigned_32 (crc32 (ULong (CRC),
Data'Address,
Data'Length));
end CRC32;
......@@ -192,13 +192,17 @@ package body ZLib is
Level : in Compression_Level := Default_Compression;
Strategy : in Strategy_Type := Default_Strategy;
Method : in Compression_Method := Deflated;
Window_Bits : in Window_Bits_Type := 15;
Memory_Level : in Memory_Level_Type := 8;
Window_Bits : in Window_Bits_Type := Default_Window_Bits;
Memory_Level : in Memory_Level_Type := Default_Memory_Level;
Header : in Header_Type := Default)
is
use type Thin.Int;
Win_Bits : Thin.Int := Thin.Int (Window_Bits);
begin
if Is_Open (Filter) then
raise Status_Error;
end if;
-- We allow ZLib to make header only in case of default header type.
-- Otherwise we would either do header by ourselfs, or do not do
-- header at all.
......@@ -219,7 +223,6 @@ package body ZLib is
Filter.Strm := new Z_Stream;
Filter.Compression := True;
Filter.Stream_End := False;
Filter.Opened := True;
Filter.Header := Header;
if Thin.Deflate_Init
......@@ -256,8 +259,8 @@ package body ZLib is
procedure Generic_Translate
(Filter : in out ZLib.Filter_Type;
In_Buffer_Size : Integer := Default_Buffer_Size;
Out_Buffer_Size : Integer := Default_Buffer_Size)
In_Buffer_Size : in Integer := Default_Buffer_Size;
Out_Buffer_Size : in Integer := Default_Buffer_Size)
is
In_Buffer : Stream_Element_Array
(1 .. Stream_Element_Offset (In_Buffer_Size));
......@@ -275,18 +278,21 @@ package body ZLib is
loop
Translate
(Filter,
In_Buffer (In_First .. Last),
In_Last,
Out_Buffer,
Out_Last,
Flush_Finish (Last < In_Buffer'First));
(Filter => Filter,
In_Data => In_Buffer (In_First .. Last),
In_Last => In_Last,
Out_Data => Out_Buffer,
Out_Last => Out_Last,
Flush => Flush_Finish (Last < In_Buffer'First));
if Out_Buffer'First <= Out_Last then
Data_Out (Out_Buffer (Out_Buffer'First .. Out_Last));
end if;
exit Main when Stream_End (Filter);
-- The end of in buffer.
exit when In_Last = Last;
In_First := In_Last + 1;
......@@ -301,7 +307,7 @@ package body ZLib is
procedure Inflate_Init
(Filter : in out Filter_Type;
Window_Bits : in Window_Bits_Type := 15;
Window_Bits : in Window_Bits_Type := Default_Window_Bits;
Header : in Header_Type := Default)
is
use type Thin.Int;
......@@ -320,6 +326,10 @@ package body ZLib is
end Check_Version;
begin
if Is_Open (Filter) then
raise Status_Error;
end if;
case Header is
when None =>
Check_Version;
......@@ -347,7 +357,6 @@ package body ZLib is
Filter.Strm := new Z_Stream;
Filter.Compression := False;
Filter.Stream_End := False;
Filter.Opened := True;
Filter.Header := Header;
if Thin.Inflate_Init
......@@ -357,16 +366,25 @@ package body ZLib is
end if;
end Inflate_Init;
-------------
-- Is_Open --
-------------
function Is_Open (Filter : in Filter_Type) return Boolean is
begin
return Filter.Strm /= null;
end Is_Open;
-----------------
-- Raise_Error --
-----------------
procedure Raise_Error (Message : String) is
procedure Raise_Error (Message : in String) is
begin
Ada.Exceptions.Raise_Exception (ZLib_Error'Identity, Message);
end Raise_Error;
procedure Raise_Error (Stream : Z_Stream) is
procedure Raise_Error (Stream : in Z_Stream) is
begin
Raise_Error (Last_Error_Message (Stream));
end Raise_Error;
......@@ -378,21 +396,29 @@ package body ZLib is
procedure Read
(Filter : in out Filter_Type;
Item : out Ada.Streams.Stream_Element_Array;
Last : out Ada.Streams.Stream_Element_Offset)
Last : out Ada.Streams.Stream_Element_Offset;
Flush : in Flush_Mode := No_Flush)
is
In_Last : Stream_Element_Offset;
Item_First : Ada.Streams.Stream_Element_Offset := Item'First;
V_Flush : Flush_Mode := Flush;
begin
pragma Assert (Rest_First in Buffer'First .. Buffer'Last + 1);
pragma Assert (Rest_Last in Buffer'First - 1 .. Buffer'Last);
loop
if Rest_First > Buffer'Last then
if Rest_Last = Buffer'First - 1 then
V_Flush := Finish;
elsif Rest_First > Rest_Last then
Read (Buffer, Rest_Last);
Rest_First := Buffer'First;
end if;
pragma Assert (Rest_Last in Buffer'First - 1 .. Buffer'Last);
if Rest_Last < Buffer'First then
V_Flush := Finish;
end if;
end if;
Translate
(Filter => Filter,
......@@ -400,11 +426,13 @@ package body ZLib is
In_Last => In_Last,
Out_Data => Item (Item_First .. Item'Last),
Out_Last => Last,
Flush => Flush_Finish (Rest_Last < Rest_First));
Flush => V_Flush);
Rest_First := In_Last + 1;
exit when Last = Item'Last or else Stream_End (Filter);
exit when Stream_End (Filter)
or else Last = Item'Last
or else (Last >= Item'First and then Allow_Read_Some);
Item_First := Last + 1;
end loop;
......@@ -489,11 +517,11 @@ package body ZLib is
Code : Thin.Int;
begin
if Filter.Opened = False then
raise ZLib_Error;
if not Is_Open (Filter) then
raise Status_Error;
end if;
if Out_Data'Length = 0 then
if Out_Data'Length = 0 and then In_Data'Length = 0 then
raise Constraint_Error;
end if;
......@@ -514,7 +542,6 @@ package body ZLib is
- Stream_Element_Offset (Avail_In (Filter.Strm.all));
Out_Last := Out_Data'Last
- Stream_Element_Offset (Avail_Out (Filter.Strm.all));
end Translate_Auto;
--------------------
......@@ -604,7 +631,6 @@ package body ZLib is
Flush => Flush);
CRC32 (Filter.CRC, In_Data (In_Data'First .. In_Last));
end if;
if Filter.Stream_End and then Out_Last <= Out_Data'Last then
......@@ -642,10 +668,11 @@ package body ZLib is
procedure Write
(Filter : in out Filter_Type;
Item : in Ada.Streams.Stream_Element_Array;
Flush : in Flush_Mode)
Flush : in Flush_Mode := No_Flush)
is
Buffer : Stream_Element_Array (1 .. Buffer_Size);
In_Last, Out_Last : Stream_Element_Offset;
In_Last : Stream_Element_Offset;
Out_Last : Stream_Element_Offset;
In_First : Stream_Element_Offset := Item'First;
begin
if Item'Length = 0 and Flush = No_Flush then
......
......@@ -3,10 +3,10 @@ project Zlib is
for Languages use ("Ada");
for Source_Dirs use (".");
for Object_Dir use ".";
for Main use ("test.adb", "mtest.adb", "read.adb");
for Main use ("test.adb", "mtest.adb", "read.adb", "buffer_demo");
package Compiler is
for Default_Switches ("ada") use ("-gnatwbcfilopru", "-gnatVcdfimorst", "-gnatyabcefhiklmnoprst");
for Default_Switches ("ada") use ("-gnatwcfilopru", "-gnatVcdfimorst", "-gnatyabcefhiklmnoprst");
end Compiler;
package Linker is
......@@ -18,4 +18,3 @@ project Zlib is
end Builder;
end Zlib;
......@@ -152,7 +152,7 @@ procedure DecompressToUserBuf(const InBuf: Pointer; InBytes: Integer;
const OutBuf: Pointer; BufSize: Integer);
const
zlib_version = '1.2.1';
zlib_version = '1.2.3';
type
EZlibError = class(Exception);
......@@ -344,7 +344,7 @@ begin
strm.avail_out := OutBytes;
DCheck(inflateInit_(strm, zlib_version, sizeof(strm)));
try
while DCheck(inflate(strm, Z_FINISH)) <> Z_STREAM_END do
while DCheck(inflate(strm, Z_NO_FLUSH)) <> Z_STREAM_END do
begin
P := OutBuf;
Inc(OutBytes, BufInc);
......
......@@ -430,6 +430,9 @@ void FAR *out_desc;
}
}
/* handle error breaks in while */
if (mode == BAD) break;
/* build code tables */
state->next = state->codes;
lencode = (code const FAR *)(state->next);
......
......@@ -16,6 +16,10 @@
* zlib.h must be included before this header file.
*/
#ifdef __cplusplus
extern "C" {
#endif
ZEXTERN int ZEXPORT inflateBack9 OF((z_stream FAR *strm,
in_func in, void FAR *in_desc,
out_func out, void FAR *out_desc));
......@@ -27,3 +31,7 @@ ZEXTERN int ZEXPORT inflateBack9Init_ OF((z_stream FAR *strm,
#define inflateBack9Init(strm, window) \
inflateBack9Init_((strm), (window), \
ZLIB_VERSION, sizeof(z_stream))
#ifdef __cplusplus
}
#endif
/* inftree9.c -- generate Huffman trees for efficient decoding
* Copyright (C) 1995-2003 Mark Adler
* Copyright (C) 1995-2005 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
......@@ -9,7 +9,7 @@
#define MAXBITS 15
const char inflate9_copyright[] =
" inflate9 1.2.1 Copyright 1995-2003 Mark Adler ";
" inflate9 1.2.3 Copyright 1995-2005 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, 76, 66};
133, 133, 133, 133, 144, 201, 196};
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,
......@@ -128,7 +128,7 @@ unsigned short FAR *work;
left -= count[len];
if (left < 0) return -1; /* over-subscribed */
}
if (left > 0 && (type == CODES || (codes - count[0] != 1)))
if (left > 0 && (type == CODES || max != 1))
return -1; /* incomplete set */
/* generate offsets into symbol table for each length for sorting */
......
......@@ -36,12 +36,12 @@ typedef struct {
*/
/* Maximum size of dynamic tree. The maximum found in a long but non-
exhaustive search was 1004 code structures (850 for length/literals
and 154 for distances, the latter actually the result of an
exhaustive search was 1444 code structures (852 for length/literals
and 592 for distances, the latter actually the result of an
exhaustive search). The true maximum is not known, but the value
below is more than safe. */
#define ENOUGH 1440
#define MAXD 154
#define ENOUGH 2048
#define MAXD 592
/* Type of code to build for inftable() */
typedef enum {
......
......@@ -188,17 +188,8 @@
/*
* typedef enum inflate_mode consts, in inflate.h
*/
#ifndef NO_GUNZIP
#define GUNZIP
#endif
#ifdef GUNZIP
#define INFLATE_MODE_TYPE 11 /* state->mode flags enum-ed in inflate.h */
#define INFLATE_MODE_BAD 26
#else
#define INFLATE_MODE_TYPE 3
#define INFLATE_MODE_BAD 17
#endif
#if ! defined( USE_MMX ) && ! defined( NO_MMX )
......
......@@ -12,6 +12,8 @@
; Based on match.S
; Written for zlib 1.1.2
; Copyright (C) 1998 Brian Raiter <breadbox@muppetlabs.com>
;
; Modified by Gilles Vollant (2005) for add gzhead and gzindex
.686P
.MODEL FLAT
......@@ -39,6 +41,9 @@ ds_pending_buf_size dd ?
ds_pending_out dd ?
ds_pending dd ?
ds_wrap dd ?
; gzhead and gzindex are added in zlib 1.2.2.2 (see deflate.h)
ds_gzhead dd ?
ds_gzindex dd ?
ds_data_type db ?
ds_method db ?
db ? ; padding
......
;
; gvmat32.asm -- Asm portion of the optimized longest_match for 32 bits x86
; Copyright (C) 1995-1996 Jean-loup Gailly and Gilles Vollant.
; File written by Gilles Vollant, by modifiying the longest_match
; from Jean-loup Gailly in deflate.c
; It need wmask == 0x7fff
; (assembly code is faster with a fixed wmask)
;
; For Visual C++ 4.2 and ML 6.11c (version in directory \MASM611C of Win95 DDK)
; I compile with : "ml /coff /Zi /c gvmat32.asm"
; http://www.zlib.net
; http://www.winimage.com/zLibDll
; http://www.muppetlabs.com/~breadbox/software/assembly.html
;
; For Visual C++ 4.x and higher and ML 6.x and higher
; ml.exe is in directory \MASM611C of Win95 DDK
; ml.exe is also distributed in http://www.masm32.com/masmdl.htm
; and in VC++2003 toolkit at http://msdn.microsoft.com/visualc/vctoolkit2003/
;
; this file contain two implementation of longest_match
;
; longest_match_7fff : written 1996 by Gilles Vollant optimized for
; first Pentium. Assume s->w_mask == 0x7fff
; longest_match_686 : written by Brian raiter (1998), optimized for Pentium Pro
;
; for using an seembly version of longest_match, you need define ASMV in project
; There is two way in using gvmat32.asm
;
; A) Suggested method
; if you want include both longest_match_7fff and longest_match_686
; compile the asm file running
; ml /coff /Zi /Flgvmat32.lst /c gvmat32.asm
; and include gvmat32c.c in your project
; if you have an old cpu (386,486 or first Pentium) and s->w_mask==0x7fff,
; longest_match_7fff will be used
; if you have a more modern CPU (Pentium Pro, II and higher)
; longest_match_686 will be used
; on old cpu with s->w_mask!=0x7fff, longest_match_686 will be used,
; but this is not a sitation you'll find often
;
; B) Alternative
; if you are not interresed in old cpu performance and want the smaller
; binaries possible
;
; compile the asm file running
; ml /coff /Zi /c /Flgvmat32.lst /DNOOLDPENTIUMCODE gvmat32.asm
; and do not include gvmat32c.c in your project (ou define also
; NOOLDPENTIUMCODE)
;
; note : as I known, longest_match_686 is very faster than longest_match_7fff
; on pentium Pro/II/III, faster (but less) in P4, but it seem
; longest_match_7fff can be faster (very very litte) on AMD Athlon64/K8
;
; see below : zlib1222add must be adjuster if you use a zlib version < 1.2.2.2
;uInt longest_match_7fff(s, cur_match)
; deflate_state *s;
......@@ -47,33 +85,48 @@
; all the +4 offsets are due to the addition of pending_buf_size (in zlib
; in the deflate_state structure since the asm code was first written
; (if you compile with zlib 1.0.4 or older, remove the +4).
; 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").
zlib1222add equ 8
; Note : these value are good with a 8 bytes boundary pack structure
dep_chain_length equ 70h+4
dep_window equ 2ch+4
dep_strstart equ 60h+4
dep_prev_length equ 6ch+4
dep_nice_match equ 84h+4
dep_w_size equ 20h+4
dep_prev equ 34h+4
dep_w_mask equ 28h+4
dep_good_match equ 80h+4
dep_match_start equ 64h+4
dep_lookahead equ 68h+4
dep_chain_length equ 74h+zlib1222add
dep_window equ 30h+zlib1222add
dep_strstart equ 64h+zlib1222add
dep_prev_length equ 70h+zlib1222add
dep_nice_match equ 88h+zlib1222add
dep_w_size equ 24h+zlib1222add
dep_prev equ 38h+zlib1222add
dep_w_mask equ 2ch+zlib1222add
dep_good_match equ 84h+zlib1222add
dep_match_start equ 68h+zlib1222add
dep_lookahead equ 6ch+zlib1222add
_TEXT segment
IFDEF NOUNDERLINE
IFDEF NOOLDPENTIUMCODE
public longest_match
public match_init
ELSE
public longest_match_7fff
public cpudetect32
public longest_match_686
; public match_init
ENDIF
ELSE
IFDEF NOOLDPENTIUMCODE
public _longest_match
public _match_init
ELSE
public _longest_match_7fff
public _cpudetect32
public _longest_match_686
; public _match_init
ENDIF
ENDIF
MAX_MATCH equ 258
......@@ -82,17 +135,7 @@ ENDIF
IFDEF NOUNDERLINE
;match_init proc near
; ret
;match_init endp
ELSE
;_match_init proc near
; ret
;_match_init endp
ENDIF
IFNDEF NOOLDPENTIUMCODE
IFDEF NOUNDERLINE
longest_match_7fff proc near
ELSE
......@@ -558,9 +601,7 @@ cpudetect32 endp
ELSE
_cpudetect32 endp
ENDIF
ENDIF
MAX_MATCH equ 258
MIN_MATCH equ 3
......@@ -597,19 +638,19 @@ curmatch equ esp + 60
;;; program to crash horribly, without so much as a warning at
;;; compile time. Sigh.)
dsWSize equ 36
dsWMask equ 44
dsWindow equ 48
dsPrev equ 56
dsMatchLen equ 88
dsPrevMatch equ 92
dsStrStart equ 100
dsMatchStart equ 104
dsLookahead equ 108
dsPrevLen equ 112
dsMaxChainLen equ 116
dsGoodMatch equ 132
dsNiceMatch equ 136
dsWSize equ 36+zlib1222add
dsWMask equ 44+zlib1222add
dsWindow equ 48+zlib1222add
dsPrev equ 56+zlib1222add
dsMatchLen equ 88+zlib1222add
dsPrevMatch equ 92+zlib1222add
dsStrStart equ 100+zlib1222add
dsMatchStart equ 104+zlib1222add
dsLookahead equ 108+zlib1222add
dsPrevLen equ 112+zlib1222add
dsMaxChainLen equ 116+zlib1222add
dsGoodMatch equ 132+zlib1222add
dsNiceMatch equ 136+zlib1222add
;;; match.asm -- Pentium-Pro-optimized version of longest_match()
......@@ -628,13 +669,20 @@ dsNiceMatch equ 136
;;; uInt longest_match(deflate_state *deflatestate, IPos curmatch)
;_longest_match:
IFDEF NOUNDERLINE
longest_match_686 proc near
IFDEF NOOLDPENTIUMCODE
IFDEF NOUNDERLINE
longest_match proc near
ELSE
_longest_match proc near
ENDIF
ELSE
_longest_match_686 proc near
IFDEF NOUNDERLINE
longest_match_686 proc near
ELSE
_longest_match_686 proc near
ENDIF
ENDIF
;;; Save registers that the compiler may be using, and adjust esp to
;;; make room for our stack frame.
......@@ -895,10 +943,29 @@ LookaheadRet:
; Your can freely use gvmat32 in any free or commercial app if you don't remove the string in the binary!
db 0dh,0ah,"asm686 with masm, optimised assembly code from Brian Raiter, written 1998",0dh,0ah
IFDEF NOUNDERLINE
longest_match_686 endp
IFDEF NOOLDPENTIUMCODE
IFDEF NOUNDERLINE
longest_match endp
ELSE
_longest_match endp
ENDIF
IFDEF NOUNDERLINE
match_init proc near
ret
match_init endp
ELSE
_match_init proc near
ret
_match_init endp
ENDIF
ELSE
_longest_match_686 endp
IFDEF NOUNDERLINE
longest_match_686 endp
ELSE
_longest_match_686 endp
ENDIF
ENDIF
_TEXT ends
......
......@@ -6,16 +6,12 @@
* longest_match execute standard C code is wmask != 0x7fff
* (assembly code is faster with a fixed wmask)
*
* Read comment at beginning of gvmat32.asm for more information
*/
#if defined(ASMV) && (!defined(NOOLDPENTIUMCODE))
#include "deflate.h"
#ifdef ASMV
#define NIL 0
#define UNALIGNED_OK
/* if your C compiler don't add underline before function name,
define ADD_UNDERLINE_ASMFUNC */
#ifdef ADD_UNDERLINE_ASMFUNC
......@@ -25,11 +21,6 @@
#endif
void match_init()
{
}
unsigned long cpudetect32();
uInt longest_match_c(
......@@ -45,162 +36,27 @@ uInt longest_match_686(
deflate_state *s,
IPos cur_match); /* current match */
uInt longest_match(
deflate_state *s,
IPos cur_match) /* current match */
{
static uInt iIsPPro=2;
if ((s->w_mask == 0x7fff) && (iIsPPro==0))
return longest_match_7fff(s,cur_match);
if (iIsPPro==1)
return longest_match_686(s,cur_match);
static uInt iIsPPro=2;
if (iIsPPro==2)
void match_init ()
{
iIsPPro = (((cpudetect32()/0x100)&0xf)>=6) ? 1 : 0;
return longest_match_c(s,cur_match);
}
uInt longest_match_c(s, cur_match)
deflate_state *s;
IPos cur_match; /* current match */
uInt longest_match(
deflate_state *s,
IPos cur_match) /* current match */
{
unsigned chain_length = s->max_chain_length;/* max hash chain length */
register Bytef *scan = s->window + s->strstart; /* current string */
register Bytef *match; /* matched string */
register int len; /* length of current match */
int best_len = s->prev_length; /* best match length so far */
int nice_match = s->nice_match; /* stop if match long enough */
IPos limit = s->strstart > (IPos)MAX_DIST(s) ?
s->strstart - (IPos)MAX_DIST(s) : NIL;
/* Stop when cur_match becomes <= limit. To simplify the code,
* we prevent matches with the string of window index 0.
*/
Posf *prev = s->prev;
uInt wmask = s->w_mask;
#ifdef UNALIGNED_OK
/* Compare two bytes at a time. Note: this is not always beneficial.
* Try with and without -DUNALIGNED_OK to check.
*/
register Bytef *strend = s->window + s->strstart + MAX_MATCH - 1;
register ush scan_start = *(ushf*)scan;
register ush scan_end = *(ushf*)(scan+best_len-1);
#else
register Bytef *strend = s->window + s->strstart + MAX_MATCH;
register Byte scan_end1 = scan[best_len-1];
register Byte scan_end = scan[best_len];
#endif
/* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.
* It is easy to get rid of this optimization if necessary.
*/
Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever");
/* Do not waste too much time if we already have a good match: */
if (s->prev_length >= s->good_match) {
chain_length >>= 2;
}
/* Do not look for matches beyond the end of the input. This is necessary
* to make deflate deterministic.
*/
if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead;
Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead");
do {
Assert(cur_match < s->strstart, "no future");
match = s->window + cur_match;
/* Skip to next match if the match length cannot increase
* or if the match length is less than 2:
*/
#if (defined(UNALIGNED_OK) && MAX_MATCH == 258)
/* This code assumes sizeof(unsigned short) == 2. Do not use
* UNALIGNED_OK if your compiler uses a different size.
*/
if (*(ushf*)(match+best_len-1) != scan_end ||
*(ushf*)match != scan_start) continue;
/* It is not necessary to compare scan[2] and match[2] since they are
* always equal when the other bytes match, given that the hash keys
* are equal and that HASH_BITS >= 8. Compare 2 bytes at a time at
* strstart+3, +5, ... up to strstart+257. We check for insufficient
* lookahead only every 4th comparison; the 128th check will be made
* at strstart+257. If MAX_MATCH-2 is not a multiple of 8, it is
* necessary to put more guard bytes at the end of the window, or
* to check more often for insufficient lookahead.
*/
Assert(scan[2] == match[2], "scan[2]?");
scan++, match++;
do {
} while (*(ushf*)(scan+=2) == *(ushf*)(match+=2) &&
*(ushf*)(scan+=2) == *(ushf*)(match+=2) &&
*(ushf*)(scan+=2) == *(ushf*)(match+=2) &&
*(ushf*)(scan+=2) == *(ushf*)(match+=2) &&
scan < strend);
/* The funny "do {}" generates better code on most compilers */
/* Here, scan <= window+strstart+257 */
Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan");
if (*scan == *match) scan++;
len = (MAX_MATCH - 1) - (int)(strend-scan);
scan = strend - (MAX_MATCH-1);
#else /* UNALIGNED_OK */
if (match[best_len] != scan_end ||
match[best_len-1] != scan_end1 ||
*match != *scan ||
*++match != scan[1]) continue;
/* The check at best_len-1 can be removed because it will be made
* again later. (This heuristic is not always a win.)
* It is not necessary to compare scan[2] and match[2] since they
* are always equal when the other bytes match, given that
* the hash keys are equal and that HASH_BITS >= 8.
*/
scan += 2, match++;
Assert(*scan == *match, "match[2]?");
if (iIsPPro!=0)
return longest_match_686(s,cur_match);
/* We check for insufficient lookahead only every 8th comparison;
* the 256th check will be made at strstart+258.
*/
do {
} while (*++scan == *++match && *++scan == *++match &&
*++scan == *++match && *++scan == *++match &&
*++scan == *++match && *++scan == *++match &&
*++scan == *++match && *++scan == *++match &&
scan < strend);
Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan");
len = MAX_MATCH - (int)(strend - scan);
scan = strend - MAX_MATCH;
#endif /* UNALIGNED_OK */
if (len > best_len) {
s->match_start = cur_match;
best_len = len;
if (len >= nice_match) break;
#ifdef UNALIGNED_OK
scan_end = *(ushf*)(scan+best_len-1);
#else
scan_end1 = scan[best_len-1];
scan_end = scan[best_len];
#endif
}
} while ((cur_match = prev[cur_match & wmask]) > limit
&& --chain_length != 0);
if (s->w_mask != 0x7fff)
return longest_match_686(s,cur_match);
if ((uInt)best_len <= s->lookahead) return (uInt)best_len;
return s->lookahead;
/* now ((s->w_mask == 0x7fff) && (iIsPPro==0)) */
return longest_match_7fff(s,cur_match);
}
#endif /* ASMV */
#endif /* defined(ASMV) && (!defined(NOOLDPENTIUMCODE)) */
;/* inffas32.asm is a hand tuned assembler version of inffast.c -- fast decoding
; *
; * inffas32.asm is derivated from inffas86.c, with translation of assembly code
; *
; * Copyright (C) 1995-2003 Mark Adler
; * For conditions of distribution and use, see copyright notice in zlib.h
; *
; * Copyright (C) 2003 Chris Anderson <christop@charm.net>
; * Please use the copyright conditions above.
; *
; * Mar-13-2003 -- Most of this is derived from inffast.S which is derived from
; * the gcc -S output of zlib-1.2.0/inffast.c. Zlib-1.2.0 is in beta release at
; * the moment. I have successfully compiled and tested this code with gcc2.96,
; * gcc3.2, icc5.0, msvc6.0. It is very close to the speed of inffast.S
; * compiled with gcc -DNO_MMX, but inffast.S is still faster on the P3 with MMX
; * enabled. I will attempt to merge the MMX code into this version. Newer
; * versions of this and inffast.S can be found at
; * http://www.eetbeetee.com/zlib/ and http://www.charm.net/~christop/zlib/
; *
; * 2005 : modification by Gilles Vollant
; */
; For Visual C++ 4.x and higher and ML 6.x and higher
; ml.exe is in directory \MASM611C of Win95 DDK
; ml.exe is also distributed in http://www.masm32.com/masmdl.htm
; and in VC++2003 toolkit at http://msdn.microsoft.com/visualc/vctoolkit2003/
;
;
; compile with command line option
; ml /coff /Zi /c /Flinffas32.lst inffas32.asm
; if you define NO_GZIP (see inflate.h), compile with
; ml /coff /Zi /c /Flinffas32.lst /DNO_GUNZIP inffas32.asm
; zlib122sup is 0 fort zlib 1.2.2.1 and lower
; zlib122sup is 8 fort zlib 1.2.2.2 and more (with addition of dmax and head
; in inflate_state in inflate.h)
zlib1222sup equ 8
IFDEF GUNZIP
INFLATE_MODE_TYPE equ 11
INFLATE_MODE_BAD equ 26
ELSE
IFNDEF NO_GUNZIP
INFLATE_MODE_TYPE equ 11
INFLATE_MODE_BAD equ 26
ELSE
INFLATE_MODE_TYPE equ 3
INFLATE_MODE_BAD equ 17
ENDIF
ENDIF
; 75 "inffast.S"
;FILE "inffast.S"
......@@ -84,17 +138,16 @@ dd 2147483647
dd 4294967295
mode_state equ 0 ;/* state->mode */
wsize_state equ 32 ;/* state->wsize */
write_state equ (36+4) ;/* state->write */
window_state equ (40+4) ;/* state->window */
hold_state equ (44+4) ;/* state->hold */
bits_state equ (48+4) ;/* state->bits */
lencode_state equ (64+4) ;/* state->lencode */
distcode_state equ (68+4) ;/* state->distcode */
lenbits_state equ (72+4) ;/* state->lenbits */
distbits_state equ (76+4) ;/* state->distbits */
wsize_state equ (32+zlib1222sup) ;/* state->wsize */
write_state equ (36+4+zlib1222sup) ;/* state->write */
window_state equ (40+4+zlib1222sup) ;/* state->window */
hold_state equ (44+4+zlib1222sup) ;/* state->hold */
bits_state equ (48+4+zlib1222sup) ;/* state->bits */
lencode_state equ (64+4+zlib1222sup) ;/* state->lencode */
distcode_state equ (68+4+zlib1222sup) ;/* state->distcode */
lenbits_state equ (72+4+zlib1222sup) ;/* state->lenbits */
distbits_state equ (76+4+zlib1222sup) ;/* state->distbits */
;;SECTION .text
......@@ -868,7 +921,7 @@ L_invalid_distance_code:
mov ecx, invalid_distance_code_msg
mov edx,26
mov edx,INFLATE_MODE_BAD
jmp L_update_stream_state
L_test_for_end_of_block:
......@@ -881,7 +934,7 @@ L_test_for_end_of_block:
jz L_invalid_literal_length_code
mov ecx,0
mov edx,11
mov edx,INFLATE_MODE_TYPE
jmp L_update_stream_state
L_invalid_literal_length_code:
......@@ -891,7 +944,7 @@ L_invalid_literal_length_code:
mov ecx, invalid_literal_length_code_msg
mov edx,26
mov edx,INFLATE_MODE_BAD
jmp L_update_stream_state
L_invalid_distance_too_far:
......@@ -900,7 +953,7 @@ L_invalid_distance_too_far:
mov esi, [esp+44]
mov ecx, invalid_distance_too_far_msg
mov edx,26
mov edx,INFLATE_MODE_BAD
jmp L_update_stream_state
L_update_stream_state:
......@@ -1026,8 +1079,5 @@ L_done:
pop edi
ret
_TEXT ends
end
cl /I..\.. /O2 /c gvmat32c.c
cl /DASMV /I..\.. /O2 /c gvmat32c.c
ml /coff /Zi /c /Flgvmat32.lst gvmat32.asm
ml /coff /Zi /c /Flinffas32.lst inffas32.asm
/* crypt.h -- base code for crypt/uncrypt ZIPfile
Version 1.00, September 10th, 2003
Version 1.01e, February 12th, 2005
Copyright (C) 1998-2003 Gilles Vollant
Copyright (C) 1998-2005 Gilles Vollant
This code is a modified version of crypting code in Infozip distribution
......
/* ioapi.c -- IO base function header for compress/uncompress .zip
files using zlib + zip or unzip API
Version 1.00, September 10th, 2003
Version 1.01e, February 12th, 2005
Copyright (C) 1998-2003 Gilles Vollant
Copyright (C) 1998-2005 Gilles Vollant
*/
#include <stdio.h>
......@@ -94,7 +94,7 @@ uLong ZCALLBACK fread_file_func (opaque, stream, buf, size)
uLong size;
{
uLong ret;
ret = fread(buf, 1, (size_t)size, (FILE *)stream);
ret = (uLong)fread(buf, 1, (size_t)size, (FILE *)stream);
return ret;
}
......@@ -106,7 +106,7 @@ uLong ZCALLBACK fwrite_file_func (opaque, stream, buf, size)
uLong size;
{
uLong ret;
ret = fwrite(buf, 1, (size_t)size, (FILE *)stream);
ret = (uLong)fwrite(buf, 1, (size_t)size, (FILE *)stream);
return ret;
}
......
/* ioapi.h -- IO base function header for compress/uncompress .zip
files using zlib + zip or unzip API
Version 1.00, September 10th, 2003
Version 1.01e, February 12th, 2005
Copyright (C) 1998-2003 Gilles Vollant
Copyright (C) 1998-2005 Gilles Vollant
*/
#ifndef _ZLIBIOAPI_H
......
......@@ -2,9 +2,9 @@
files using zlib + zip or unzip API
This IO API version uses the Win32 API (for Microsoft Windows)
Version 1.00, September 10th, 2003
Version 1.01e, February 12th, 2005
Copyright (C) 1998-2003 Gilles Vollant
Copyright (C) 1998-2005 Gilles Vollant
*/
#include <stdlib.h>
......
......@@ -2,9 +2,9 @@
files using zlib + zip or unzip API
This IO API version uses the Win32 API (for Microsoft Windows)
Version 1.00, September 10th, 2003
Version 1.01e, February 12th, 2005
Copyright (C) 1998-2003 Gilles Vollant
Copyright (C) 1998-2005 Gilles Vollant
*/
#include <windows.h>
......
......@@ -10,7 +10,7 @@ unit zlibpas;
interface
const
ZLIB_VERSION = '1.2.1';
ZLIB_VERSION = '1.2.3';
type
alloc_func = function(opaque: Pointer; items, size: Integer): Pointer;
......
/*
* puff.c
* Copyright (C) 2002, 2003 Mark Adler
* Copyright (C) 2002-2004 Mark Adler
* For conditions of distribution and use, see copyright notice in puff.h
* version 1.7, 3 Mar 2003
* version 1.8, 9 Jan 2004
*
* puff.c is a simple inflate written to be an unambiguous way to specify the
* deflate format. It is not written for speed but rather simplicity. As a
......@@ -60,6 +60,7 @@
* 1.6 7 Aug 2002 - Minor format changes
* 1.7 3 Mar 2003 - Added test code for distribution
* - Added zlib-like license
* 1.8 9 Jan 2004 - Added some comments on no distance codes case
*/
#include <setjmp.h> /* for setjmp(), longjmp(), and jmp_buf */
......@@ -577,6 +578,9 @@ local int fixed(struct state *s)
* block is fewer bits), but it is allowed by the format. So incomplete
* literal/length codes of one symbol should also be permitted.
*
* - If there are only literal codes and no lengths, then there are no distance
* codes. This is represented by one distance code with zero bits.
*
* - The list of up to 286 length/literal lengths and up to 30 distance lengths
* are themselves compressed using Huffman codes and run-length encoding. In
* the list of code lengths, a 0 symbol means no code, a 1..15 symbol means
......
#include <stdio.h>
#include <stdlib.h>
#include <windows.h>
#include "zlib.h"
void MyDoMinus64(LARGE_INTEGER *R,LARGE_INTEGER A,LARGE_INTEGER B)
{
R->HighPart = A.HighPart - B.HighPart;
if (A.LowPart >= B.LowPart)
R->LowPart = A.LowPart - B.LowPart;
else
{
R->LowPart = A.LowPart - B.LowPart;
R->HighPart --;
}
}
#ifdef _M_X64
// see http://msdn2.microsoft.com/library/twchhe95(en-us,vs.80).aspx for __rdtsc
unsigned __int64 __rdtsc(void);
void BeginCountRdtsc(LARGE_INTEGER * pbeginTime64)
{
// printf("rdtsc = %I64x\n",__rdtsc());
pbeginTime64->QuadPart=__rdtsc();
}
LARGE_INTEGER GetResRdtsc(LARGE_INTEGER beginTime64,BOOL fComputeTimeQueryPerf)
{
LARGE_INTEGER LIres;
unsigned _int64 res=__rdtsc()-((unsigned _int64)(beginTime64.QuadPart));
LIres.QuadPart=res;
// printf("rdtsc = %I64x\n",__rdtsc());
return LIres;
}
#else
#ifdef _M_IX86
void myGetRDTSC32(LARGE_INTEGER * pbeginTime64)
{
DWORD dwEdx,dwEax;
_asm
{
rdtsc
mov dwEax,eax
mov dwEdx,edx
}
pbeginTime64->LowPart=dwEax;
pbeginTime64->HighPart=dwEdx;
}
void BeginCountRdtsc(LARGE_INTEGER * pbeginTime64)
{
myGetRDTSC32(pbeginTime64);
}
LARGE_INTEGER GetResRdtsc(LARGE_INTEGER beginTime64,BOOL fComputeTimeQueryPerf)
{
LARGE_INTEGER LIres,endTime64;
myGetRDTSC32(&endTime64);
LIres.LowPart=LIres.HighPart=0;
MyDoMinus64(&LIres,endTime64,beginTime64);
return LIres;
}
#else
void myGetRDTSC32(LARGE_INTEGER * pbeginTime64)
{
}
void BeginCountRdtsc(LARGE_INTEGER * pbeginTime64)
{
}
LARGE_INTEGER GetResRdtsc(LARGE_INTEGER beginTime64,BOOL fComputeTimeQueryPerf)
{
LARGE_INTEGER lr;
lr.QuadPart=0;
return lr;
}
#endif
#endif
void BeginCountPerfCounter(LARGE_INTEGER * pbeginTime64,BOOL fComputeTimeQueryPerf)
{
if ((!fComputeTimeQueryPerf) || (!QueryPerformanceCounter(pbeginTime64)))
{
pbeginTime64->LowPart = GetTickCount();
pbeginTime64->HighPart = 0;
}
}
DWORD GetMsecSincePerfCounter(LARGE_INTEGER beginTime64,BOOL fComputeTimeQueryPerf)
{
LARGE_INTEGER endTime64,ticksPerSecond,ticks;
DWORDLONG ticksShifted,tickSecShifted;
DWORD dwLog=16+0;
DWORD dwRet;
if ((!fComputeTimeQueryPerf) || (!QueryPerformanceCounter(&endTime64)))
dwRet = (GetTickCount() - beginTime64.LowPart)*1;
else
{
MyDoMinus64(&ticks,endTime64,beginTime64);
QueryPerformanceFrequency(&ticksPerSecond);
{
ticksShifted = Int64ShrlMod32(*(DWORDLONG*)&ticks,dwLog);
tickSecShifted = Int64ShrlMod32(*(DWORDLONG*)&ticksPerSecond,dwLog);
}
dwRet = (DWORD)((((DWORD)ticksShifted)*1000)/(DWORD)(tickSecShifted));
dwRet *=1;
}
return dwRet;
}
int ReadFileMemory(const char* filename,long* plFileSize,void** pFilePtr)
{
FILE* stream;
......@@ -43,7 +155,8 @@ int main(int argc, char *argv[])
unsigned char* CprPtr;
unsigned char* UncprPtr;
long lSizeCpr,lSizeUncpr;
DWORD dwGetTick;
DWORD dwGetTick,dwMsecQP;
LARGE_INTEGER li_qp,li_rdtsc,dwResRdtsc;
if (argc<=1)
{
......@@ -71,9 +184,10 @@ int main(int argc, char *argv[])
lBufferSizeUncpr = lBufferSizeCpr;
CprPtr=(unsigned char*)malloc(lBufferSizeCpr + BlockSizeCompress);
UncprPtr=(unsigned char*)malloc(lBufferSizeUncpr + BlockSizeUncompress);
BeginCountPerfCounter(&li_qp,TRUE);
dwGetTick=GetTickCount();
BeginCountRdtsc(&li_rdtsc);
{
z_stream zcpr;
int ret=Z_OK;
......@@ -101,11 +215,20 @@ int main(int argc, char *argv[])
lSizeCpr=zcpr.total_out;
deflateEnd(&zcpr);
dwGetTick=GetTickCount()-dwGetTick;
dwMsecQP=GetMsecSincePerfCounter(li_qp,TRUE);
dwResRdtsc=GetResRdtsc(li_rdtsc,TRUE);
printf("total compress size = %u, in %u step\n",lSizeCpr,step);
printf("time = %u msec = %f sec\n\n",dwGetTick,dwGetTick/(double)1000.);
printf("time = %u msec = %f sec\n",dwGetTick,dwGetTick/(double)1000.);
printf("defcpr time QP = %u msec = %f sec\n",dwMsecQP,dwMsecQP/(double)1000.);
printf("defcpr result rdtsc = %I64x\n\n",dwResRdtsc.QuadPart);
}
CprPtr=(unsigned char*)realloc(CprPtr,lSizeCpr);
UncprPtr=(unsigned char*)malloc(lBufferSizeUncpr + BlockSizeUncompress);
BeginCountPerfCounter(&li_qp,TRUE);
dwGetTick=GetTickCount();
BeginCountRdtsc(&li_rdtsc);
{
z_stream zcpr;
int ret=Z_OK;
......@@ -133,8 +256,12 @@ int main(int argc, char *argv[])
lSizeUncpr=zcpr.total_out;
inflateEnd(&zcpr);
dwGetTick=GetTickCount()-dwGetTick;
dwMsecQP=GetMsecSincePerfCounter(li_qp,TRUE);
dwResRdtsc=GetResRdtsc(li_rdtsc,TRUE);
printf("total uncompress size = %u, in %u step\n",lSizeUncpr,step);
printf("time = %u msec = %f sec\n\n",dwGetTick,dwGetTick/(double)1000.);
printf("time = %u msec = %f sec\n",dwGetTick,dwGetTick/(double)1000.);
printf("uncpr time QP = %u msec = %f sec\n",dwMsecQP,dwMsecQP/(double)1000.);
printf("uncpr result rdtsc = %I64x\n\n",dwResRdtsc.QuadPart);
}
if (lSizeUncpr==lFileSize)
......@@ -145,5 +272,4 @@ int main(int argc, char *argv[])
}
return 0;
}
Building instructions for the DLL versions of Zlib 1.21
=======================================================
Building instructions for the DLL versions of Zlib 1.2.3
========================================================
This directory contains projects that build zlib and minizip using
Microsoft Visual C++ 7.0/7.1.
Microsoft Visual C++ 7.0/7.1, and Visual C++ .
You don't need to build these projects yourself. You can download the
binaries from:
......@@ -11,18 +11,36 @@ binaries from:
More information can be found at this site.
Build instructions
------------------
- Unzip zlib*.zip and copy the files from contrib\vstudio\vc7,
from contrib\vstudio\masmx86 and from contrib\minizip into the same
directory.
Build instructions for Visual Studio 7.x (32 bits)
--------------------------------------------------
- Uncompress current zlib, including all contrib/* files
- Download the crtdll library from
http://www.winimage.com/zLibDll/crtdll.zip
Unzip crtdll.zip to extract crtdll.lib.
- If you are using x86, use the Release target.
- Open zlibvc.sln with Microsoft Visual C++ 7.0 or 7.1
Unzip crtdll.zip to extract crtdll.lib on contrib\vstudio\vc7.
- Open contrib\vstudio\vc7\zlibvc.sln with Microsoft Visual C++ 7.x
(Visual Studio .Net 2002 or 2003).
Build instructions for Visual Studio 2005 (32 bits or 64 bits)
--------------------------------------------------------------
- Uncompress current zlib, including all contrib/* files
- For 32 bits only: download the crtdll library from
http://www.winimage.com/zLibDll/crtdll.zip
Unzip crtdll.zip to extract crtdll.lib on contrib\vstudio\vc8.
- Open contrib\vstudio\vc8\zlibvc.sln with Microsoft Visual C++ 8.0
Build instructions for Visual Studio 2005 64 bits, PSDK compiler
----------------------------------------------------------------
at the time of writing this text file, Visual Studio 2005 (and
Microsoft Visual C++ 8.0) is on the beta 2 stage.
Using you can get the free 64 bits compiler from Platform SDK,
which is NOT a beta, and compile using the Visual studio 2005 IDE
see http://www.winimage.com/misc/sdk64onvs2005/ for instruction
- Uncompress current zlib, including all contrib/* files
- start Visual Studio 2005 from a platform SDK command prompt, using
the /useenv switch
- Open contrib\vstudio\vc8\zlibvc.sln with Microsoft Visual C++ 8.0
Important
---------
......
......@@ -19,6 +19,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\..;..\..\minizip"
PreprocessorDefinitions="WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE"
MinimalRebuild="TRUE"
BasicRuntimeChecks="3"
......@@ -63,6 +64,7 @@
Optimization="2"
InlineFunctionExpansion="1"
OmitFramePointers="TRUE"
AdditionalIncludeDirectories="..\..\..;..\..\minizip"
PreprocessorDefinitions="WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE"
StringPooling="TRUE"
RuntimeLibrary="4"
......@@ -104,7 +106,7 @@
Name="Source Files"
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm">
<File
RelativePath="miniunz.c">
RelativePath="..\..\minizip\miniunz.c">
</File>
</Filter>
<Filter
......@@ -116,7 +118,7 @@
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
</Filter>
<File
RelativePath="zlibwapi.lib">
RelativePath="ReleaseDll\zlibwapi.lib">
</File>
</Files>
<Globals>
......
......@@ -19,6 +19,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\..;..\..\minizip"
PreprocessorDefinitions="WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE"
MinimalRebuild="TRUE"
BasicRuntimeChecks="3"
......@@ -63,6 +64,7 @@
Optimization="2"
InlineFunctionExpansion="1"
OmitFramePointers="TRUE"
AdditionalIncludeDirectories="..\..\..;..\..\minizip"
PreprocessorDefinitions="WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE"
StringPooling="TRUE"
RuntimeLibrary="4"
......@@ -104,7 +106,7 @@
Name="Source Files"
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm">
<File
RelativePath="minizip.c">
RelativePath="..\..\minizip\minizip.c">
</File>
</Filter>
<Filter
......@@ -116,7 +118,7 @@
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
</Filter>
<File
RelativePath="zlibwapi.lib">
RelativePath="ReleaseDll\zlibwapi.lib">
</File>
</Files>
<Globals>
......
......@@ -2,8 +2,8 @@
#define IDR_VERSION1 1
IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE
FILEVERSION 1,2,1,0
PRODUCTVERSION 1,2,1,0
FILEVERSION 1,2,3,0
PRODUCTVERSION 1,2,3,0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
FILEFLAGS 0
FILEOS VOS_DOS_WINDOWS32
......@@ -17,7 +17,7 @@ BEGIN
BEGIN
VALUE "FileDescription", "zlib data compression library\0"
VALUE "FileVersion", "1.2.1.0\0"
VALUE "FileVersion", "1.2.3.0\0"
VALUE "InternalName", "zlib\0"
VALUE "OriginalFilename", "zlib.dll\0"
VALUE "ProductName", "ZLib.DLL\0"
......
......@@ -20,6 +20,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
PreprocessorDefinitions="WIN32;ZLIB_WINAPI"
ExceptionHandling="FALSE"
RuntimeLibrary="5"
......@@ -61,6 +62,7 @@
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
PreprocessorDefinitions="WIN32;ZLIB_WINAPI"
StringPooling="TRUE"
ExceptionHandling="FALSE"
......@@ -102,6 +104,7 @@
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
PreprocessorDefinitions="WIN32;ZLIB_WINAPI;ASMV;ASMINF"
StringPooling="TRUE"
ExceptionHandling="FALSE"
......@@ -117,7 +120,7 @@
Name="VCCustomBuildTool"/>
<Tool
Name="VCLibrarianTool"
AdditionalOptions="gvmat32.obj inffas32.obj /NODEFAULTLIB "
AdditionalOptions="..\..\masmx86\gvmat32.obj ..\..\masmx86\inffas32.obj /NODEFAULTLIB "
OutputFile=".\zlibstat\zlibstat.lib"
SuppressStartupBanner="TRUE"/>
<Tool
......@@ -144,6 +147,7 @@
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
PreprocessorDefinitions="WIN32;ZLIB_WINAPI"
StringPooling="TRUE"
ExceptionHandling="FALSE"
......@@ -182,49 +186,49 @@
Name="Source Files"
Filter="">
<File
RelativePath=".\adler32.c">
RelativePath="..\..\..\adler32.c">
</File>
<File
RelativePath=".\compress.c">
RelativePath="..\..\..\compress.c">
</File>
<File
RelativePath=".\crc32.c">
RelativePath="..\..\..\crc32.c">
</File>
<File
RelativePath=".\deflate.c">
RelativePath="..\..\..\deflate.c">
</File>
<File
RelativePath=".\gvmat32c.c">
RelativePath="..\..\masmx86\gvmat32c.c">
</File>
<File
RelativePath=".\gzio.c">
RelativePath="..\..\..\gzio.c">
</File>
<File
RelativePath=".\infback.c">
RelativePath="..\..\..\infback.c">
</File>
<File
RelativePath=".\inffast.c">
RelativePath="..\..\..\inffast.c">
</File>
<File
RelativePath=".\inflate.c">
RelativePath="..\..\..\inflate.c">
</File>
<File
RelativePath=".\inftrees.c">
RelativePath="..\..\..\inftrees.c">
</File>
<File
RelativePath=".\ioapi.c">
RelativePath="..\..\minizip\ioapi.c">
</File>
<File
RelativePath=".\trees.c">
RelativePath="..\..\..\trees.c">
</File>
<File
RelativePath=".\uncompr.c">
RelativePath="..\..\..\uncompr.c">
</File>
<File
RelativePath=".\unzip.c">
RelativePath="..\..\minizip\unzip.c">
</File>
<File
RelativePath=".\zip.c">
RelativePath="..\..\minizip\zip.c">
</File>
<File
RelativePath=".\zlib.rc">
......@@ -233,7 +237,7 @@
RelativePath=".\zlibvc.def">
</File>
<File
RelativePath=".\zutil.c">
RelativePath="..\..\..\zutil.c">
</File>
</Filter>
</Files>
......
......@@ -7,6 +7,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "minizip", "minizip.vcproj",
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "miniunz", "miniunz.vcproj", "{C52F9E7B-498A-42BE-8DB4-85A15694382A}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testZlibDll", "testzlib.vcproj", "{AA6666AA-E09F-4135-9C0C-4FE50C3C654C}"
EndProject
Global
GlobalSection(SolutionConfiguration) = preSolution
ConfigName.0 = Debug
......@@ -58,6 +60,16 @@ Global
{C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm.Build.0 = Release|Win32
{C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutCrtdll.ActiveCfg = Release|Win32
{C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutCrtdll.Build.0 = Release|Win32
{AA6666AA-E09F-4135-9C0C-4FE50C3C654C}.Debug.ActiveCfg = Debug|Win32
{AA6666AA-E09F-4135-9C0C-4FE50C3C654C}.Debug.Build.0 = Debug|Win32
{AA6666AA-E09F-4135-9C0C-4FE50C3C654C}.Release.ActiveCfg = Release|Win32
{AA6666AA-E09F-4135-9C0C-4FE50C3C654C}.Release.Build.0 = Release|Win32
{AA6666AA-E09F-4135-9C0C-4FE50C3C654C}.ReleaseAxp.ActiveCfg = Release|Win32
{AA6666AA-E09F-4135-9C0C-4FE50C3C654C}.ReleaseAxp.Build.0 = Release|Win32
{AA6666AA-E09F-4135-9C0C-4FE50C3C654C}.ReleaseWithoutAsm.ActiveCfg = Release|Win32
{AA6666AA-E09F-4135-9C0C-4FE50C3C654C}.ReleaseWithoutAsm.Build.0 = Release|Win32
{AA6666AA-E09F-4135-9C0C-4FE50C3C654C}.ReleaseWithoutCrtdll.ActiveCfg = Release|Win32
{AA6666AA-E09F-4135-9C0C-4FE50C3C654C}.ReleaseWithoutCrtdll.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EndGlobalSection
......
......@@ -20,6 +20,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
PreprocessorDefinitions="WIN32,ZLIB_WINAPI,ASMV,ASMINF"
ExceptionHandling="FALSE"
RuntimeLibrary="1"
......@@ -35,7 +36,7 @@
<Tool
Name="VCLinkerTool"
AdditionalOptions="/MACHINE:I386"
AdditionalDependencies="gvmat32.obj inffas32.obj"
AdditionalDependencies="..\..\masmx86\gvmat32.obj ..\..\masmx86\inffas32.obj"
OutputFile=".\DebugDll\zlibwapi.dll"
LinkIncremental="2"
SuppressStartupBanner="TRUE"
......@@ -72,10 +73,12 @@
IntermediateDirectory=".\zlibDllWithoutAsm"
ConfigurationType="2"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE">
ATLMinimizesCRunTimeLibraryUsage="FALSE"
WholeProgramOptimization="TRUE">
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
PreprocessorDefinitions="WIN32,ZLIB_WINAPI"
StringPooling="TRUE"
ExceptionHandling="FALSE"
......@@ -134,10 +137,12 @@
IntermediateDirectory=".\zlibDllWithoutCrtDll"
ConfigurationType="2"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE">
ATLMinimizesCRunTimeLibraryUsage="FALSE"
WholeProgramOptimization="TRUE">
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
PreprocessorDefinitions="WIN32,ZLIB_WINAPI,ASMV,ASMINF"
StringPooling="TRUE"
ExceptionHandling="FALSE"
......@@ -156,7 +161,7 @@
<Tool
Name="VCLinkerTool"
AdditionalOptions="/MACHINE:I386"
AdditionalDependencies="gvmat32.obj inffas32.obj "
AdditionalDependencies="..\..\masmx86\gvmat32.obj ..\..\masmx86\inffas32.obj "
OutputFile=".\zlibDllWithoutCrtDll\zlibwapi.dll"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
......@@ -196,10 +201,12 @@
IntermediateDirectory=".\zlibvc__"
ConfigurationType="2"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE">
ATLMinimizesCRunTimeLibraryUsage="FALSE"
WholeProgramOptimization="TRUE">
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
PreprocessorDefinitions="WIN32,ZLIB_WINAPI"
StringPooling="TRUE"
ExceptionHandling="FALSE"
......@@ -256,10 +263,12 @@
IntermediateDirectory=".\ReleaseDll"
ConfigurationType="2"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE">
ATLMinimizesCRunTimeLibraryUsage="FALSE"
WholeProgramOptimization="TRUE">
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
PreprocessorDefinitions="WIN32,ZLIB_WINAPI,ASMV,ASMINF"
StringPooling="TRUE"
ExceptionHandling="FALSE"
......@@ -278,7 +287,7 @@
<Tool
Name="VCLinkerTool"
AdditionalOptions="/MACHINE:I386"
AdditionalDependencies="gvmat32.obj inffas32.obj crtdll.lib"
AdditionalDependencies="..\..\masmx86\gvmat32.obj ..\..\masmx86\inffas32.obj crtdll.lib"
OutputFile=".\ReleaseDll\zlibwapi.dll"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
......@@ -318,19 +327,19 @@
Name="Source Files"
Filter="cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90">
<File
RelativePath=".\adler32.c">
RelativePath="..\..\..\adler32.c">
</File>
<File
RelativePath=".\compress.c">
RelativePath="..\..\..\compress.c">
</File>
<File
RelativePath=".\crc32.c">
RelativePath="..\..\..\crc32.c">
</File>
<File
RelativePath=".\deflate.c">
RelativePath="..\..\..\deflate.c">
</File>
<File
RelativePath=".\gvmat32c.c">
RelativePath="..\..\masmx86\gvmat32c.c">
<FileConfiguration
Name="ReleaseWithoutAsm|Win32"
ExcludedFromBuild="TRUE">
......@@ -339,34 +348,34 @@
</FileConfiguration>
</File>
<File
RelativePath=".\gzio.c">
RelativePath="..\..\..\gzio.c">
</File>
<File
RelativePath=".\infback.c">
RelativePath="..\..\..\infback.c">
</File>
<File
RelativePath=".\inffast.c">
RelativePath="..\..\..\inffast.c">
</File>
<File
RelativePath=".\inflate.c">
RelativePath="..\..\..\inflate.c">
</File>
<File
RelativePath=".\inftrees.c">
RelativePath="..\..\..\inftrees.c">
</File>
<File
RelativePath=".\ioapi.c">
RelativePath="..\..\minizip\ioapi.c">
</File>
<File
RelativePath=".\iowin32.c">
RelativePath="..\..\minizip\iowin32.c">
</File>
<File
RelativePath=".\trees.c">
RelativePath="..\..\..\trees.c">
</File>
<File
RelativePath=".\uncompr.c">
RelativePath="..\..\..\uncompr.c">
</File>
<File
RelativePath=".\unzip.c">
RelativePath="..\..\minizip\unzip.c">
<FileConfiguration
Name="Release|Win32">
<Tool
......@@ -376,7 +385,7 @@
</FileConfiguration>
</File>
<File
RelativePath=".\zip.c">
RelativePath="..\..\minizip\zip.c">
<FileConfiguration
Name="Release|Win32">
<Tool
......@@ -392,38 +401,38 @@
RelativePath=".\zlibvc.def">
</File>
<File
RelativePath=".\zutil.c">
RelativePath="..\..\..\zutil.c">
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;fi;fd">
<File
RelativePath=".\deflate.h">
RelativePath="..\..\..\deflate.h">
</File>
<File
RelativePath=".\infblock.h">
RelativePath="..\..\..\infblock.h">
</File>
<File
RelativePath=".\infcodes.h">
RelativePath="..\..\..\infcodes.h">
</File>
<File
RelativePath=".\inffast.h">
RelativePath="..\..\..\inffast.h">
</File>
<File
RelativePath=".\inftrees.h">
RelativePath="..\..\..\inftrees.h">
</File>
<File
RelativePath=".\infutil.h">
RelativePath="..\..\..\infutil.h">
</File>
<File
RelativePath=".\zconf.h">
RelativePath="..\..\..\zconf.h">
</File>
<File
RelativePath=".\zlib.h">
RelativePath="..\..\..\zlib.h">
</File>
<File
RelativePath=".\zutil.h">
RelativePath="..\..\..\zutil.h">
</File>
</Filter>
<Filter
......
This directory contains files that have not been updated for zlib 1.2.1
This directory contains files that have not been updated for zlib 1.2.x
(Volunteers are encouraged to help clean this up. Thanks.)
......@@ -25,10 +25,10 @@
<QPG:Files>
<QPG:Add file="../zconf.h" install="/opt/include/" user="root:sys" permission="644"/>
<QPG:Add file="../zlib.h" install="/opt/include/" user="root:sys" permission="644"/>
<QPG:Add file="../libz.so.1.2.1" 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.1"/>
<QPG:Add file="libz.so.1" install="/opt/lib/" filetype="symlink" linkto="libz.so.1.2.1"/>
<QPG:Add file="../libz.so.1.2.1" install="/opt/lib/" component="slib"/>
<QPG:Add file="../libz.so.1.2.3" 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"/>
<QPG:Add file="libz.so.1" install="/opt/lib/" filetype="symlink" linkto="libz.so.1.2.3"/>
<QPG:Add file="../libz.so.1.2.3" install="/opt/lib/" component="slib"/>
</QPG:Files>
<QPG:PackageFilter>
......@@ -63,7 +63,7 @@
</QPM:ProductDescription>
<QPM:ReleaseDescription>
<QPM:ReleaseVersion>1.2.1</QPM:ReleaseVersion>
<QPM:ReleaseVersion>1.2.3</QPM:ReleaseVersion>
<QPM:ReleaseUrgency>Medium</QPM:ReleaseUrgency>
<QPM:ReleaseStability>Stable</QPM:ReleaseStability>
<QPM:ReleaseNoteMinor></QPM:ReleaseNoteMinor>
......
......@@ -5,8 +5,8 @@ VS_VERSION_INFO VERSIONINFO
#else
VS_VERSION_INFO VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE
#endif
FILEVERSION 1,2,1,0
PRODUCTVERSION 1,2,1,0
FILEVERSION 1,2,2,0
PRODUCTVERSION 1,2,2,0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
#ifdef _DEBUG
FILEFLAGS 1
......@@ -23,12 +23,12 @@ BEGIN
//language ID = U.S. English, char set = Windows, Multilingual
BEGIN
VALUE "FileDescription", "zlib data compression library\0"
VALUE "FileVersion", "1.2.1\0"
VALUE "FileVersion", "1.2.3\0"
VALUE "InternalName", "zlib1.dll\0"
VALUE "LegalCopyright", "(C) 1995-2003 Jean-loup Gailly & Mark Adler\0"
VALUE "LegalCopyright", "(C) 1995-2004 Jean-loup Gailly & Mark Adler\0"
VALUE "OriginalFilename", "zlib1.dll\0"
VALUE "ProductName", "zlib\0"
VALUE "ProductVersion", "1.2.1\0"
VALUE "ProductVersion", "1.2.3\0"
VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0"
END
END
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment