Yann Collet [Thu, 8 Feb 2018 16:45:25 +0000 (08:45 -0800)]
Merge pull request #469 from mathstuf/intel-windows-packing-selection
intel: do not use __attribute__((packed)) on Windows
Ben Boeckel [Thu, 8 Feb 2018 14:15:07 +0000 (09:15 -0500)]
intel: do not use __attribute__((packed)) on Windows
On Windows, the Intel compiler is closer to MSVC rather than GCC and
does not support the GCC attribute syntax.
Fixes #468
Yann Collet [Wed, 7 Feb 2018 10:21:25 +0000 (02:21 -0800)]
fixed code comment as detected in #466
Also clarified a few API code comments
and updated associated html documentation
Yann Collet [Fri, 2 Feb 2018 00:14:54 +0000 (16:14 -0800)]
Merge pull request #461 from terrelln/docs
Clarify the requirements of the LZ4 streaming API
Nick Terrell [Fri, 2 Feb 2018 00:08:59 +0000 (16:08 -0800)]
Clarify the requirements of the LZ4 streaming API
Yann Collet [Thu, 1 Feb 2018 18:55:02 +0000 (10:55 -0800)]
Merge pull request #458 from lz4/ff161
Minor change to LZ4 Frame format specification
Yann Collet [Thu, 1 Feb 2018 16:53:23 +0000 (08:53 -0800)]
Merge pull request #460 from lz4/frameCompress
refactored frameCompress.c example
Yann Collet [Thu, 1 Feb 2018 10:48:20 +0000 (02:48 -0800)]
modified decompression part of frameCompress.c
using same logic as prior modifications for compression part.
Yann Collet [Thu, 1 Feb 2018 09:36:38 +0000 (01:36 -0800)]
refactored ressource allocation to avoid goto
Yann Collet [Thu, 1 Feb 2018 07:17:52 +0000 (23:17 -0800)]
examples/Makefile : changed dependency order
static library *.a must come after source files *.c on linux
Yann Collet [Thu, 1 Feb 2018 01:18:57 +0000 (17:18 -0800)]
Merge branch 'dev' into frameCompress
Yann Collet [Thu, 1 Feb 2018 01:16:48 +0000 (17:16 -0800)]
travisci : ensure "clean" betweeb 2 tests
Yann Collet [Thu, 1 Feb 2018 01:15:02 +0000 (17:15 -0800)]
modified gpptest recipe
Yann Collet [Thu, 1 Feb 2018 00:42:13 +0000 (16:42 -0800)]
Merge pull request #459 from Tyilo/clang-stdc++14
Ensure LZ4_DEPRECATED("...") is before LZ4LIB_API
Yann Collet [Thu, 1 Feb 2018 00:39:37 +0000 (16:39 -0800)]
refactored frameCompress.c example code
compression function returns a struct.
Also : nested structure ressources->computation
to make it easier to manage multiple exit points.
Yann Collet [Thu, 1 Feb 2018 00:13:02 +0000 (16:13 -0800)]
fixed read size, as noticed by @terrelln
Yann Collet [Thu, 1 Feb 2018 00:11:45 +0000 (16:11 -0800)]
ensure proper dependencies are built for /examples
also : use liblz4.a static lib to share compilation time
Yann Collet [Wed, 31 Jan 2018 22:33:16 +0000 (14:33 -0800)]
refactored frameCompress example
to better reflect LZ4F API usage.
Asger Hautop Drewsen [Wed, 31 Jan 2018 19:23:20 +0000 (20:23 +0100)]
Always prefer c++14 attributes if available
Yann Collet [Wed, 31 Jan 2018 17:54:30 +0000 (09:54 -0800)]
fix typos as suggested by @psteinb
Asger Hautop Drewsen [Wed, 31 Jan 2018 12:33:07 +0000 (13:33 +0100)]
Ensure LZ4_DEPRECATED("...") is before LZ4LIB_API
When using clang++ with std c++14 or c++17 you would get the error "an attribute list cannot appear here" when including "lz4.h" as the visibility attribute is before the c++ attribute.
This ensures that the [[deprecated]] c++ attribute is before everything
else in the function declarations.
Yann Collet [Wed, 31 Jan 2018 01:53:00 +0000 (17:53 -0800)]
proposed a minor change to LZ4 Frame format specification
add new terms "LZ4 Frame Header" and "LZ4 Frame Footer"
Yann Collet [Mon, 22 Jan 2018 21:25:49 +0000 (13:25 -0800)]
Merge pull request #455 from terrelln/hc-default
[lz4hc] level == 0 means default, not level 1
Nick Terrell [Mon, 22 Jan 2018 20:50:06 +0000 (12:50 -0800)]
[lz4hc] level == 0 means default, not level 1
Yann Collet [Wed, 17 Jan 2018 20:45:09 +0000 (12:45 -0800)]
Merge pull request #453 from lz4/clockfix
fix #450 : use more restrictive conditions for clock_gettime()
Yann Collet [Wed, 17 Jan 2018 19:29:27 +0000 (11:29 -0800)]
Merge pull request #454 from sunpoet/dev
Change file format back to ASCII (from UTF-8)
Po-Chuan Hsieh [Wed, 17 Jan 2018 19:13:05 +0000 (03:13 +0800)]
Change file format back to ASCII (from UTF-8)
- Replace U+00A0 by space
- Fix build failure of archivers/py-borgbackup in FreeBSD
Reference: https://bugs.FreeBSD.org/225235
Yann Collet [Tue, 16 Jan 2018 18:21:37 +0000 (10:21 -0800)]
use more restrictive conditions for clock_gettime()
Yann Collet [Mon, 15 Jan 2018 00:57:25 +0000 (16:57 -0800)]
added checkTag
checkTag verifies that provided tag and library version match.
It's started automatically in circleCI when a new tag is created.
Yann Collet [Sun, 14 Jan 2018 08:21:43 +0000 (00:21 -0800)]
restored .travis
Yann Collet [Sun, 14 Jan 2018 08:15:07 +0000 (00:15 -0800)]
lz4frame : removed some intermediate stage from LZ4F_decompress()
ensure some strange jump cases are not possible
(they were already not possible, but static analyzer couldn't understand it).
Yann Collet [Sun, 14 Jan 2018 06:58:09 +0000 (22:58 -0800)]
Merge branch 'dev' into coverity_scan
Yann Collet [Sun, 14 Jan 2018 06:52:17 +0000 (22:52 -0800)]
minor : try to tell static analyzer that we don't care if fseek() fails
as already explained in comments.
Yann Collet [Sun, 14 Jan 2018 06:47:46 +0000 (22:47 -0800)]
ensure a ptr is non-null
with an assert()
to help static analyzer understanding this condition.
Yann Collet [Sun, 14 Jan 2018 06:39:39 +0000 (22:39 -0800)]
modified formulation for LZ4F_compressBound()
previous version used an intentional overflow,
which is defined since it uses unsigned type,
but static analyzer complain about it.
Yann Collet [Sun, 14 Jan 2018 06:24:32 +0000 (22:24 -0800)]
programs/datagen : attempt to please static analyzer
with an assert()
to reduce false positive
Yann Collet [Sun, 14 Jan 2018 06:18:04 +0000 (22:18 -0800)]
lz4io: fixed minor ressource leak
Yann Collet [Sun, 14 Jan 2018 05:40:04 +0000 (21:40 -0800)]
revert project name
Yann Collet [Sun, 14 Jan 2018 05:14:36 +0000 (21:14 -0800)]
minor name update
Yann Collet [Sun, 14 Jan 2018 05:09:02 +0000 (21:09 -0800)]
Merge branch 'master' into coverity_scan
Yann Collet [Sun, 14 Jan 2018 04:56:14 +0000 (20:56 -0800)]
Merge pull request #449 from lz4/dev
v1.8.1.2
Yann Collet [Sun, 14 Jan 2018 03:06:33 +0000 (19:06 -0800)]
update man page
Yann Collet [Sun, 14 Jan 2018 02:51:33 +0000 (18:51 -0800)]
nicer console message for `make clean`
Yann Collet [Sun, 14 Jan 2018 02:46:13 +0000 (18:46 -0800)]
updated manuals to v1.8.1
Yann Collet [Sun, 14 Jan 2018 00:33:56 +0000 (16:33 -0800)]
Merge pull request #448 from sunpoet/dev
Fix lz4 version
Po-Chuan Hsieh [Sat, 13 Jan 2018 22:38:03 +0000 (06:38 +0800)]
Fix lz4 version
Yann Collet [Sat, 13 Jan 2018 21:16:31 +0000 (13:16 -0800)]
updated LZ4F_decompress() documentation
Yann Collet [Sat, 13 Jan 2018 00:23:16 +0000 (16:23 -0800)]
Merge pull request #446 from lz4/dev
LZ4 v1.8.1
Yann Collet [Fri, 12 Jan 2018 22:36:10 +0000 (14:36 -0800)]
updated NEWS for v1.8.1
Yann Collet [Wed, 10 Jan 2018 18:09:13 +0000 (19:09 +0100)]
Merge pull request #442 from terrelln/441
[lz4io] Fix decompression file stat with --rm
Yann Collet [Wed, 10 Jan 2018 18:06:21 +0000 (19:06 +0100)]
Merge pull request #443 from terrelln/440
[lz4f] Skip memcpy() on empty dictionary
Yann Collet [Wed, 10 Jan 2018 17:48:11 +0000 (18:48 +0100)]
Merge pull request #444 from felixhandte/publish-static-functions
Add Option to Make lz4frame_static.h Functions Visible in Shared Objects
W. Felix Handte [Mon, 8 Jan 2018 19:46:22 +0000 (14:46 -0500)]
Add Option to Make lz4frame_static.h Functions Visible in Shared Objects
In some contexts, *cough*like at facebook*cough*, dynamic linking is used in
contexts which aren't truly dynamic. That is, the guarantee is maintained that
a program will only ever execute against the library version it was compiled
to interact with.
For those situations, introduce a compile-time flag that overrides hiding
these unstable APIs in shared objects.
Yann Collet [Sat, 6 Jan 2018 05:58:41 +0000 (06:58 +0100)]
Merge pull request #434 from lz4/pattern
conditional pattern analysis
Yann Collet [Sat, 6 Jan 2018 05:57:56 +0000 (06:57 +0100)]
Merge pull request #435 from lz4/destSize
lz4opt is now compatible with _destSize variant
Nick Terrell [Fri, 5 Jan 2018 22:30:49 +0000 (14:30 -0800)]
[lz4f] Skip memcpy() on empty dictionary
Nick Terrell [Fri, 5 Jan 2018 19:32:04 +0000 (11:32 -0800)]
[lz4io] Refuse to set file stat for non-regular files
Nick Terrell [Fri, 5 Jan 2018 19:27:24 +0000 (11:27 -0800)]
[lz4io] Fix decompression file stat with --rm
Yann Collet [Mon, 1 Jan 2018 23:19:59 +0000 (00:19 +0100)]
Merge pull request #439 from eli-b/doc-nohup-behavior
Docs: describe behavior under nohup
Yann Collet [Mon, 1 Jan 2018 23:17:57 +0000 (00:17 +0100)]
Merge pull request #438 from eli-b/grammar-fix
Grammar: "to silent" -> "to silence"
Eli Boyarski [Mon, 1 Jan 2018 13:34:16 +0000 (15:34 +0200)]
Docs: describe behavior under nohup
Eli Boyarski [Mon, 1 Jan 2018 12:15:31 +0000 (14:15 +0200)]
Grammar: "to silent" -> "to silence"
Yann Collet [Wed, 27 Dec 2017 12:02:40 +0000 (13:02 +0100)]
object files in /tests
object files created from /tests are compiled with specific flags (`-g -DLZ4_DEBUG=1`)
which are not welcomed in release binary.
`lib/*.o` files created from /tests are now stored in /tests, to avoid unintentional mix.
Yann Collet [Fri, 22 Dec 2017 11:47:59 +0000 (12:47 +0100)]
lz4opt supports _destSize
no longer limited to level 9
Yann Collet [Fri, 22 Dec 2017 10:54:43 +0000 (11:54 +0100)]
/tests programs compiled with LZ4_DEBUG=1
to enable assert() within /lib
Yann Collet [Fri, 22 Dec 2017 07:07:25 +0000 (08:07 +0100)]
conditional pattern analysis
Pattern analysis (currently limited to long ranges of identical bytes)
is actually detrimental to performance
when `nbSearches` is low.
Reason is : `nbSearches` provides a built-in protection for these cases.
The problem with patterns is that they dramatically increase the number of candidates to visit.
But with a low nbSearches, the match finder just aborts early.
In such cases, pattern analysis adds some complexity without reducing total nb of candidates.
It actually increases compression ratio a little bit, by filtering only "good" candidates,
but at a measurable speed cost, so it's not a good trade-off.
This patch makes pattern analysis optional.
It's enabled for levels 8+ only.
Yann Collet [Thu, 21 Dec 2017 08:46:25 +0000 (09:46 +0100)]
Merge pull request #431 from lz4/newopt
new level 10
Yann Collet [Wed, 20 Dec 2017 13:14:01 +0000 (14:14 +0100)]
new level 10
lz4opt is only competitive vs lz4hc level 10.
Below that level, it doesn't match the speed / compression effectiveness of regular hc parser.
This patch propose to extend lz4opt to levels 10-12.
The new level 10 tend to compress a bit better and a bit faster than previous one (mileage vary depending on file)
The only downside is that `limitedDestSize` mode is now limited to max level 9 (vs 10),
since it's only compatible with regular HC parser.
(Note : I suspect it's possible to convert lz4opt to support it too, but haven't spent time into it).
Yann Collet [Fri, 15 Dec 2017 22:46:00 +0000 (14:46 -0800)]
Merge pull request #427 from lz4/registerLess
remove `register` keyword
Yann Collet [Mon, 11 Dec 2017 18:07:03 +0000 (10:07 -0800)]
Merge pull request #424 from MaxRis/msbuild-properties-#423
Msbuild properties #423
Max Risuhin [Mon, 11 Dec 2017 12:57:19 +0000 (14:57 +0200)]
EnableWholeProgramOptimization and UseStaticCRT msbuild custom properties
Yann Collet [Tue, 5 Dec 2017 01:10:23 +0000 (17:10 -0800)]
remove `register` keyword
deprecated in newer C++ versions,
and dubious utility
Yann Collet [Mon, 4 Dec 2017 22:38:00 +0000 (14:38 -0800)]
Merge pull request #426 from aliceatlas/cli_chmod_fix
Fix cli sometimes calling UTIL_setFileStat on /dev/null
Alice Atlas [Mon, 4 Dec 2017 21:07:31 +0000 (16:07 -0500)]
Fix bug which could sometimes result in the lz4 cli chmodding /dev/null if running as root
Yann Collet [Sat, 25 Nov 2017 01:18:46 +0000 (17:18 -0800)]
minor updates to examples
see https://github.com/lz4/lz4/commit/
810e2ca27b3561e0f6bfa7a88e0fde6faf807064#commitcomment-
25810887
Yann Collet [Mon, 20 Nov 2017 18:27:05 +0000 (10:27 -0800)]
API : changed a few variables' names for clarity
updated relevant doc.
This patch has no impact on ABI/API, nor on binary generation.
Yann Collet [Mon, 13 Nov 2017 23:54:55 +0000 (15:54 -0800)]
updated NEWS
Yann Collet [Thu, 9 Nov 2017 22:13:30 +0000 (14:13 -0800)]
Merge pull request #416 from lz4/newopt
Improve Optimal parser
Yann Collet [Thu, 9 Nov 2017 01:56:20 +0000 (17:56 -0800)]
added code comments
Yann Collet [Thu, 9 Nov 2017 01:47:24 +0000 (17:47 -0800)]
added constant TRAILING_LITERALS
which is more explicit than its value `3`.
reported by @terrelln
Yann Collet [Thu, 9 Nov 2017 01:11:51 +0000 (17:11 -0800)]
lz4opt: simplified match finder invocation to LZ4HC_FindLongerMatch()
Yann Collet [Wed, 8 Nov 2017 16:42:59 +0000 (08:42 -0800)]
added code comments
Yann Collet [Wed, 8 Nov 2017 01:58:59 +0000 (17:58 -0800)]
fixed LZ4HC_reverseCountPattern()
for multi-bytes patterns
(which is not useful for the time being)
Yann Collet [Wed, 8 Nov 2017 01:37:31 +0000 (17:37 -0800)]
removed the ip++ at the beginning of block
The first byte used to be skipped
to avoid a infinite self-comparison.
This is no longer necessary, since init() ensures that index starts at 64K.
The first byte is also useless to search when each block is independent,
but it's no longer the case when blocks are linked.
Removing the first-byte-skip saves
about 10 bytes / MB on files compressed with -BD4 (linked blocks 64Kb),
which feels correct as each MB has 16 blocks of 64KB.
Yann Collet [Tue, 7 Nov 2017 20:09:32 +0000 (12:09 -0800)]
Merge pull request #418 from lz4/fasterCount
faster LZ4_count()
Yann Collet [Tue, 7 Nov 2017 19:33:40 +0000 (11:33 -0800)]
removed legacy version of LZ4HC_InsertAndFindBestMatch()
Yann Collet [Tue, 7 Nov 2017 19:29:28 +0000 (11:29 -0800)]
ensure `pattern` is a 1-byte repetition
Yann Collet [Tue, 7 Nov 2017 19:22:57 +0000 (11:22 -0800)]
removed useless `(1 && ...)` condition
as reported by @terrelln
Yann Collet [Tue, 7 Nov 2017 19:05:48 +0000 (11:05 -0800)]
improved LZ4HC_reverseCountPattern() :
works for any repetitive pattern of length 1, 2 or 4 (but not 3!)
works for any endianess
Yann Collet [Tue, 7 Nov 2017 18:53:29 +0000 (10:53 -0800)]
fixed LZ4HC_countPattern()
- works with byte values other than `0`
- works for any repetitive pattern of length 1, 2 or 4 (but not 3!)
- works for little and big endian systems
- preserve speed of previous implementation
Yann Collet [Tue, 7 Nov 2017 01:29:27 +0000 (17:29 -0800)]
added LZ4_FORCEINLINE to counter gcc regression
as recommended by @terrelln
Yann Collet [Mon, 6 Nov 2017 23:42:50 +0000 (15:42 -0800)]
2-stages LZ4_count
separate first branch from the rest of the compare loop
to get dedicated prediction.
measured a 3-4% compression speed improvement.
Yann Collet [Mon, 6 Nov 2017 23:20:08 +0000 (15:20 -0800)]
build: minor : `make lz4` doesn't compile liblz4 anymore
since it's not needed.
Yann Collet [Mon, 6 Nov 2017 21:56:44 +0000 (13:56 -0800)]
Merge pull request #417 from sylvestre/dev
When building with a C++ compiler, remove the 'register' keyword to silent a warning
Sylvestre Ledru [Mon, 6 Nov 2017 15:16:02 +0000 (16:16 +0100)]
Only ignore with C++17
Sylvestre Ledru [Sun, 5 Nov 2017 10:48:00 +0000 (11:48 +0100)]
When building with a C++ compiler, remove the 'register' keyword to silent a warning
For example, with clang:
lz4.c:XXX:36: error: 'register' storage class specifier is deprecated and incompatible with C++17 [-Werror,-Wdeprecated-register]
static unsigned LZ4_NbCommonBytes (register reg_t val)
^~~~~~~~~
Yann Collet [Fri, 3 Nov 2017 19:33:55 +0000 (12:33 -0700)]
fixed minor static analyzer warning
dead assignment
Yann Collet [Fri, 3 Nov 2017 18:49:56 +0000 (11:49 -0700)]
minor comment edit
Yann Collet [Fri, 3 Nov 2017 18:28:28 +0000 (11:28 -0700)]
unified HC levels
LZ4_setCompressionLevel() can be users accross the whole range of HC levels
No more transition issue between Optimal and HC modes
Yann Collet [Fri, 3 Nov 2017 17:48:55 +0000 (10:48 -0700)]
moved ctx->end handling from parsers
responsibility better handled one layer above (LZ4HC_compress_generic())