43 Commits

Author SHA1 Message Date
Eric Biggers
047aa84e01 v1.8 2021-07-15 09:31:09 -05:00
Eric Biggers
448e3f3b04 v1.7 2020-11-09 19:29:50 -08:00
Eric Biggers
25a591b94e libdeflate.h: fix adler parameter name
This is supposed to be just 'adler', not 'adler32'.
2020-10-18 23:07:03 -07:00
Eric Biggers
4c92394eaa Support level 0, "no compression"
Some users may require a valid DEFLATE, zlib, or gzip stream but know
ahead of time that particular inputs are not compressible.  zlib
supports "level 0" for this use case.  Support this in libdeflate too.

Resolves https://github.com/ebiggers/libdeflate/issues/86
2020-10-10 22:31:15 -07:00
Eric Biggers
e98ddd6612 libdeflate.h: document invalid compression level error
Somehow this was missing from the documentation.
2020-10-10 14:48:57 -07:00
Eric Biggers
753d4a1a62 v1.6 2020-05-12 19:42:04 -07:00
Eric Biggers
0ded4c6f52 lib: add libdeflate_set_memory_allocator()
Add an API function to install a custom memory allocator.

Resolves https://github.com/ebiggers/libdeflate/issues/62
2020-04-17 21:28:49 -07:00
Izumi Raine
66606d7a4a
Clarify comments on zlib decompression functions 2020-04-16 18:23:47 +02:00
Izumi Raine
5ed95f48d4
Add function libdeflate_zlib_decompress_ex
Additionally, libdeflate_zlib_decompress now returns successfully in
case there are additional trailing bytes in the input buffer after the
compressed stream.
2020-04-16 18:15:11 +02:00
Eric Biggers
3107ae1f7e v1.5 2019-12-28 13:33:41 -06:00
Eric Biggers
3acda56db0 Declare __stdcall correctly for MSVC
Unfortunately, MSVC only accepts __stdcall after the return type, while
gcc only accepts __attribute__((visibility("default"))) before the
return type.  So we need a macro in each location.

Also, MSVC doesn't define __i386__; that's gcc specific.  So instead use
'_WIN32 && !_WIN64' to detect 32-bit Windows.
2019-12-28 13:20:50 -06:00
Eric Biggers
91e972e864 v1.4 2019-12-27 10:48:44 -06:00
Eric Biggers
5f3830983c Use stdcall calling convention on 32-bit Windows
Not all programming languages support the cdecl calling convention.
stdcall is what the Win32 API uses, and it seems to be the better choice
for maximum compatibility with other programming languages.

So, switch from cdecl to stdcall.

Resolves https://github.com/ebiggers/libdeflate/issues/58
2019-12-27 10:48:44 -06:00
Eric Biggers
858751572e v1.3 2019-08-11 17:36:38 -07:00
Eric Biggers
cb7ee82c22 v1.2 2019-01-14 21:37:48 -08:00
Eric Biggers
6a05e63bbb v1.1 2018-12-23 13:13:28 -06:00
Eric Biggers
d6d50c6955 Fix stack alignment in 32-bit Windows builds
Resolves https://github.com/ebiggers/libdeflate/issues/35
2018-12-08 10:11:11 -08:00
Eric Biggers
89b2d68aac README updates 2018-05-18 19:33:51 -07:00
Eric Biggers
9a327aae41 v1.0 2018-04-13 22:46:08 -07:00
Eric Biggers
5a9d25a892 Support multi-member gzip files 2017-11-20 00:35:24 -08:00
Eric Biggers
3d96a83ef9 v0.8 2017-07-29 14:38:03 -07:00
Eric Biggers
a32bdb097d v0.7 2017-01-14 20:56:17 -08:00
Eric Biggers
702871d310 v0.6 2016-10-27 20:51:32 -07:00
Eric Biggers
b16dc97e3b v0.5 2016-10-15 22:05:14 -07:00
Eric Biggers
658dfac92c Provide adler32 and crc32 in library API 2016-10-15 16:25:51 -07:00
Eric Biggers
1286b4ddcb v0.4 2016-09-07 21:39:47 -07:00
Eric Biggers
e9a956efca Avoid "exporting" symbols from static library
It was reported that API symbols were being "exported" from the static
library built with MSVC, causing them to remain exported after being
linked into another program.  It turns out this was actually a problem
outside of MSVC as well.  The solution is to always build the static and
shared libraries from different object files, where the API symbols are
exported from the shared library object files but not from the static
library object files.

Reported-by: Joergen Ibsen <ji@ibse.dk>
2016-09-04 01:18:26 -07:00
Eric Biggers
18b149f52e Drop 'unsigned' from compression_level argument 2016-08-27 23:15:47 -07:00
Eric Biggers
268d2fe602 libdeflate.h: add note about thread-safety 2016-08-27 23:13:20 -07:00
Eric Biggers
3992efa340 Update API to avoid naming collisions 2016-08-27 23:11:32 -07:00
Eric Biggers
e3cfa7b5cd v0.3 2016-05-28 16:13:30 -05:00
Eric Biggers
27125469cd v0.2 2016-05-21 15:38:15 -05:00
Eric Biggers
c1b6c31da7 Document that NULL may be passed to deflate_compress_bound() 2016-02-01 22:01:54 -06:00
Eric Biggers
fb1de37c0e Support for Microsoft C / Visual Studio 2016-01-30 17:27:02 -06:00
Eric Biggers
ee1535ecc1 Make decompress API functions return a result code rather than a 'bool' 2016-01-23 11:38:56 -06:00
Eric Biggers
be419e24fa Improve deflate_decompress() documentation 2016-01-23 11:05:43 -06:00
Eric Biggers
e43a7171de Add compress bound functions 2016-01-23 10:32:35 -06:00
Eric Biggers
7be1effacc Make decompression routines optionally provide the actual uncompressd size 2016-01-23 01:04:28 -06:00
Eric Biggers
16f3b420a0 Various decompression updates and optimizations 2016-01-23 00:21:44 -06:00
Eric Biggers
06923e432f libdeflate.h: update comment about compression levels 2015-12-03 23:42:43 -06:00
Eric Biggers
3a19fbae6f Lots of updates 2015-11-21 15:29:37 -06:00
Eric Biggers
5f3208e788 Cleanups and matchfinder updates 2015-01-22 21:29:42 -06:00
Eric Biggers
6a982b7ac7 initial commit 2014-12-27 23:11:49 -06:00