Commit Graph

256 Commits

Author SHA1 Message Date
yann.collet.73@gmail.com
ecbce64ac9 Corrected : default to Software Bit Count for GCC earlier than 3.4. Thanks to Gray.
Corrected : ARM compilation under Visual Studio : now generates cautious code, like GCC, to ensure compatibility with strict-align CPUs. Thanks to Joe WoodBury.
Minor : bench.c : Hash verification changed to MurmurHash3A
Minor : bench.c : selectable block size

git-svn-id: https://lz4.googlecode.com/svn/trunk@56 650e7d94-2a16-8b24-b05c-7c0b3f6821cd
2012-02-20 20:53:49 +00:00
yann.collet.73@gmail.com
4045a42bb1 Added : LZ4_compressBound() function
corrected : bench.c now correctly detects file size on a wider ranger of compilers; thanks to Erik Andersen
minor : removed warnings on undefined (-Wundef on gcc), thanks David Sterba for suggestion


git-svn-id: https://lz4.googlecode.com/svn/trunk@55 650e7d94-2a16-8b24-b05c-7c0b3f6821cd
2012-02-16 18:39:50 +00:00
yann.collet.73@gmail.com
7b6ba0421d Minor comments refactoring, for better clarity
git-svn-id: https://lz4.googlecode.com/svn/trunk@54 650e7d94-2a16-8b24-b05c-7c0b3f6821cd
2012-02-06 21:21:48 +00:00
yann.collet.73@gmail.com
9485884eb9 minor interface modification : source pointers are now (const char*)
git-svn-id: https://lz4.googlecode.com/svn/trunk@53 650e7d94-2a16-8b24-b05c-7c0b3f6821cd
2012-02-01 20:16:10 +00:00
yann.collet.73@gmail.com
2327aa404e Better detection of Big-Endian and PowerPC CPU
LZ4Demo : correction : produces compatible streams on both big-endian and little-endian systems

git-svn-id: https://lz4.googlecode.com/svn/trunk@52 650e7d94-2a16-8b24-b05c-7c0b3f6821cd
2012-02-01 04:19:38 +00:00
yann.collet.73@gmail.com
572cab747f Corrected a bug in the decoder in 64-bit mode
git-svn-id: https://lz4.googlecode.com/svn/trunk@51 650e7d94-2a16-8b24-b05c-7c0b3f6821cd
2012-01-16 22:26:03 +00:00
yann.collet.73@gmail.com
93577f8ce6 Improved compression speed for 64-bit CPUs
git-svn-id: https://lz4.googlecode.com/svn/trunk@50 650e7d94-2a16-8b24-b05c-7c0b3f6821cd
2012-01-14 17:17:12 +00:00
yann.collet.73@gmail.com
868c459f23 Improved compression speed for 64-bit CPU
git-svn-id: https://lz4.googlecode.com/svn/trunk@49 650e7d94-2a16-8b24-b05c-7c0b3f6821cd
2012-01-13 19:44:18 +00:00
yann.collet.73@gmail.com
99b3294fc2 Improved compression speed for big-endian CPU
git-svn-id: https://lz4.googlecode.com/svn/trunk@48 650e7d94-2a16-8b24-b05c-7c0b3f6821cd
2012-01-10 20:03:01 +00:00
yann.collet.73@gmail.com
4fa4221c6e Decompression speed improved in 64-bit mode
Decoding functions are now also immune to out-of-buffer read errors (note : they were already protected against malicious out-of-buffer write attacks)

git-svn-id: https://lz4.googlecode.com/svn/trunk@47 650e7d94-2a16-8b24-b05c-7c0b3f6821cd
2012-01-09 23:21:05 +00:00
yann.collet.73@gmail.com
97abf01348 Added : benchmark function within command-line utility
git-svn-id: https://lz4.googlecode.com/svn/trunk@46 650e7d94-2a16-8b24-b05c-7c0b3f6821cd
2012-01-08 02:45:32 +00:00
yann.collet.73@gmail.com
aac2572351 Improved compression and decompression speed on 64-bits CPU
git-svn-id: https://lz4.googlecode.com/svn/trunk@45 650e7d94-2a16-8b24-b05c-7c0b3f6821cd
2012-01-07 20:26:15 +00:00
yann.collet.73@gmail.com
f20be40d3e Improved compression speed. Thanks to David Sterba for suggestion.
Compression ratio improvements in "small packet" mode (<64KB).

git-svn-id: https://lz4.googlecode.com/svn/trunk@44 650e7d94-2a16-8b24-b05c-7c0b3f6821cd
2012-01-04 13:08:10 +00:00
yann.collet.73@gmail.com
8ee579983a Endianess correction
git-svn-id: https://lz4.googlecode.com/svn/trunk@43 650e7d94-2a16-8b24-b05c-7c0b3f6821cd
2011-12-16 23:41:46 +00:00
yann.collet.73@gmail.com
39630716d7 Endianess correction
git-svn-id: https://lz4.googlecode.com/svn/trunk@42 650e7d94-2a16-8b24-b05c-7c0b3f6821cd
2011-12-09 13:59:59 +00:00
yann.collet.73@gmail.com
bf12ca9a1e Slightly improved compression speed
git-svn-id: https://lz4.googlecode.com/svn/trunk@41 650e7d94-2a16-8b24-b05c-7c0b3f6821cd
2011-11-21 23:56:21 +00:00
yann.collet.73@gmail.com
70ba2c463f Better compliance with C99 and non-C99 compilators
git-svn-id: https://lz4.googlecode.com/svn/trunk@40 650e7d94-2a16-8b24-b05c-7c0b3f6821cd
2011-11-19 21:38:27 +00:00
yann.collet.73@gmail.com
62c39e2445 Modified makefile to specify C99 support to compiler (GCC)
Slightly improved compression speed in small packet mode

git-svn-id: https://lz4.googlecode.com/svn/trunk@39 650e7d94-2a16-8b24-b05c-7c0b3f6821cd
2011-11-17 23:07:28 +00:00
yann.collet.73@gmail.com
439f270a4e Slightly improved decoding speed under GCC compilation
git-svn-id: https://lz4.googlecode.com/svn/trunk@38 650e7d94-2a16-8b24-b05c-7c0b3f6821cd
2011-11-15 22:06:33 +00:00
yann.collet.73@gmail.com
667f8ea1c8 Corrected a bug in LZ4_uncompress_unknownOutputSize(), which reported incorrect decodedSize when maxOutputSize=decodedSize. Thanks to Clayton Stangeland for report and solution.
git-svn-id: https://lz4.googlecode.com/svn/trunk@37 650e7d94-2a16-8b24-b05c-7c0b3f6821cd
2011-10-26 20:15:33 +00:00
yann.collet.73@gmail.com
5f0ef5bb63 code refactoring
git-svn-id: https://lz4.googlecode.com/svn/trunk@36 650e7d94-2a16-8b24-b05c-7c0b3f6821cd
2011-10-06 11:24:04 +00:00
yann.collet.73@gmail.com
da9037238c - Improved compression ratio
- Added special mode for small packet (<=64KB) which improves both compression and speed : LZ4_compress64kCtx()

git-svn-id: https://lz4.googlecode.com/svn/trunk@35 650e7d94-2a16-8b24-b05c-7c0b3f6821cd
2011-09-29 20:28:37 +00:00
yann.collet.73@gmail.com
ab75a32104 LZ4Demo : corrected a bug in 64 bits mode
git-svn-id: https://lz4.googlecode.com/svn/trunk@34 650e7d94-2a16-8b24-b05c-7c0b3f6821cd
2011-09-27 20:47:20 +00:00
yann.collet.73@gmail.com
ea53527d10 New : ARM Validated code, thanks to Vlad Grachov.
LZ4Demo : compress/decompress output time

git-svn-id: https://lz4.googlecode.com/svn/trunk@33 650e7d94-2a16-8b24-b05c-7c0b3f6821cd
2011-09-27 11:59:58 +00:00
yann.collet.73@gmail.com
7a40bd983f Modified a few comments
git-svn-id: https://lz4.googlecode.com/svn/trunk@32 650e7d94-2a16-8b24-b05c-7c0b3f6821cd
2011-09-26 21:15:24 +00:00
yann.collet.73@gmail.com
d899a39185 updated LZ4_uncompress_unknownOutputSize()
git-svn-id: https://lz4.googlecode.com/svn/trunk@31 650e7d94-2a16-8b24-b05c-7c0b3f6821cd
2011-09-26 21:04:03 +00:00
yann.collet.73@gmail.com
c5493d8721 renamed : main.c into lz4demo.c
changed Makefile accordingly

git-svn-id: https://lz4.googlecode.com/svn/trunk@30 650e7d94-2a16-8b24-b05c-7c0b3f6821cd
2011-09-25 22:47:31 +00:00
yann.collet.73@gmail.com
420248cff4 CLI : added test mode
CLI : corrected writing to NULL within Linux
Minor : several comments were updated

git-svn-id: https://lz4.googlecode.com/svn/trunk@29 650e7d94-2a16-8b24-b05c-7c0b3f6821cd
2011-09-25 21:34:35 +00:00
yann.collet.73@gmail.com
dab6b9d3dc CLI : Added : capability to compress/decompress to NULL (useful for testings)
Corrected small bug into LZ4_uncompress(). Update is recommended.

git-svn-id: https://lz4.googlecode.com/svn/trunk@28 650e7d94-2a16-8b24-b05c-7c0b3f6821cd
2011-09-25 20:11:05 +00:00
yann.collet.73@gmail.com
e1ae3a0b95 Small compression speed improvement
Decoding speed improvement

git-svn-id: https://lz4.googlecode.com/svn/trunk@27 650e7d94-2a16-8b24-b05c-7c0b3f6821cd
2011-09-23 22:27:08 +00:00
yann.collet.73@gmail.com
3071281340 Corrected issue 3 in compression function. Update is recommended.
git-svn-id: https://lz4.googlecode.com/svn/trunk@26 650e7d94-2a16-8b24-b05c-7c0b3f6821cd
2011-09-22 13:11:17 +00:00
yann.collet.73@gmail.com
90bd4616ca minor code refactoring
removed harmless warning under gcc for linux

git-svn-id: https://lz4.googlecode.com/svn/trunk@25 650e7d94-2a16-8b24-b05c-7c0b3f6821cd
2011-09-21 11:45:00 +00:00
yann.collet.73@gmail.com
d9bf974023 Small compression speed improvement
git-svn-id: https://lz4.googlecode.com/svn/trunk@24 650e7d94-2a16-8b24-b05c-7c0b3f6821cd
2011-09-20 10:01:23 +00:00
yann.collet.73@gmail.com
babbc0f494 removed an harmless warning under gcc for linux
git-svn-id: https://lz4.googlecode.com/svn/trunk@23 650e7d94-2a16-8b24-b05c-7c0b3f6821cd
2011-09-18 10:50:12 +00:00
yann.collet.73@gmail.com
e8d1e99112 small compression speed improvement
git-svn-id: https://lz4.googlecode.com/svn/trunk@22 650e7d94-2a16-8b24-b05c-7c0b3f6821cd
2011-09-15 21:37:09 +00:00
yann.collet.73@gmail.com
e154e125fc CLI : corrected : small allocation error in case of not compressible input
git-svn-id: https://lz4.googlecode.com/svn/trunk@21 650e7d94-2a16-8b24-b05c-7c0b3f6821cd
2011-09-15 20:20:39 +00:00
yann.collet.73@gmail.com
d5a574c351 Corrected : a bug in compression function which could make it read beyond input buffer in some circumstances (issue 2).
Many thanks for the detailed bug report.


git-svn-id: https://lz4.googlecode.com/svn/trunk@20 650e7d94-2a16-8b24-b05c-7c0b3f6821cd
2011-09-15 19:14:57 +00:00
yann.collet.73@gmail.com
15d69c39eb small compression speed improvement
git-svn-id: https://lz4.googlecode.com/svn/trunk@19 650e7d94-2a16-8b24-b05c-7c0b3f6821cd
2011-09-13 22:55:49 +00:00
yann.collet.73@gmail.com
86a59c7a82 small compression speed improvement
git-svn-id: https://lz4.googlecode.com/svn/trunk@18 650e7d94-2a16-8b24-b05c-7c0b3f6821cd
2011-09-13 18:19:42 +00:00
yann.collet.73@gmail.com
7c6229fb3d Updated : license text (main.c)
git-svn-id: https://lz4.googlecode.com/svn/trunk@17 650e7d94-2a16-8b24-b05c-7c0b3f6821cd
2011-09-13 13:30:45 +00:00
yann.collet.73@gmail.com
32f4bab6fc Small compression speed improvement
git-svn-id: https://lz4.googlecode.com/svn/trunk@16 650e7d94-2a16-8b24-b05c-7c0b3f6821cd
2011-09-13 12:01:11 +00:00
yann.collet.73@gmail.com
84bfd32c9c Corrected : CLI : Pipe mode in Windows (note : was already properly working for Linux)
git-svn-id: https://lz4.googlecode.com/svn/trunk@15 650e7d94-2a16-8b24-b05c-7c0b3f6821cd
2011-09-03 16:06:26 +00:00
yann.collet.73@gmail.com
558c03a1af Corrected a (rare) bug in compression function
git-svn-id: https://lz4.googlecode.com/svn/trunk@14 650e7d94-2a16-8b24-b05c-7c0b3f6821cd
2011-09-03 12:43:13 +00:00
yann.collet.73@gmail.com
3a6d9640fb LZ4Demo now supports Pipe mode (inspired by Huan Truong mod)
git-svn-id: https://lz4.googlecode.com/svn/trunk@13 650e7d94-2a16-8b24-b05c-7c0b3f6821cd
2011-08-30 22:35:09 +00:00
yann.collet.73@gmail.com
8860e61b4f Removed LZ4_decode() function code.
If you need to provide "isize" instead of "osize" to the decoder, please use LZ4_uncompress_unknownOutputSize(), which is safer.

git-svn-id: https://lz4.googlecode.com/svn/trunk@12 650e7d94-2a16-8b24-b05c-7c0b3f6821cd
2011-08-21 11:42:08 +00:00
yann.collet.73@gmail.com
a201020317 Improved compression and decompression speed under GCC compiler
git-svn-id: https://lz4.googlecode.com/svn/trunk@11 650e7d94-2a16-8b24-b05c-7c0b3f6821cd
2011-06-07 17:57:25 +00:00
yann.collet.73@gmail.com
075bf1349b Greatly improved compression and decompression speed, at the expense of some compression ratio.
Most of the change is due to a modification in the performance parameter (HASH_LOG) now set to 12, to match Intel L1 cache processors.
You can change it back to 17 to get back previous compression ratio.
AMD users are invited to try HASH_LOG = 13, since AMD L1 cache is twice larger.

git-svn-id: https://lz4.googlecode.com/svn/trunk@10 650e7d94-2a16-8b24-b05c-7c0b3f6821cd
2011-06-05 21:23:42 +00:00
yann.collet.73@gmail.com
6b798d5e40 New function : LZ4_uncompress : secure version which is safe against buffer overflow attacks
New function : LZ4_uncompress_unknownOutputSize : secure but slower version which also guess the size of data to be decoded
The demo file compression program (main.c) is updated to use these new functions
LZ4_decode is still supported but in deprecated status, due to its vulnerability to malicious buffer overflow scenario


git-svn-id: https://lz4.googlecode.com/svn/trunk@9 650e7d94-2a16-8b24-b05c-7c0b3f6821cd
2011-06-04 17:15:43 +00:00
yann.collet.73@gmail.com
0121f47e00 Corrected : demo program : "/" no longer a valid option trigger, in order to allow absolute path on *nix systems.
Changed (minor) : demo program : differentiate error numbers between compression et decoding routines.

git-svn-id: https://lz4.googlecode.com/svn/trunk@8 650e7d94-2a16-8b24-b05c-7c0b3f6821cd
2011-05-27 12:18:22 +00:00
yann.collet.73@gmail.com
ca8d6c21e5 Improved : safe type, for linux x64 (amd64) compatibility (Thanks to Erik Andersen)
Checked : OS X compatibility (Thanks Abhinav)
Corrected : Explicit unsigned constant for non C90-compliant C compilers (Thanks to Erik Andersen)
Changed : lowercase filename for case-sensitive file systems (like linux) (Thanks Abhinav & Erik)
Added : Makefile, for gcc (Thanks Abhinav & Erik)

git-svn-id: https://lz4.googlecode.com/svn/trunk@7 650e7d94-2a16-8b24-b05c-7c0b3f6821cd
2011-05-25 22:25:57 +00:00