mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 05:13:46 -07:00
zlib: minimize diffs with upstream to prepare zlib upgrade
This commit is contained in:
parent
f30511f1a2
commit
b6d074cc9f
19 changed files with 122 additions and 128 deletions
|
@ -1,15 +1,6 @@
|
|||
|
||||
ChangeLog file for zlib
|
||||
|
||||
Changes in 1.2.8.f-Proxmark3 (for Proxmark3 project only) (26 May 2015)
|
||||
- disable decoding of fixed code blocks in deflate (eliminates the need
|
||||
to store the fixed tree in RAM or ROM)
|
||||
- disable generating fixed code blocks in inflate
|
||||
- look harder for local optimum of consecutive matches and single literals
|
||||
in inflate.
|
||||
- stripped down version - unnecessary files from original distribution
|
||||
are not included
|
||||
|
||||
Changes in 1.2.8 (28 Apr 2013)
|
||||
- Update contrib/minizip/iowin32.c for Windows RT [Vollant]
|
||||
- Do not force Z_CONST for C++
|
||||
|
|
|
@ -1,12 +1,3 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// This version of zlib is modified for use within the Proxmark3 project.
|
||||
// Files from the original distribution which are not required for this
|
||||
// purpose are not included. All modifications can easily be found
|
||||
// by searching for #ifdef ZLIB_PM3_TUNED and #ifndef ZLIB_PM3_TUNED.
|
||||
//
|
||||
// The rest of this file consists of the original README content
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
ZLIB DATA COMPRESSION LIBRARY
|
||||
|
||||
zlib 1.2.8 is a general purpose data compression library. All the code is
|
||||
|
|
19
common/zlib/README_proxmark3
Normal file
19
common/zlib/README_proxmark3
Normal file
|
@ -0,0 +1,19 @@
|
|||
This version of zlib is modified for use within the Proxmark3 project.
|
||||
Files from the original distribution which are not required for this
|
||||
purpose are not included. All modifications can easily be found
|
||||
by searching for #ifdef ZLIB_PM3_TUNED and #ifndef ZLIB_PM3_TUNED.
|
||||
|
||||
Current zlib base version is 1.2.8
|
||||
|
||||
|
||||
ChangeLog for Proxmark3 project only
|
||||
------------------------------------
|
||||
|
||||
Changes in 1.2.8.f-Proxmark3 (26 May 2015)
|
||||
- disable decoding of fixed code blocks in deflate (eliminates the need
|
||||
to store the fixed tree in RAM or ROM)
|
||||
- disable generating fixed code blocks in inflate
|
||||
- look harder for local optimum of consecutive matches and single literals
|
||||
in inflate.
|
||||
- stripped down version - unnecessary files from original distribution
|
||||
are not included
|
|
@ -177,3 +177,4 @@ z_off64_t len2;
|
|||
{
|
||||
return adler32_combine_(adler1, adler2, len2);
|
||||
}
|
||||
|
||||
|
|
|
@ -52,7 +52,11 @@
|
|||
#include "deflate.h"
|
||||
|
||||
const char deflate_copyright[] =
|
||||
#ifdef ZLIB_PM3_TUNED
|
||||
" deflate 1.2.8.f-Proxmark3 Copyright 1995-2013 Jean-loup Gailly and Mark Adler ";
|
||||
#else
|
||||
" deflate 1.2.8 Copyright 1995-2013 Jean-loup Gailly and Mark Adler ";
|
||||
#endif
|
||||
/*
|
||||
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
|
||||
|
@ -60,15 +64,6 @@ const char deflate_copyright[] =
|
|||
copyright string in the executable of your product.
|
||||
*/
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// This version of zlib is modified for use within the Proxmark3 project.
|
||||
// Files from the original distribution which are not required for this
|
||||
// purpose are not included. All modifications can easily be found
|
||||
// by searching for #ifdef ZLIB_PM3_TUNED and #ifndef ZLIB_PM3_TUNED.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
/* ===========================================================================
|
||||
* Function prototypes.
|
||||
*/
|
||||
|
@ -1840,7 +1835,8 @@ int flush;
|
|||
INSERT_STRING(s, s->strstart, hash_head);
|
||||
}
|
||||
|
||||
/* Find the longest match, discarding those <= prev_length. */
|
||||
/* Find the longest match, discarding those <= prev_length.
|
||||
*/
|
||||
s->prev_length = s->match_length, s->prev_match = s->match_start;
|
||||
s->match_length = MIN_MATCH - 1;
|
||||
|
||||
|
@ -2054,3 +2050,4 @@ int flush;
|
|||
FLUSH_BLOCK(s, 0);
|
||||
return block_done;
|
||||
}
|
||||
|
||||
|
|
|
@ -344,3 +344,4 @@ extern const uch ZLIB_INTERNAL _dist_code[];
|
|||
#endif
|
||||
|
||||
#endif /* DEFLATE_H */
|
||||
|
||||
|
|
|
@ -329,3 +329,4 @@ dodist:
|
|||
*/
|
||||
|
||||
#endif /* !ASMINF */
|
||||
|
||||
|
|
|
@ -9,3 +9,4 @@
|
|||
*/
|
||||
|
||||
void ZLIB_INTERNAL inflate_fast OF((z_streamp strm, unsigned start));
|
||||
|
||||
|
|
|
@ -92,3 +92,4 @@ static const code distfix[32] = {
|
|||
{16, 5, 4}, {24, 5, 769}, {20, 5, 49}, {28, 5, 12289}, {18, 5, 13}, {26, 5, 3073},
|
||||
{22, 5, 193}, {64, 5, 0}
|
||||
};
|
||||
|
||||
|
|
|
@ -80,15 +80,6 @@
|
|||
* The history for versions after 1.2.0 are in ChangeLog in zlib distribution.
|
||||
*/
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// This version of zlib is modified for use within the Proxmark3 project.
|
||||
// Files from the original distribution which are not required for this
|
||||
// purpose are not included. All modifications can easily be found
|
||||
// by searching for #ifdef ZLIB_PM3_TUNED and #ifndef ZLIB_PM3_TUNED.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
#include "zutil.h"
|
||||
#include "inftrees.h"
|
||||
#include "inflate.h"
|
||||
|
@ -1520,3 +1511,4 @@ z_streamp strm;
|
|||
(state->mode == COPY ? state->length :
|
||||
(state->mode == MATCH ? state->was - state->length : 0));
|
||||
}
|
||||
|
||||
|
|
|
@ -120,3 +120,4 @@ struct inflate_state {
|
|||
int back; /* bits back of last unprocessed length/lit */
|
||||
unsigned was; /* initial length of match */
|
||||
};
|
||||
|
||||
|
|
|
@ -9,7 +9,11 @@
|
|||
#define MAXBITS 15
|
||||
|
||||
const char inflate_copyright[] =
|
||||
#ifdef ZLIB_PM3_TUNED
|
||||
" inflate 1.2.8.f-Proxmark3 Copyright 1995-2013 Mark Adler ";
|
||||
#else
|
||||
" inflate 1.2.8 Copyright 1995-2013 Mark Adler ";
|
||||
#endif
|
||||
/*
|
||||
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
|
||||
|
@ -300,3 +304,4 @@ int ZLIB_INTERNAL inflate_table(codetype type, unsigned short FAR *lens,
|
|||
*bits = root;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -60,3 +60,4 @@ typedef enum {
|
|||
int ZLIB_INTERNAL inflate_table OF((codetype type, unsigned short FAR *lens,
|
||||
unsigned codes, code FAR *FAR *table,
|
||||
unsigned FAR *bits, unsigned short FAR *work));
|
||||
|
||||
|
|
|
@ -32,16 +32,8 @@
|
|||
|
||||
/* @(#) $Id$ */
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// This version of zlib is modified for use within the Proxmark3 project.
|
||||
// Files from the original distribution which are not required for this
|
||||
// purpose are not included. All modifications can easily be found
|
||||
// by searching for #ifdef ZLIB_PM3_TUNED and #ifndef ZLIB_PM3_TUNED.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
/* #define GEN_TREES_H */
|
||||
|
||||
|
||||
#include "deflate.h"
|
||||
|
||||
#ifdef DEBUG
|
||||
|
@ -1021,7 +1013,8 @@ int last; /* one if this is the last block for a file */
|
|||
s->compressed_len += 7; /* align on byte boundary */
|
||||
#endif
|
||||
}
|
||||
Tracev((stderr, "\ncomprlen %lu(%lu) ", s->compressed_len >> 3, s->compressed_len - 7 * last));
|
||||
Tracev((stderr, "\ncomprlen %lu(%lu) ", s->compressed_len >> 3,
|
||||
s->compressed_len - 7 * last));
|
||||
}
|
||||
|
||||
/* ===========================================================================
|
||||
|
@ -1245,3 +1238,4 @@ int header; /* true if block header must be written */
|
|||
put_byte(s, *buf++);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -126,3 +126,4 @@ local const int base_dist[D_CODES] = {
|
|||
1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384, 24576
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -509,3 +509,4 @@ typedef unsigned long z_crc_t;
|
|||
#endif
|
||||
|
||||
#endif /* ZCONF_H */
|
||||
|
||||
|
|
|
@ -28,13 +28,6 @@
|
|||
(zlib format), rfc1951 (deflate format) and rfc1952 (gzip format).
|
||||
*/
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// This version of zlib is modified for use within the Proxmark3 project.
|
||||
// Files from the original distribution which are not required for this
|
||||
// purpose are not included. All modifications can easily be found
|
||||
// by searching for #ifdef ZLIB_PM3_TUNED and #ifndef ZLIB_PM3_TUNED.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#ifndef ZLIB_H
|
||||
#define ZLIB_H
|
||||
|
||||
|
@ -1784,3 +1777,4 @@ ZEXTERN int ZEXPORTVA gzvprintf Z_ARG((gzFile file,
|
|||
#endif
|
||||
|
||||
#endif /* ZLIB_H */
|
||||
|
||||
|
|
|
@ -341,3 +341,4 @@ voidpf ptr;
|
|||
#endif /* MY_ZCALLOC */
|
||||
|
||||
#endif /* !Z_SOLO */
|
||||
|
||||
|
|
|
@ -251,3 +251,4 @@ void ZLIB_INTERNAL zcfree OF((voidpf opaque, voidpf ptr));
|
|||
(((q) & 0xff00) << 8) + (((q) & 0xff) << 24))
|
||||
|
||||
#endif /* ZUTIL_H */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue