Commit Graph

2349 Commits

Author SHA1 Message Date
W. Felix Handte
a78235e6ad Fix Enum Casts
Fixes `-Wsign-compare` issues.
2020-08-10 13:47:08 -04:00
W. Felix Handte
9af86f0841 Remove dirty Field From LZ4_stream_t 2020-08-06 16:06:40 -04:00
W. Felix Handte
d7399232a4 Remove Extraneous Reset in LZ4_attach_dictionary()
Nothing internally sets dirty anymore. The only way to get that is if you use
an uninitialized context, in which case your warranty is void anyways.
2020-08-05 12:46:32 -04:00
Yann Collet
cd5d78ebd0
Merge pull request #890 from terrelln/lz4-memcpy
Call LZ4_memcpy() instead of memcpy()
2020-08-03 18:34:16 -07:00
Nick Terrell
fe2a1b3707 Call LZ4_memcpy() instead of memcpy()
`LZ4_memcpy()` uses `__builtin_memcpy()` to ensure that clang/gcc
can inline the `memcpy()` calls in freestanding mode.

This is necessary for decompressing the Linux Kernel with LZ4.
Without an analogous patch decompression ran at 77 MB/s, and with
the patch it ran at 884 MB/s.
2020-08-03 11:28:02 -07:00
Yann Collet
349b343cf0
Merge pull request #885 from neheb/mes
meson: remove build requirement for distutils
2020-08-03 10:47:24 -07:00
Yann Collet
f4054274fa
Merge pull request #860 from adeason/old-style-definitions
Avoid old-style function definitions
2020-07-28 17:44:25 -07:00
Rosen Penev
4ebc792cab
meson: remove build requirement for distutils
Tested on a default installation of Debian 10.

Same as https://github.com/facebook/zstd/pull/2197

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-07-21 15:27:22 -07:00
Yann Collet
48f9ecfb34
Merge pull request #863 from Devernua/reducing_stack_usage_in_t_alignment
Reducing stack usage in _t_alignment checks
2020-07-16 09:44:40 -07:00
Yann Collet
8ef649f3a8
Merge pull request #866 from sandyharvie/dev
Fix issue #865
2020-07-13 18:09:02 -07:00
Yann Collet
3d5311edc6
Merge pull request #871 from bimbashrestha/bsd
[build] FreeBSD update version 12.0 -> 12.1
2020-07-13 18:07:05 -07:00
Yann Collet
6b12fde42a
Merge pull request #884 from vectorizedio/clang-ubsan
avoid computing 0 offsets from null pointers
2020-07-08 09:12:25 -07:00
Alexander Gallego
e68c7d3878 avoid computing 0 offsets from null pointers
Similar work in the kernel:
https://patchwork.kernel.org/patch/11351499/

UBsan (+clang-10) complains about doing pointer arithmetic (adding 0)
to a nullpointer.

This patch is tested with clang-10+ubsan
2020-07-08 08:30:07 -07:00
Yann Collet
49b3ad4bd4 Update issue templates 2020-06-13 14:31:15 -07:00
Bimba Shrestha
a05312d924 bsd upsate to 12-1 2020-06-05 11:57:44 -05:00
Yann Collet
1db9be5c47
Merge pull request #869 from bket/fix_tests_openbsd
Fix tests on OpenBSD
2020-05-30 00:07:48 -07:00
Björn Ketelaars
7c57828096 Fix tests on OpenBSD
Add condition for OpenBSD, which uses gmake
2020-05-30 07:36:22 +02:00
Christopher Harvie
2a7203c05d add tests 2020-05-13 23:01:43 -04:00
Christopher Harvie
57c35511d4 fix LZ4F_compressBound when automatic flushing is enabled 2020-05-13 21:48:12 -04:00
Aleksandr Kukuev
7a75b045bd Reducing stack usage in _t_alignment checks 2020-05-11 23:32:02 +03:00
Andrew Deason
12001d6c1a Avoid old-style function definitions
Define 0-argument functions like foo(void) instead of foo(), in order
to avoid a warning with -Wold-style-definition. This makes it easier
to embed lz4.c in projects that compile with -Werror
-Wold-style-definition.
2020-05-07 15:02:09 -05:00
Yann Collet
f39b79fb02
Merge pull request #846 from bimbashrestha/issues-tmp
Adding issue templates
2020-03-03 14:17:52 -08:00
Bimba Shrestha
c5af6992f5 Adding issue templates 2020-03-03 13:29:57 -08:00
Yann Collet
23b6a700b3
Merge pull request #838 from Yanpas/stack_frame_2
fix: allocate  LZ4HC_optimal_t opt on heap each time (#837)
2020-02-26 10:06:54 -08:00
Yann Collet
9f3ee55223
Merge pull request #843 from filipecalasans/multiples-files-with-legacy
Implement -m option with legacy format on cli
2020-02-07 18:49:24 -08:00
Filipe Calasans
3f53227b96 Add test scenario test-lz4-multiple-legacy 2020-02-07 17:14:01 -08:00
Filipe Calasans
781417a369 Implement -m option with legacy format on cli 2020-02-07 17:03:13 -08:00
Yann Collet
8372862e0f
Merge pull request #842 from filipecalasans/fix-list
Fix lz4cli --list option
2020-02-07 10:17:33 -08:00
Filipe Calasans
ac4940cd98 Fix lz4cli --list option 2020-02-06 21:39:54 -08:00
Yan Pashkovsky
4cc9d863a3 fix malloc handling 2020-02-03 16:50:02 +03:00
Yan Pashkovsky
2553cd550b fix: allocate LZ4HC_optimal_t opt on heap each time (#837) 2020-01-31 20:10:56 +03:00
Yann Collet
e55548b0bd updated NEWS for v1.9.3 2020-01-27 13:51:06 -08:00
Yann Collet
cb1ee95d76
Merge pull request #826 from wolfpld/dev
Force inline small functions used by LZ4_compress_generic.
2020-01-27 13:45:02 -08:00
Bartosz Taudul
7224f9bd5d Force inline small functions used by LZ4_compress_generic. 2020-01-17 00:37:47 +01:00
Yann Collet
c7ad96e299
Merge pull request #825 from NancyLi1013/vcpkg-instructions
Add vcpkg installation instructions
2020-01-16 09:19:02 -08:00
NancyLi1013
d28e49bf75 Add vcpkg installation instructions 2020-01-16 00:51:00 -08:00
Yann Collet
0f749838bf
Merge pull request #810 from korli/haiku
bring support for Haiku up to date.
2019-12-05 20:32:02 -08:00
Yann Collet
e3069dabcd
Merge pull request #803 from dkondrad/gh-797
VS2017: Add lz4 project
2019-12-03 16:37:17 -08:00
Yann Collet
e876ea0920
Merge pull request #817 from lz4/windfast
faster decoding speed with Visual
2019-12-03 16:34:11 -08:00
Yann Collet
d755f87f9f fixed lz4hc assert error
when src ptr is in very low memory area (< 64K),
the virtual reference to data in dictionary
might end up in a very high memory address.

Since it's not a "real" memory address,
just a virtual one, to calculate distance,
it doesn't matter : only distance matters.

The assert was to restrictive.
Fixed.
2019-12-03 14:49:22 -08:00
Yann Collet
0f6cbd996f faster decoding speed with Visual
by enabling the fast decoder path.
Visual requires a different set of macro constants to detect x86 / x64.

On my laptop, decoding speed on x64 went up from 3.12 to 3.45 GB/s.
32-bit is less impressive, though still favorable,
with speed increasing from 2.55 to 2.60 GB/s.

So both cases are now enabled.

Suggested by Bartosz Taudul (@wolfpld).
2019-12-02 16:38:33 -08:00
Yann Collet
bed083b3c7
Merge pull request #815 from andrewthad/patch-1
Fix typos in streaming_api_basics.md
2019-11-30 08:16:58 -08:00
Andrew Martin
059682fb01
Fix typos in streaming_api_basics.md 2019-11-30 06:58:54 -05:00
Jerome Duval
935b432be1 bring support for Haiku up to date. 2019-11-07 14:32:38 +01:00
Yann Collet
6e0d2be73a
Merge pull request #808 from rkoradi/benchmarkWithDictionary
Make benchmark compatible with dictionary compression
2019-11-06 09:36:56 -08:00
Reto Koradi
cc91777c98 Make benchmark compatible with dictionary compression
Support the -D command line option for running benchmarks. The
benchmark code was slightly restructured to factor out the calls
that need to be different for each benchmark scenario. Since there
are now 4 scenarios (all combinations of fast/HC and with/without
dictionary), the logic was getting somewhat convoluted otherwise.

This was done by extending the compressionParameters struct that
previously contained just a single function pointer. It now
contains 4 function pointers for init/reset/compress/cleanup,
with the related state. The functions get a pointer to the
structure as their first argument (inspired by C++), so that they
can access the state values in the struct.
2019-11-05 23:38:00 -08:00
David A Kondrad
de44877888 project: VS2017: add lz4 project
Add missing lz4 project to the VS2017 solution.
The project was made from scratch rather than importing and updated to
match the VS2010 options.

Any new options not present in the old VS2010 project we pulled from
other console binaries in the solution.

Signed-off-by: David A Kondrad <dkondrad.mscs+patches@gmail.com>
2019-10-25 15:04:27 -04:00
David A Kondrad
2c392c5f9a project: visual: fix VS2010/17 gitignore
The `lz4` project was excluded from being checked in for VS2017.
Add some fixups to explicitly allow this project directory.
Also add an exclusion for VS2017 binaries and VS `ipch` directories.

Signed-off-by: David A Kondrad <dkondrad.mscs+patches@gmail.com>
2019-10-25 14:51:36 -04:00
Yann Collet
e8baeca51e
Merge pull request #798 from bimbashrestha/adding_cirrus_test
Adding cirrus test for FreeBSD
2019-10-07 09:51:15 -07:00
Bimba Shrestha
dcdb9c73c0 Adding unamestr var 2019-10-07 08:12:42 -07:00