platform/upstream/lz4.git
5 years agoFix Dict Size Test in `LZ4_compress_fast_continue()`
W. Felix Handte [Wed, 5 Dec 2018 19:24:33 +0000 (11:24 -0800)]
Fix Dict Size Test in `LZ4_compress_fast_continue()`

Dictionaries don't need to be > 4 bytes, they need to be >= 4 bytes. This test
was overly conservative.

Also removes the test in `LZ4_attach_dictionary()`.

5 years agoDon't Attach Very Small Dictionaries
W. Felix Handte [Tue, 4 Dec 2018 22:05:11 +0000 (14:05 -0800)]
Don't Attach Very Small Dictionaries

Fixes a mismatch in behavior between loading into the context (via
`LZ4_loadDict()`) a very small (<= 4 bytes) non-contiguous dictionary, versus
attaching it with `LZ4_attach_dictionary()`.

Before this patch, this divergence could be reproduced by running

```
make -C tests fuzzer MOREFLAGS="-m32"
tests/fuzzer -v -s1239 -t3146
```

Making sure these two paths behave exactly identically is an easy way to test
the correctness of the attach path, so it's desirable that this remain an
unpolluted, high signal test.

5 years agoMerge pull request #615 from vtorri/dev
Yann Collet [Sun, 2 Dec 2018 20:30:25 +0000 (12:30 -0800)]
Merge pull request #615 from vtorri/dev

 Windows: create import library with gcc directly, remove now useless def file

5 years agoMerge remote-tracking branch 'upstream/dev' into dev
Vincent Torri [Sun, 2 Dec 2018 18:42:38 +0000 (19:42 +0100)]
Merge remote-tracking branch 'upstream/dev' into dev

5 years agoWindows: create import library with gcc directly, remove now useless def file
Vincent Torri [Sun, 2 Dec 2018 17:50:18 +0000 (18:50 +0100)]
Windows: create import library with gcc directly, remove now useless def file

5 years agoMerge remote-tracking branch 'upstream/master' into dev
Vincent Torri [Sun, 2 Dec 2018 17:46:14 +0000 (18:46 +0100)]
Merge remote-tracking branch 'upstream/master' into dev

5 years agoMerge pull request #612 from lzutao/fix_clang_fuzzer
Yann Collet [Sun, 2 Dec 2018 16:50:08 +0000 (08:50 -0800)]
Merge pull request #612 from lzutao/fix_clang_fuzzer

Fix clang warning

5 years agoclang: Fix -Wcomma
Lzu Tao [Sun, 2 Dec 2018 13:39:47 +0000 (20:39 +0700)]
clang: Fix -Wcomma

5 years agoclang: Fix -Wcast-qual
Lzu Tao [Sun, 2 Dec 2018 13:30:25 +0000 (20:30 +0700)]
clang: Fix -Wcast-qual

5 years agoFix clang warnings: -Wformat-pedantic and -Werror=overflow
Lzu Tao [Sun, 2 Dec 2018 13:12:24 +0000 (20:12 +0700)]
Fix clang warnings: -Wformat-pedantic and -Werror=overflow

5 years agoMerge pull request #611 from lzutao/mesonbuild
Yann Collet [Sun, 2 Dec 2018 03:35:47 +0000 (19:35 -0800)]
Merge pull request #611 from lzutao/mesonbuild

Support for Meson build and its CI tests

5 years agoAdd Travis meson build
Lzu Tao [Sat, 1 Dec 2018 06:12:51 +0000 (13:12 +0700)]
Add Travis meson build

5 years agoAdd meson build system
Lzu Tao [Sat, 1 Dec 2018 05:15:53 +0000 (12:15 +0700)]
Add meson build system

5 years agoMerge pull request #610 from antinucleon/bootcamp
Yann Collet [Mon, 26 Nov 2018 20:14:27 +0000 (12:14 -0800)]
Merge pull request #610 from antinucleon/bootcamp

[amalgamation] lz4frame.c

5 years ago[amalgamation] lz4frame.c
Bing Xu [Mon, 26 Nov 2018 19:30:15 +0000 (11:30 -0800)]
[amalgamation] lz4frame.c

5 years agoMerge remote-tracking branch 'upstream/master' into bootcamp
Bing Xu [Mon, 26 Nov 2018 19:12:49 +0000 (11:12 -0800)]
Merge remote-tracking branch 'upstream/master' into bootcamp

5 years agoMerge pull request #606 from nh2/patch-1
Yann Collet [Sun, 25 Nov 2018 21:38:37 +0000 (13:38 -0800)]
Merge pull request #606 from nh2/patch-1

lz4_Frame_format.md: Fix typo HexaBytes -> Exabytes

5 years agolz4_Frame_format.md: Fix typo HexaBytes -> Exabytes
Niklas Hambüchen [Sat, 24 Nov 2018 21:13:10 +0000 (22:13 +0100)]
lz4_Frame_format.md: Fix typo HexaBytes -> Exabytes

5 years agoMerge pull request #605 from vtorri/dev
Yann Collet [Wed, 21 Nov 2018 18:04:37 +0000 (10:04 -0800)]
Merge pull request #605 from vtorri/dev

Allow installation of lz4 for Windows (MSYS2 or when cross-compiling)

5 years agoUninstall DLL and import lib
Vincent Torri [Wed, 21 Nov 2018 08:07:26 +0000 (09:07 +0100)]
Uninstall DLL and import lib

5 years agoAdd explanation for the installation of the DLL in the bin directory
Vincent Torri [Wed, 21 Nov 2018 07:40:51 +0000 (08:40 +0100)]
Add explanation for the installation of the DLL in the bin directory

5 years agoAllow installation of lz4 for Windows (MSYS2 or when cross-compiling)
Vincent Torri [Tue, 20 Nov 2018 20:08:23 +0000 (21:08 +0100)]
Allow installation of lz4 for Windows (MSYS2 or when cross-compiling)

5 years agoMerge remote-tracking branch 'upstream/master' into dev
Vincent Torri [Tue, 20 Nov 2018 19:41:56 +0000 (20:41 +0100)]
Merge remote-tracking branch 'upstream/master' into dev

5 years agoMerge pull request #604 from vtorri/dev
Yann Collet [Mon, 19 Nov 2018 22:31:37 +0000 (14:31 -0800)]
Merge pull request #604 from vtorri/dev

Add DLLTOOL variable so that one can override dlltool binary

5 years agoupdate lib/README.md
Vincent Torri [Sun, 18 Nov 2018 20:03:27 +0000 (21:03 +0100)]
update lib/README.md

5 years agoAdd documentation about DLLTOOL variable
Vincent Torri [Sun, 18 Nov 2018 12:22:10 +0000 (13:22 +0100)]
Add documentation about DLLTOOL variable

5 years agoAdd DLLTOOL variable so that one can override dlltool binary
Vincent Torri [Sat, 17 Nov 2018 13:17:15 +0000 (14:17 +0100)]
Add DLLTOOL variable so that one can override dlltool binary
This fix cross compilation on linux for Windows

5 years agoMerge pull request #603 from vtorri/dev
Yann Collet [Sat, 17 Nov 2018 08:52:56 +0000 (00:52 -0800)]
Merge pull request #603 from vtorri/dev

Use / instead of \ when accessing files in the dll subdirectory.

5 years agoUse / instead of \ when accessing files in the dll subdirectory.
Vincent Torri [Sat, 17 Nov 2018 06:44:23 +0000 (07:44 +0100)]
Use / instead of \ when accessing files in the dll subdirectory.
This allow cross-compilation for Windows on Linux

5 years agoMerge pull request #600 from antinucleon/bootcamp
Yann Collet [Fri, 16 Nov 2018 19:14:46 +0000 (11:14 -0800)]
Merge pull request #600 from antinucleon/bootcamp

Enable amalgamation of lz4hc.c and lz4.c

5 years ago[amalgamation] add test
Bing Xu [Fri, 16 Nov 2018 17:12:26 +0000 (09:12 -0800)]
[amalgamation] add test

5 years agoEnable amalgamation of lz4hc.c and lz4.c
Bing Xu [Fri, 16 Nov 2018 06:24:25 +0000 (22:24 -0800)]
Enable amalgamation of lz4hc.c and lz4.c

6 years agoMerge pull request #593 from felixhandte/lz4hc-publish-static
Yann Collet [Tue, 16 Oct 2018 22:33:58 +0000 (15:33 -0700)]
Merge pull request #593 from felixhandte/lz4hc-publish-static

Extend Macro to Allow Publishing Experimental LZ4HC Functions in Dynamic Libraries

6 years agoMake LZ4HC Experimental Functions Dynamically Publishable
W. Felix Handte [Tue, 16 Oct 2018 00:23:06 +0000 (17:23 -0700)]
Make LZ4HC Experimental Functions Dynamically Publishable

6 years agoChange Comment and Make LZ4LIB_STATIC_API Available to LZ4HC
W. Felix Handte [Tue, 16 Oct 2018 00:22:37 +0000 (17:22 -0700)]
Change Comment and Make LZ4LIB_STATIC_API Available to LZ4HC

6 years agoupdated code documentation
Yann Collet [Mon, 15 Oct 2018 18:14:30 +0000 (11:14 -0700)]
updated code documentation

to clarify #589

6 years agoMerge pull request #583 from khabinov/stream-dirty-context-hc
Yann Collet [Thu, 11 Oct 2018 17:33:54 +0000 (10:33 -0700)]
Merge pull request #583 from khabinov/stream-dirty-context-hc

Adding information about dirty context for _HC_ family of functions

6 years agoAdding information about dirty context for _HC_ family of functions
Oleg Khabinov [Thu, 20 Sep 2018 18:47:30 +0000 (11:47 -0700)]
Adding information about dirty context for _HC_ family of functions

6 years agoMerge pull request #592 from lz4/compressEnd
Yann Collet [Tue, 9 Oct 2018 22:37:55 +0000 (15:37 -0700)]
Merge pull request #592 from lz4/compressEnd

fix LZ4F_compressEnd()

6 years agofixed #589
Yann Collet [Tue, 9 Oct 2018 21:37:51 +0000 (14:37 -0700)]
fixed #589

following recommendations by @raggi.

The fix is slightly different, but achieves the same goal,
and is backed by a test tool which proves that it works
(generates the error before the patch, no longer after the patch).

6 years agoadded a test for LZ4F_compressEnd()
Yann Collet [Tue, 9 Oct 2018 21:25:18 +0000 (14:25 -0700)]
added a test for LZ4F_compressEnd()

which actively tries to make it write out of bound.
For this scenario to be possible,
it's necessary to set dstCapacity < LZ4F_compressBound()

When a compression operation fails,
the CCtx context is left in an undefined state,
therefore compression cannot resume.
As a consequence :
- round trip tests must be aborted, since there is nothing valid to decompress
- most users avoid this situation, by ensuring that dstCapacity >= LZ4F_compressBound()

For these reasons, this use case was poorly tested up to now.

6 years agoMerge pull request #588 from khabinov/stream-dirty-followups
Yann Collet [Tue, 9 Oct 2018 20:14:00 +0000 (13:14 -0700)]
Merge pull request #588 from khabinov/stream-dirty-followups

Some followups and renamings

6 years agoMerge pull request #586 from blezsan/custom_block_sizes
Yann Collet [Tue, 2 Oct 2018 17:37:20 +0000 (10:37 -0700)]
Merge pull request #586 from blezsan/custom_block_sizes

support custom block sizes

6 years agosupport custom block sizes: fix memory leak to make CI builds happy
Blaise Sanouillet [Tue, 2 Oct 2018 12:38:30 +0000 (05:38 -0700)]
support custom block sizes: fix memory leak to make CI builds happy

6 years agoSome followups and renamings
Oleg Khabinov [Mon, 1 Oct 2018 22:19:45 +0000 (15:19 -0700)]
Some followups and renamings

6 years agosupport custom block sizes: remove unneeded fudging, fix leaked filehandles, other...
Blaise Sanouillet [Mon, 1 Oct 2018 12:22:50 +0000 (05:22 -0700)]
support custom block sizes: remove unneeded fudging, fix leaked filehandles, other nits

6 years agoMerge branch 'dev' into custom_block_sizes
Blaise Sanouillet [Mon, 1 Oct 2018 12:09:19 +0000 (05:09 -0700)]
Merge branch 'dev' into custom_block_sizes

6 years agoMerge pull request #587 from lz4/hintbug
Yann Collet [Fri, 28 Sep 2018 23:58:01 +0000 (16:58 -0700)]
Merge pull request #587 from lz4/hintbug

fixed improper hint

6 years agoMerge pull request #580 from khabinov/stream-error-flag-initCheck
Yann Collet [Fri, 28 Sep 2018 22:58:22 +0000 (15:58 -0700)]
Merge pull request #580 from khabinov/stream-error-flag-initCheck

Rename initCheck to dirtyContext and use it in LZ4_resetStream_fast()

6 years agofixed improper hint
Yann Collet [Fri, 28 Sep 2018 21:57:50 +0000 (14:57 -0700)]
fixed improper hint

when LZ4F_decompress() decodes an uncompressed block,
it provides an incorrect hint for next block
when frame checksum is enabled and block checksum is not.

Impact is low : the hint is just an hint,
the decoder works whatever the amount of input provided.

But the assumption that each call to LZ4F_decompress()
would generate just one complete block if input size hint was respected
was broken by this error.

6 years agoRename initCheck to dirtyContext and use it in LZ4_resetStream_fast() to check if...
Oleg Khabinov [Tue, 18 Sep 2018 18:29:31 +0000 (11:29 -0700)]
Rename initCheck to dirtyContext and use it in LZ4_resetStream_fast() to check if full reset is needed.

6 years agosupport custom block sizes: fix const
Blaise Sanouillet [Fri, 28 Sep 2018 17:00:38 +0000 (10:00 -0700)]
support custom block sizes: fix const

6 years agosupport custom block sizes: fix usage message & remove unused functions
Blaise Sanouillet [Fri, 28 Sep 2018 16:53:14 +0000 (09:53 -0700)]
support custom block sizes: fix usage message & remove unused functions

6 years agosupport custom block sizes - fix types
Blaise Sanouillet [Fri, 28 Sep 2018 16:02:36 +0000 (09:02 -0700)]
support custom block sizes - fix types

6 years agosupport custom block sizes
Blaise Sanouillet [Fri, 28 Sep 2018 15:02:49 +0000 (08:02 -0700)]
support custom block sizes

6 years agoMerge pull request #578 from lz4/support128bit
Yann Collet [Wed, 26 Sep 2018 20:57:09 +0000 (13:57 -0700)]
Merge pull request #578 from lz4/support128bit

Support for 128bit pointers like AS400

6 years agochanged LZ4_streamDecode member order
Yann Collet [Tue, 25 Sep 2018 21:43:19 +0000 (14:43 -0700)]
changed LZ4_streamDecode member order

to reduce memory usage on 128-bits systems

6 years agoMerge pull request #581 from lz4/cppcheck
Yann Collet [Wed, 19 Sep 2018 20:48:46 +0000 (13:48 -0700)]
Merge pull request #581 from lz4/cppcheck

Added cppcheck static analyzer test

6 years agotried to clean another bunch of cppcheck warnings
Yann Collet [Wed, 19 Sep 2018 01:08:59 +0000 (18:08 -0700)]
tried to clean another bunch of cppcheck warnings

so "funny" thing with cppcheck
is that no 2 versions give the same list of warnings.

On Mac, I'm using v1.81, which had all warnings fixed.
On Travis CI, it's v1.61, and it complains about a dozen more/different things.
On Linux, it's v1.72, and it finds a completely different list of a half dozen warnings.

Some of these seems to be bugs/limitations in cppcheck itself.
The TravisCI version v1.61 seems unable to understand %zu correctly, and seems to assume it means %u.

6 years agoMerge branch 'dev' into cppcheck
Yann Collet [Tue, 18 Sep 2018 23:55:17 +0000 (16:55 -0700)]
Merge branch 'dev' into cppcheck

6 years agoMerge pull request #579 from lz4/xxhash
Yann Collet [Tue, 18 Sep 2018 23:54:25 +0000 (16:54 -0700)]
Merge pull request #579 from lz4/xxhash

updated xxhash to latest version

6 years agoadded cppcheck
Yann Collet [Tue, 18 Sep 2018 23:52:02 +0000 (16:52 -0700)]
added cppcheck

as Makefile target and Travis CI test.

Fixed last cppcheck warnings in tests and examples

6 years agofixed minor cppcheck warnings in examples
Yann Collet [Tue, 18 Sep 2018 23:30:31 +0000 (16:30 -0700)]
fixed minor cppcheck warnings in examples

6 years agofixed minor cppcheck warnings in programs
Yann Collet [Tue, 18 Sep 2018 23:08:17 +0000 (16:08 -0700)]
fixed minor cppcheck warnings in programs

6 years agofixed minor cppcheck warnings in lib
Yann Collet [Tue, 18 Sep 2018 22:51:26 +0000 (15:51 -0700)]
fixed minor cppcheck warnings in lib

6 years agoupdated xxhash to latest version
Yann Collet [Tue, 18 Sep 2018 19:14:26 +0000 (12:14 -0700)]
updated xxhash to latest version

6 years agoincrease size of LZ4 contexts for 128-bit systems
Yann Collet [Tue, 18 Sep 2018 00:22:07 +0000 (17:22 -0700)]
increase size of LZ4 contexts for 128-bit systems

6 years agoMerge branch 'dev' into support128bit
Yann Collet [Tue, 18 Sep 2018 00:07:00 +0000 (17:07 -0700)]
Merge branch 'dev' into support128bit

6 years agoMerge pull request #575 from lz4/apiDoc
Yann Collet [Tue, 18 Sep 2018 00:06:34 +0000 (17:06 -0700)]
Merge pull request #575 from lz4/apiDoc

unpublish static-only functions

6 years agoincrease lz4hc context size as constant for 128-bit systems
Yann Collet [Tue, 18 Sep 2018 00:05:17 +0000 (17:05 -0700)]
increase lz4hc context size as constant for 128-bit systems

6 years agouse byU32 mode for any pointer > 32-bit
Yann Collet [Fri, 14 Sep 2018 21:58:16 +0000 (14:58 -0700)]
use byU32 mode for any pointer > 32-bit

including 128-bit, like IBM AS-400

6 years agoMerge pull request #574 from lz4/enumComma
Yann Collet [Fri, 14 Sep 2018 20:51:43 +0000 (13:51 -0700)]
Merge pull request #574 from lz4/enumComma

avoid final trailing comma for enum lists

6 years agoMerge pull request #573 from laffer1/laffer1-pkgconfig-mnbsd
Yann Collet [Fri, 14 Sep 2018 17:11:49 +0000 (10:11 -0700)]
Merge pull request #573 from laffer1/laffer1-pkgconfig-mnbsd

FIx pkgconfig file installation on MidnightBSD

6 years agoupdated build doc
Yann Collet [Thu, 13 Sep 2018 23:14:00 +0000 (16:14 -0700)]
updated build doc

6 years agounpublish static-only function
Yann Collet [Thu, 13 Sep 2018 23:02:11 +0000 (16:02 -0700)]
unpublish static-only function

these functions are now unpublished in dll by default.
One needs to opt-in, using macro LZ4_PUBLISH_STATIC_FUNCTIONS.

used this opportunity to update a bunch of api comments in lz4.h

6 years agoavoid final trailing comma for enum lists
Yann Collet [Thu, 13 Sep 2018 21:29:41 +0000 (14:29 -0700)]
avoid final trailing comma for enum lists

as detected in #485 by @JoachimSchneider.

Refactored the c_standards tests
so that these issues get automatically detected in CI tests.

6 years agoremoved image from repository
Yann Collet [Wed, 12 Sep 2018 17:50:37 +0000 (10:50 -0700)]
removed image from repository

used for v1.8.2 announcement

6 years agofixed NEWS for v1.8.3
Yann Collet [Wed, 12 Sep 2018 17:48:19 +0000 (10:48 -0700)]
fixed NEWS for v1.8.3

6 years agoFIx pkgconfig file installation on MidnightBSD
Lucas Holt [Wed, 12 Sep 2018 01:18:43 +0000 (21:18 -0400)]
FIx pkgconfig file installation on MidnightBSD

6 years agoMerge pull request #572 from lz4/dev
Yann Collet [Tue, 11 Sep 2018 19:52:06 +0000 (12:52 -0700)]
Merge pull request #572 from lz4/dev

v1.8.3

6 years agoupdated NEWS for v1.8.3 release
Yann Collet [Tue, 11 Sep 2018 17:15:31 +0000 (10:15 -0700)]
updated NEWS for v1.8.3 release

6 years agoMerge branch 'dev' of github.com:Cyan4973/lz4 into dev
Yann Collet [Tue, 11 Sep 2018 17:01:33 +0000 (10:01 -0700)]
Merge branch 'dev' of github.com:Cyan4973/lz4 into dev

6 years agoMerge pull request #571 from lz4/mflimit
Yann Collet [Tue, 11 Sep 2018 17:01:23 +0000 (10:01 -0700)]
Merge pull request #571 from lz4/mflimit

 clarify constant MFLIMIT

6 years agoclarify constant MFLIMIT
Yann Collet [Tue, 11 Sep 2018 00:36:40 +0000 (17:36 -0700)]
clarify constant MFLIMIT

and separate it from MATCH_SAFEGUARD_DISTANCE.

While both constants have same value,
they do not seve same purpose, hence should not be confused.

6 years agoMerge pull request #569 from lz4/circle2
Yann Collet [Mon, 10 Sep 2018 21:44:15 +0000 (14:44 -0700)]
Merge pull request #569 from lz4/circle2

Migrate CircleCI tests from 1.0 towards 2.0

6 years agoMerge pull request #570 from lz4/partialDecode
Yann Collet [Tue, 11 Sep 2018 16:55:31 +0000 (09:55 -0700)]
Merge pull request #570 from lz4/partialDecode

Partial decode

6 years agofixed minor warning in fuzzer.c
Yann Collet [Mon, 10 Sep 2018 23:48:41 +0000 (16:48 -0700)]
fixed minor warning in fuzzer.c

added a few more comments and assert()

6 years agorestored nullifying output
Yann Collet [Mon, 10 Sep 2018 23:22:16 +0000 (16:22 -0700)]
restored nullifying output

to counter possible (offset==0)

6 years agoremoved temporary debug traces
Yann Collet [Mon, 10 Sep 2018 22:51:53 +0000 (15:51 -0700)]
removed temporary debug traces

6 years agoMerge branch 'dev' into partialDecode
Yann Collet [Mon, 10 Sep 2018 22:44:40 +0000 (15:44 -0700)]
Merge branch 'dev' into partialDecode

6 years agoMerge pull request #569 from lz4/circle2
Yann Collet [Mon, 10 Sep 2018 21:44:15 +0000 (14:44 -0700)]
Merge pull request #569 from lz4/circle2

Migrate CircleCI tests from 1.0 towards 2.0

6 years agoMerge pull request #565 from lz4/lz4f_init
Yann Collet [Mon, 10 Sep 2018 20:11:56 +0000 (13:11 -0700)]
Merge pull request #565 from lz4/lz4f_init

Introduced constants LZ4F_INIT_*

6 years agoswitched to circle 2.0
Yann Collet [Mon, 10 Sep 2018 19:08:51 +0000 (12:08 -0700)]
switched to circle 2.0

using automated config-translation

6 years agoMerge branch 'dev' of github.com:Cyan4973/lz4 into dev
Yann Collet [Mon, 10 Sep 2018 19:02:42 +0000 (12:02 -0700)]
Merge branch 'dev' of github.com:Cyan4973/lz4 into dev

6 years agoMerge pull request #567 from laffer1/dev
Yann Collet [Mon, 10 Sep 2018 18:59:09 +0000 (11:59 -0700)]
Merge pull request #567 from laffer1/dev

Add support for MidnightBSD

6 years agoAdd support for MidnightBSD
Lucas Holt [Sat, 8 Sep 2018 18:46:54 +0000 (14:46 -0400)]
Add support for MidnightBSD

6 years agofixed fuzzer test
Yann Collet [Sat, 8 Sep 2018 01:22:01 +0000 (18:22 -0700)]
fixed fuzzer test

and removed one blind copy, since there is no more guarantee that at least 4 bytes are still available in output buffer

6 years agoupdated function interface documentation
Yann Collet [Fri, 7 Sep 2018 23:21:31 +0000 (16:21 -0700)]
updated function interface documentation

6 years agofirst sketch for a byte-accurate partial decoder
Yann Collet [Fri, 7 Sep 2018 22:44:19 +0000 (15:44 -0700)]
first sketch for a byte-accurate partial decoder

6 years agoupdated API documentation
Yann Collet [Fri, 7 Sep 2018 18:02:42 +0000 (11:02 -0700)]
updated API documentation