Mark Adler
2968a496d9
Remove unneeded dependency on limits.h in examples/zran.c.
2024-09-01 13:17:29 -07:00
Mark Adler
164b8e3c9f
Avoid use of uintmax_t in enough.c.
2024-07-29 14:30:50 -07:00
Lwisce Zeng
2ba25b2dda
Use z_const for setting msg to literal strings.
2024-04-01 11:49:05 -07:00
Mark Adler
fd5fe8b17e
Further address Microsoft deprecation warnings.
2024-02-09 20:11:54 -08:00
Mark Adler
985a62d118
Address Microsoft deprecation warnings.
2024-02-08 18:45:49 -08:00
Mark Adler
abd3d1a289
Update zran version.
2024-02-04 18:51:31 -08:00
Mark Adler
037bca67fd
Allocate the dictionaries in examples/zran.c.
...
This reduces the memory needed for dictionaries, and avoids the
need to reallocate the index at the end to return unused memory.
2024-02-04 18:51:14 -08:00
Mark Adler
6378d33478
Provide a reusable inflate engine in the index in example/zran.c.
...
Avoids the overhead of creating a new inflate engine for each
random access extraction.
2024-02-04 18:49:40 -08:00
Mark Adler
bb054d95d0
Stop decoding in zran.c once request is satisfied.
2024-02-04 18:49:40 -08:00
Mark Adler
be4db0a79a
Set returned index to NULL on an index build error in zran.c.
...
An attempt to use the returned pointer in deflate_index_extract()
will now return cleanly with an error. The returned pointer can
now also be used with deflate_index_free() even on error.
2024-02-04 18:48:30 -08:00
THE-Spellchecker
01155ccc3f
Fix random typos over several source and text files.
2024-01-17 13:49:11 -08:00
William Leara
16799d064b
Fix "the the" in examples/gzlog.c.
2024-01-17 12:52:01 -08:00
Dimitri Papadopoulos
c7ddcc2e0e
Fix some spelling errors.
2023-08-03 13:53:24 -07:00
Mark Adler
7e6dc429af
Add a NOPRIME #define to zran.c to not use inflatePrime().
...
This supports zlib versions earlier than 1.2.3 (July 2005), as
well as incomplete clones of zlib that do not have inflatePrime().
2023-04-13 15:41:32 -07:00
Mark Adler
eb0e038b29
Rewrite of zran in examples. See version history in zran.c.
2023-02-18 20:53:39 -08:00
Mark Adler
a9b4c1de37
Update zlib_how.html to match the web page, and add a license.
2023-01-24 20:43:19 -08:00
Mark Adler
5752b171fd
Fix some typos.
...
No code changes.
2022-08-23 15:35:13 -07:00
Mark Adler
0206436615
Fix memory leak on error in gzlog.c.
...
Thank you Adam Richter.
2019-05-25 22:23:20 -07:00
Mark Adler
921d81b2a8
Fix the zran.c example to work on a multiple-member gzip file.
2018-10-14 09:57:34 -07:00
Mark Adler
354fa43d12
Add gznorm.c example, which normalizes gzip files.
2018-10-07 13:55:00 -07:00
Mark Adler
cd16ff0b3a
Show all the codes for the maximum tables size in enough.c.
2018-08-05 23:08:33 -07:00
Mark Adler
d00c147f53
Clarify that prefix codes are counted in enough.c.
...
There is no assurance that all prefix codes are reachable as
optimal Huffman codes for the numbers of symbols encountered in
a deflate block. This code considers all possible prefix codes,
which might be a larger set than all possible Huffman codes,
depending on the constraints.
2018-08-05 23:08:25 -07:00
Mark Adler
5b1381006b
Use inline function instead of macro for index in enough.c.
2018-08-05 23:08:13 -07:00
Mark Adler
8ba2cdb6bd
Clean up code style in enough.c, update version.
2018-08-01 19:51:56 -07:00
Mark Adler
4c14b51587
Use a macro for the printf format of big_t in enough.c.
2018-08-01 01:39:47 -07:00
Mark Adler
194e558efe
Use a structure to make globals in enough.c evident.
2018-08-01 01:37:03 -07:00
Mark Adler
ae49d1472e
Avoid an undefined behavior of memcpy() in gzappend().
2017-10-12 19:27:59 -07:00
Mark Adler
2fa463bacf
zlib 1.2.9
2016-12-31 23:37:10 -08:00
Mark Adler
03614c56ad
Fix some typos.
2016-10-30 08:49:01 -07:00
Mark Adler
51a223def4
Avoid use of DEBUG macro -- change to ZLIB_DEBUG.
2015-07-28 22:44:31 -07:00
Mark Adler
e69a9ceee0
Check for input buffer malloc failure in examples/gzappend.c.
2012-10-11 16:10:59 -07:00
Mark Adler
bd143f1c0a
Fix memory allocation error in examples/zran.c [Nor].
2012-09-29 22:37:55 -07:00
Mark Adler
17068938ce
Avoid shift equal to bits in type (caused endless loop).
...
Also clean up comparisons between different types, and some odd
indentation problems that showed up somehow.
A new endless loop was introduced by the clang compiler, which
apparently does odd things when the right operand of << is equal to
or greater than the number of bits in the type. The C standard in
fact states that the behavior of << is undefined in that case. The
loop was rewritten to use single-bit shifts.
2012-08-18 18:07:26 -07:00
Mark Adler
3d9df6ecf8
Clean up examples/gzlog.[ch] comparisons of different types.
2012-08-18 18:07:04 -07:00
Mark Adler
a2981775a9
Clean up examples/gzjoin.c for z_const usage.
2012-08-14 00:30:44 -07:00
Mark Adler
aa210a1b84
Fix example/gzappend.c for proper z_const usage.
2012-08-14 00:29:58 -07:00
Mark Adler
360c3e9532
Update examples/gun.c for proper z_const usage.
2012-08-13 21:49:10 -07:00
Mark Adler
fb4e0599a5
Fix argument checks in gzlog_compress() and gzlog_write().
2012-07-08 17:01:13 -07:00
Mark Adler
1b57de3aef
Move example.c and minigzip.c to test/.
2011-11-27 14:15:32 -08:00
Mark Adler
1bd2fa1b24
Move example.c and minigzip.c to examples/ directory.
2011-10-09 09:50:48 -07:00
Mark Adler
e0ff940e1a
zlib 1.2.3.8
2011-09-09 23:27:17 -07:00
Mark Adler
dc5a43ebfa
zlib 1.2.3.6
2011-09-09 23:26:58 -07:00
Mark Adler
f6194ef39a
zlib 1.2.3.4
2011-09-09 23:26:40 -07:00
Mark Adler
b1c19ca6d8
zlib 1.2.3.1
2011-09-09 23:25:27 -07:00
Mark Adler
9c3a583021
zlib 1.2.2.4
2011-09-09 23:24:52 -07:00
Mark Adler
6b8233bfe0
zlib 1.2.2.3
2011-09-09 23:24:43 -07:00
Mark Adler
0484693e17
zlib 1.2.2.2
2011-09-09 23:24:33 -07:00