platform/upstream/lz4.git
5 years agodecompress_generic: Add a loop fastpath
Dave Watson [Thu, 24 Jan 2019 21:42:25 +0000 (13:42 -0800)]
decompress_generic: Add a loop fastpath

Copy the main loop, and change checks such that op is always less
than oend-SAFE_DISTANCE.  Currently these are added for the literal
copy length check, and for the match copy length check.

Otherwise the first loop is exactly the same as the second.  Follow on
diffs will optimize the first copy loop based on this new requirement.

I also tried instead making a separate inlineable function for the copy
loop (similar to existing partialDecode flags, etc), but I think the
changes might be significant enough to warrent doubling the code, instead
pulling out common functionality to separate functions.

This is the basic transformation that will allow several following optimisations.

5 years agodecompress_generic: Refactor variable length fields
Dave Watson [Thu, 24 Jan 2019 21:07:57 +0000 (13:07 -0800)]
decompress_generic: Refactor variable length fields

Make a helper function to read variable lengths for literals and
match length.

5 years agoMerge pull request #644 from lzutao/meson-msvc-export
Yann Collet [Wed, 23 Jan 2019 17:03:13 +0000 (09:03 -0800)]
Merge pull request #644 from lzutao/meson-msvc-export

meson: Add -DLZ4_DLL_EXPORT=1 to build dynamic lib on Windows

5 years agomeson: Add -DLZ4_DLL_EXPORT=1 to build dynamic lib on Windows
Lzu Tao [Wed, 23 Jan 2019 08:40:26 +0000 (15:40 +0700)]
meson: Add -DLZ4_DLL_EXPORT=1 to build dynamic lib on Windows

Thanks @nacho for pointing it out.

5 years agoMerge pull request #638 from lzutao/travis
Yann Collet [Fri, 11 Jan 2019 20:11:45 +0000 (12:11 -0800)]
Merge pull request #638 from lzutao/travis

Travis: Clean up .travis.yml

5 years agoMerge pull request #639 from lzutao/meson
Yann Collet [Fri, 11 Jan 2019 20:11:35 +0000 (12:11 -0800)]
Merge pull request #639 from lzutao/meson

meson: Small improvements

5 years agoMerge pull request #640 from tzakian/remove_io_globals
Yann Collet [Fri, 11 Jan 2019 20:11:24 +0000 (12:11 -0800)]
Merge pull request #640 from tzakian/remove_io_globals

Remove a bunch of global variables that tracked settings for the IO module

5 years agoAdd cast around malloc
Tim Zakian [Fri, 11 Jan 2019 17:49:26 +0000 (09:49 -0800)]
Add cast around malloc

5 years agoAdd constant pointer annotations
Tim Zakian [Fri, 11 Jan 2019 04:40:00 +0000 (20:40 -0800)]
Add constant pointer annotations

5 years agoRemove a bunch of global variables that tracked settings for the IO module, and move...
Tim Zakian [Thu, 10 Jan 2019 23:27:47 +0000 (15:27 -0800)]
Remove a bunch of global variables that tracked settings for the IO module, and move them in to a struct

5 years agotravis: Prefer `apt-get` in `install` field than `addons-apt-sources`
Lzu Tao [Thu, 10 Jan 2019 18:39:34 +0000 (01:39 +0700)]
travis: Prefer `apt-get` in `install` field than `addons-apt-sources`

5 years agotravis: Prefer `script` field than `Cmd` env
Lzu Tao [Thu, 10 Jan 2019 18:20:16 +0000 (01:20 +0700)]
travis: Prefer `script` field than `Cmd` env

5 years agomeson: Favor warning if cannot find version string
Lzu Tao [Thu, 10 Jan 2019 19:34:16 +0000 (02:34 +0700)]
meson: Favor warning if cannot find version string

5 years agomeson: Use libray as required argument in `pkgconfig`
Lzu Tao [Thu, 10 Jan 2019 19:33:27 +0000 (02:33 +0700)]
meson: Use libray as required argument in `pkgconfig`

5 years agomeson: Explicit use `meson setup` to setup a builddir
Lzu Tao [Thu, 10 Jan 2019 19:32:39 +0000 (02:32 +0700)]
meson: Explicit use `meson setup` to setup a builddir

5 years agoMerge pull request #637 from tzakian/fix_pass-through_mode
Yann Collet [Thu, 10 Jan 2019 18:56:41 +0000 (10:56 -0800)]
Merge pull request #637 from tzakian/fix_pass-through_mode

Fix pass-through mode

5 years agoFix pass-through mode
Tim Zakian [Thu, 10 Jan 2019 18:20:17 +0000 (10:20 -0800)]
Fix pass-through mode

5 years agoMerge pull request #635 from tzakian/clean_call_to_LZ4HC_encodeSequence
Yann Collet [Thu, 10 Jan 2019 03:58:07 +0000 (19:58 -0800)]
Merge pull request #635 from tzakian/clean_call_to_LZ4HC_encodeSequence

Make effectfulness of calls to LZ4HC_encodeSequence clearer

5 years agofixed strict C++ compilation
Yann Collet [Wed, 9 Jan 2019 21:45:42 +0000 (13:45 -0800)]
fixed strict C++ compilation

5 years agoMake fact that certain variables that are passed into LZ4HC_encodeSequence are change...
Tim Zakian [Wed, 9 Jan 2019 21:42:12 +0000 (13:42 -0800)]
Make fact that certain variables that are passed into LZ4HC_encodeSequence are changed by the function call

5 years agofixed long sequence overflow test
Yann Collet [Wed, 9 Jan 2019 21:38:33 +0000 (13:38 -0800)]
fixed long sequence overflow test

5 years agominor explicit cast warning
Yann Collet [Wed, 9 Jan 2019 20:41:03 +0000 (12:41 -0800)]
minor explicit cast warning

5 years agoMerge pull request #634 from lz4/longSeqTest
Yann Collet [Wed, 9 Jan 2019 20:22:04 +0000 (12:22 -0800)]
Merge pull request #634 from lz4/longSeqTest

add a test to check long sequences (#631)

5 years agoMerge pull request #631 from qiuyangs/dev
Yann Collet [Wed, 9 Jan 2019 20:21:39 +0000 (12:21 -0800)]
Merge pull request #631 from qiuyangs/dev

 lz4hc.c: change (length >> 8) to (length / 255)

5 years agoMerge pull request #633 from tzakian/make_block_size_public
Yann Collet [Wed, 9 Jan 2019 20:13:17 +0000 (12:13 -0800)]
Merge pull request #633 from tzakian/make_block_size_public

Make LZ4F_getBlockSize public and public in experimental section

5 years agoadd a test to check long sequences (#631)
Yann Collet [Wed, 9 Jan 2019 20:09:52 +0000 (12:09 -0800)]
add a test to check long sequences (#631)

the test fails, as intended,
since #631 is not merged yet in this branch.

5 years agoFix C90 compatibility issue
Tim Zakian [Wed, 9 Jan 2019 19:17:46 +0000 (11:17 -0800)]
Fix C90 compatibility issue

5 years agoMake LZ4F_getBlockSize public and publis in experimental section
Tim Zakian [Wed, 9 Jan 2019 18:49:49 +0000 (10:49 -0800)]
Make LZ4F_getBlockSize public and publis in experimental section

5 years agoMerge pull request #632 from rubenochiavone/fix-lz4-extesion-not-decompressing
Yann Collet [Wed, 9 Jan 2019 17:21:54 +0000 (09:21 -0800)]
Merge pull request #632 from rubenochiavone/fix-lz4-extesion-not-decompressing

Fix lz4 extension in input filename not causing decompression

5 years agoAdd test to cover issue #596
Ruben O. Chiavone [Wed, 9 Jan 2019 04:51:40 +0000 (01:51 -0300)]
Add test to cover issue #596

5 years agoFix lz4 extension in input filename not causing decompression
Ruben O. Chiavone [Wed, 9 Jan 2019 01:56:04 +0000 (22:56 -0300)]
Fix lz4 extension in input filename not causing decompression

5 years agoMerge pull request #1 from qiuyangs/sunqiuyang-fix-length>>8
qiuyangs [Sun, 6 Jan 2019 08:33:53 +0000 (16:33 +0800)]
Merge pull request #1 from qiuyangs/sunqiuyang-fix-length>>8

lz4hc.c: change (length >> 8) to (length / 255)

5 years agolz4hc.c: change (length >> 8) to (length / 255)
qiuyangs [Sun, 6 Jan 2019 08:29:30 +0000 (16:29 +0800)]
lz4hc.c: change (length >> 8) to (length / 255)

Every 0xff byte in the compressed block corresponds to a length of 255 (not 256) in the input data. For long repeating sequences, using (length >> 8) may generate bad compressed blocks.

5 years agoupdated frame format
Yann Collet [Wed, 2 Jan 2019 23:02:22 +0000 (15:02 -0800)]
updated frame format

re-wording non-full blocks,
for clarity.

5 years agoupdated LZ4 block format
Yann Collet [Wed, 2 Jan 2019 22:36:12 +0000 (14:36 -0800)]
updated LZ4 block format

rewording the end of block conditions
for clarity and answering related questions.

5 years agoMerge pull request #620 from lzutao/meson_symlink
Yann Collet [Mon, 17 Dec 2018 17:32:01 +0000 (09:32 -0800)]
Merge pull request #620 from lzutao/meson_symlink

Update meson symlink and man1 extension

5 years agoMerge pull request #621 from lzutao/meson_getversion
Yann Collet [Fri, 14 Dec 2018 17:24:50 +0000 (09:24 -0800)]
Merge pull request #621 from lzutao/meson_getversion

meson: Remove unused sys import

5 years agomeson: Remove unused sys import
Lzu Tao [Fri, 14 Dec 2018 04:12:22 +0000 (11:12 +0700)]
meson: Remove unused sys import

5 years agoSimplify logic by setting default value for MESON_INSTALL_DESTDIR_PREFIX
Lzu Tao [Thu, 13 Dec 2018 11:08:01 +0000 (18:08 +0700)]
Simplify logic by setting default value for MESON_INSTALL_DESTDIR_PREFIX

5 years agomeson: Update man1 extension in meson 0.49.0
Lzu Tao [Thu, 13 Dec 2018 07:52:51 +0000 (14:52 +0700)]
meson: Update man1 extension in meson 0.49.0

5 years agomeson: Update InstallSymlink.py usage
Lzu Tao [Thu, 13 Dec 2018 07:27:13 +0000 (14:27 +0700)]
meson: Update InstallSymlink.py usage

Change default directory mode to 755.

5 years agoMerge pull request #618 from dosaboy/add-snap-packaging-support
Yann Collet [Wed, 12 Dec 2018 19:19:46 +0000 (11:19 -0800)]
Merge pull request #618 from dosaboy/add-snap-packaging-support

Add snap packaging support

5 years agoAdd snap packaging support
Edward Hope-Morley [Tue, 11 Dec 2018 17:54:45 +0000 (17:54 +0000)]
Add snap packaging support

This commit adds a snapcraft.yaml file to allow lz4
to be distributed as a snap (see https://snapcraft.io/
for more info on snaps).

Building the Snap
-----------------

To build the snap simply install snapcraft and build the
snap e.g. on Ubuntu by doing:

$ sudo apt install snapcraft
$ cd contrib; snapcraft

This will build a snap that can be published [1] to
e.g. https://snapcraft.io/lz4

If you want to test the snap before publishing you
can do:

$ snap install <snapname>.snap --dangerous

And that will install it on your local host. You
will then have lz4 as a command to run.

Installing the Snap
-------------------

Once published and released in the snapstore your snap
can be installed on any platform that supports snaps
by doing:

snap install lz4

[1] https://docs.snapcraft.io/releasing-to-the-snap-store

5 years agoMerge pull request #616 from felixhandte/lz4-attach-reject-short-dicts
Yann Collet [Sun, 9 Dec 2018 19:29:43 +0000 (11:29 -0800)]
Merge pull request #616 from felixhandte/lz4-attach-reject-short-dicts

Fix LZ4_compress_fast_continue() Prefix Size Check

5 years agoMerge pull request #613 from lzutao/fix_meson_tests
Yann Collet [Sun, 9 Dec 2018 19:29:03 +0000 (11:29 -0800)]
Merge pull request #613 from lzutao/fix_meson_tests

meson: Fix build and test problems

5 years agomeson: Add README.md for newcomers [skip ci]
Lzu Tao [Sun, 9 Dec 2018 11:57:49 +0000 (18:57 +0700)]
meson: Add README.md for newcomers [skip ci]

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 agoNo need to join prefix and let soversion base on version
Lzu Tao [Tue, 4 Dec 2018 03:18:54 +0000 (10:18 +0700)]
No need to join prefix and let soversion base on version

5 years agoUse MESON_INSTALL_DESTDIR_PREFIX instead of DESTDIR
Lzu Tao [Tue, 4 Dec 2018 03:18:01 +0000 (10:18 +0700)]
Use MESON_INSTALL_DESTDIR_PREFIX instead of DESTDIR

5 years agomeson: Add fallback message when not found lz4.h
Lzu Tao [Mon, 3 Dec 2018 17:59:06 +0000 (00:59 +0700)]
meson: Add fallback message when not found lz4.h

5 years agomeson: Fix wrong path to lib/lz4.h
Lzu Tao [Mon, 3 Dec 2018 17:56:10 +0000 (00:56 +0700)]
meson: Fix wrong path to lib/lz4.h

5 years agomeson: Correct support for Windows build
Lzu Tao [Mon, 3 Dec 2018 15:48:25 +0000 (22:48 +0700)]
meson: Correct support for Windows build

5 years agomeson: Use clang for faster build
Lzu Tao [Sun, 2 Dec 2018 15:57:18 +0000 (22:57 +0700)]
meson: Use clang for faster build

"ninja install" automatically builds the project, no need to
use "ninja"

5 years agomeson: Update usage of InstallSymlink helper
Lzu Tao [Mon, 3 Dec 2018 04:02:56 +0000 (11:02 +0700)]
meson: Update usage of InstallSymlink helper

5 years agoUse argparse instead of manually parsing [skip ci]
Lzu Tao [Sun, 2 Dec 2018 15:42:14 +0000 (22:42 +0700)]
Use argparse instead of manually parsing [skip ci]

5 years agomeson: Fix soversion and generated pkg-config file [skip ci]
Lzu Tao [Sun, 2 Dec 2018 15:29:32 +0000 (22:29 +0700)]
meson: Fix soversion and generated pkg-config file [skip ci]

5 years agomeson: Use --werror build option instead of passing -Werror [skip ci]
Lzu Tao [Sun, 2 Dec 2018 15:19:48 +0000 (22:19 +0700)]
meson: Use --werror build option instead of passing -Werror [skip ci]

5 years agomeson test: Update timeout and tests that use COPYING
Lzu Tao [Sun, 2 Dec 2018 14:36:09 +0000 (21:36 +0700)]
meson test: Update timeout and tests that use COPYING

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

5 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

5 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

5 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

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

to clarify #589

5 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

5 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

5 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()

5 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).

5 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.

5 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