]> git.ipfire.org Git - thirdparty/zstd.git/log
thirdparty/zstd.git
5 years agoMerge branch 'dev' into initStatic_tests 2124/head
Yann Collet [Mon, 11 May 2020 23:51:13 +0000 (16:51 -0700)] 
Merge branch 'dev' into initStatic_tests

5 years agoMerge pull request #2129 from felixhandte/fix-cctx-size-estimate
Yann Collet [Mon, 11 May 2020 23:36:46 +0000 (16:36 -0700)] 
Merge pull request #2129 from felixhandte/fix-cctx-size-estimate

Fix ZSTD_estimateCCtxSize() Under ASAN

5 years agoFix ZSTD_estimateCCtxSize() Under ASAN 2129/head
W. Felix Handte [Mon, 11 May 2020 22:53:32 +0000 (18:53 -0400)] 
Fix ZSTD_estimateCCtxSize() Under ASAN

`ZSTD_estimateCCtxSize()` provides estimates for one-shot compression, which
is guaranteed not to buffer inputs or outputs. So it ignores the sizes of the
buffers, assuming they'll be zero. However, the actual workspace allocation
logic always allocates those buffers, and when running under ASAN, the
workspace surrounds every allocation with 256 bytes of redzone. So the 0-sized
buffers end up consuming 512 bytes of space, which is accounted for in the
actual allocation path through the use of `ZSTD_cwksp_alloc_size()` but isn't
in the estimation path, since it ignores the buffers entirely.

This commit fixes this.

5 years agoMerge pull request #2128 from terrelln/benches
Nick Terrell [Mon, 11 May 2020 20:53:18 +0000 (13:53 -0700)] 
Merge pull request #2128 from terrelln/benches

Update benchmarks and add fast mode

5 years agoUpdate benchmarks and add fast mode 2128/head
Nick Terrell [Mon, 11 May 2020 19:29:03 +0000 (12:29 -0700)] 
Update benchmarks and add fast mode

5 years agoMerge pull request #2127 from bimbashrestha/docs1
Bimba Shrestha [Mon, 11 May 2020 17:51:35 +0000 (12:51 -0500)] 
Merge pull request #2127 from bimbashrestha/docs1

[doc] documenting non-supported grep options for zstdgrep to README

5 years agodocumenting non-supported grep options for zstdgrep 2127/head
Bimba Shrestha [Mon, 11 May 2020 17:22:45 +0000 (12:22 -0500)] 
documenting non-supported grep options for zstdgrep

5 years agoMerge pull request #2120 from facebook/clevel_doc
Yann Collet [Mon, 11 May 2020 16:42:33 +0000 (09:42 -0700)] 
Merge pull request #2120 from facebook/clevel_doc

updated zstd CLI documentation

5 years agore-inforced tests for initStaticCCtx
Yann Collet [Sat, 9 May 2020 18:30:45 +0000 (11:30 -0700)] 
re-inforced tests for initStaticCCtx

ensure that `estimateCCtxSize()` works as intended.

5 years agoMerge pull request #2122 from felixhandte/unused-variables
Felix Handte [Fri, 8 May 2020 22:17:38 +0000 (18:17 -0400)] 
Merge pull request #2122 from felixhandte/unused-variables

Compile Under `-Wunused-variable`

5 years agoMerge pull request #2116 from felixhandte/pkg-config-again-again
Felix Handte [Fri, 8 May 2020 21:14:43 +0000 (17:14 -0400)] 
Merge pull request #2116 from felixhandte/pkg-config-again-again

Fix pkg-config File Generation Again Again

5 years agoUse Unused Variable 2122/head
W. Felix Handte [Fri, 8 May 2020 20:42:15 +0000 (16:42 -0400)] 
Use Unused Variable

5 years agodocument additional compilation macros 2120/head
Yann Collet [Fri, 8 May 2020 20:35:59 +0000 (13:35 -0700)] 
document additional compilation macros

ZSTD_NOBENCH, ZSTD_NODICT, ZSTD_NOCOMPRESS, ZSTD_NODECOMPRESS

5 years agoOnly Trigger libzstd.pc Build on Unix-Like Platforms 2116/head
W. Felix Handte [Fri, 8 May 2020 20:01:26 +0000 (16:01 -0400)] 
Only Trigger libzstd.pc Build on Unix-Like Platforms

We don't even define the rule on unsupported platforms.

5 years agoTest libzstd.pc Build on Travis OS X
W. Felix Handte [Fri, 8 May 2020 17:10:20 +0000 (13:10 -0400)] 
Test libzstd.pc Build on Travis OS X

5 years agoAdd libzstd.pc Build to More Aggregate Targets in Makefiles
W. Felix Handte [Fri, 8 May 2020 17:06:31 +0000 (13:06 -0400)] 
Add libzstd.pc Build to More Aggregate Targets in Makefiles

5 years agoFix pkg-config File Generation Again Again
W. Felix Handte [Thu, 7 May 2020 17:12:59 +0000 (13:12 -0400)] 
Fix pkg-config File Generation Again Again

Resubmission of #2001. This switches the `sed` invocations to use `-E`,
extended regex syntax, which is better standardized across platforms.
I guess.

Same test plan:

```
make -C lib clean libzstd.pc
cat lib/libzstd.pc

echo # should fail
make -C lib clean libzstd.pc     LIBDIR=/foo
make -C lib clean libzstd.pc INCLUDEDIR=/foo
make -C lib clean libzstd.pc     LIBDIR=/usr/localfoo
make -C lib clean libzstd.pc INCLUDEDIR=/usr/localfoo
make -C lib clean libzstd.pc     LIBDIR=/usr/local/lib     prefix=/foo
make -C lib clean libzstd.pc INCLUDEDIR=/usr/local/include prefix=/foo

echo # should succeed
make -C lib clean libzstd.pc     LIBDIR=/usr/local/foo
make -C lib clean libzstd.pc INCLUDEDIR=/usr/local/foo
make -C lib clean libzstd.pc     LIBDIR=/usr/local/
make -C lib clean libzstd.pc INCLUDEDIR=/usr/local/
make -C lib clean libzstd.pc     LIBDIR=/usr/local
make -C lib clean libzstd.pc INCLUDEDIR=/usr/local
make -C lib clean libzstd.pc     LIBDIR=/tmp/foo prefix=/tmp
make -C lib clean libzstd.pc INCLUDEDIR=/tmp/foo prefix=/tmp
make -C lib clean libzstd.pc     LIBDIR=/tmp/foo prefix=/tmp/foo
make -C lib clean libzstd.pc INCLUDEDIR=/tmp/foo prefix=/tmp/foo

echo # should also succeed
make -C lib clean libzstd.pc prefix=/foo LIBDIR=/foo/bar INCLUDEDIR=/foo/
cat lib/libzstd.pc

mkdir out
cd out
cmake ../build/cmake
make
cat lib/libzstd.pc
```

5 years agoMerge pull request #2078 from nocnokneo/fix-destdir-installs
Felix Handte [Fri, 8 May 2020 20:09:44 +0000 (16:09 -0400)] 
Merge pull request #2078 from nocnokneo/fix-destdir-installs

CMake: Fix DESTDIR installs and the Package Config file

5 years agoMerge branch 'dev' into clevel_doc
Yann Collet [Fri, 8 May 2020 18:59:45 +0000 (11:59 -0700)] 
Merge branch 'dev' into clevel_doc

5 years agoMerge pull request #2118 from Artoria2e5/patch-1
Nick Terrell [Fri, 8 May 2020 18:13:44 +0000 (11:13 -0700)] 
Merge pull request #2118 from Artoria2e5/patch-1

programs/README.md: update help text

5 years agoupdated documentation regarding ZSTD_CLEVEL
Yann Collet [Fri, 8 May 2020 17:51:37 +0000 (10:51 -0700)] 
updated documentation regarding ZSTD_CLEVEL

make it clearer that it's useful for `tar --zstd`.

5 years agoMerge pull request #2119 from bimbashrestha/mingw
Bimba Shrestha [Fri, 8 May 2020 15:54:06 +0000 (10:54 -0500)] 
Merge pull request #2119 from bimbashrestha/mingw

[build] Adding $TARGET_SYSTEM for cross-compilation Fedora fix

5 years agoadding 2119/head
Bimba Shrestha [Fri, 8 May 2020 03:07:40 +0000 (22:07 -0500)] 
adding

5 years agoMerge pull request #2114 from facebook/verbose
Yann Collet [Thu, 7 May 2020 20:16:33 +0000 (13:16 -0700)] 
Merge pull request #2114 from facebook/verbose

support for verbose make

5 years agoMerge pull request #2112 from facebook/cfast
Yann Collet [Thu, 7 May 2020 20:13:34 +0000 (13:13 -0700)] 
Merge pull request #2112 from facebook/cfast

small speed improvement for strategy fast

5 years agoChange the modification of ZSTD_wildcopy()
caoyzh [Tue, 14 Apr 2020 13:33:25 +0000 (21:33 +0800)] 
Change the modification of ZSTD_wildcopy()

5 years agorevert ZSTD_reduceTable_internal()'s modificatiion
caoyzh [Tue, 14 Apr 2020 13:29:43 +0000 (21:29 +0800)] 
revert ZSTD_reduceTable_internal()'s modificatiion

5 years agoModify indent of comments
caoyzh [Thu, 2 Apr 2020 15:08:13 +0000 (23:08 +0800)] 
Modify indent of comments

5 years agoChange "arm_neon.h" to system include <arm_neon.h>
caoyzh [Fri, 27 Mar 2020 16:11:50 +0000 (00:11 +0800)] 
Change "arm_neon.h" to system include <arm_neon.h>

5 years agoOptimize compression by using neon function.
caoyzh [Mon, 16 Mar 2020 03:07:31 +0000 (11:07 +0800)] 
Optimize compression by using neon function.

5 years agoprograms/README.md: update help text 2118/head
Mingye Wang [Thu, 7 May 2020 18:52:18 +0000 (02:52 +0800)] 
programs/README.md: update help text

I noticed that the help is outdated as there is no mention of --adapt. Y'all should probably put "update help text" into your release checklist.

5 years ago[zdict] Stabilize ZDICT_finalizeDictionary()
Nick Terrell [Thu, 7 May 2020 01:51:14 +0000 (18:51 -0700)] 
[zdict] Stabilize ZDICT_finalizeDictionary()

5 years agoMerge pull request #2115 from bimbashrestha/docs
Bimba Shrestha [Thu, 7 May 2020 17:03:33 +0000 (12:03 -0500)] 
Merge pull request #2115 from bimbashrestha/docs

[doc] Adding static analysis section and note

5 years agoadding some static-anslysis docs 2115/head
Bimba Shrestha [Thu, 7 May 2020 15:38:06 +0000 (10:38 -0500)] 
adding some static-anslysis docs

5 years agosupport for verbose make 2114/head
Yann Collet [Thu, 7 May 2020 14:59:56 +0000 (07:59 -0700)] 
support for verbose make

A commonly accepted makefile idiom is V=1 or VERBOSE=1
to request the printing of all commands.

This is not "default" though, and must be manually added.

Example :
Before :
```
make libzstd
compiling dynamic library 1.4.5
creating versioned links

make libzstd V=1
compiling dynamic library 1.4.5
creating versioned links
```

After :
```
make libzstd
compiling dynamic library 1.4.5
creating versioned links

make libzstd V=1
compiling dynamic library 1.4.5
cc -DXXH_NAMESPACE=ZSTD_ -DZSTD_LEGACY_SUPPORT=5 -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow -Wstrict-aliasing=1 -Wswitch-enum -Wdeclaration-after-statement -Wstrict-prototypes -Wundef -Wpointer-arith -Wvla -Wformat=2 -Winit-self -Wfloat-equal -Wwrite-strings -Wredundant-decls -Wmissing-prototypes -Wc++-compat  -O3 common/debug.c common/entropy_common.c common/error_private.c common/fse_decompress.c common/pool.c common/threading.c common/xxhash.c common/zstd_common.c compress/fse_compress.c compress/hist.c compress/huf_compress.c compress/zstd_compress.c compress/zstd_compress_literals.c compress/zstd_compress_sequences.c compress/zstd_compress_superblock.c compress/zstd_double_fast.c compress/zstd_fast.c compress/zstd_lazy.c compress/zstd_ldm.c compress/zstd_opt.c compress/zstdmt_compress.c decompress/huf_decompress.c decompress/zstd_ddict.c decompress/zstd_decompress.c decompress/zstd_decompress_block.c deprecated/zbuff_common.c deprecated/zbuff_compress.c deprecated/zbuff_decompress.c dictBuilder/cover.c dictBuilder/divsufsort.c dictBuilder/fastcover.c dictBuilder/zdict.c legacy/zstd_v05.c legacy/zstd_v06.c legacy/zstd_v07.c -shared -fPIC -fvisibility=hidden -Wl,-soname=libzstd.so.1 -o libzstd.so.1.4.5
creating versioned links
ln -sf libzstd.so.1.4.5 libzstd.so.1
ln -sf libzstd.so.1.4.5 libzstd.so
```

5 years agosmall speed improvement for strategy fast 2112/head
Yann Collet [Thu, 7 May 2020 12:01:27 +0000 (05:01 -0700)] 
small speed improvement for strategy fast

gcc 9.3.0 :
kennedy : 459 -> 466
silesia : 360 -> 365
enwik8  : 267 -> 269

clang 10.0.0 :
kennedy : 436 -> 441
silesia : 364 -> 366
enwik8  : 271 -> 272

5 years ago[lib] Fix NULL pointer dereference
Nick Terrell [Fri, 1 May 2020 23:35:35 +0000 (16:35 -0700)] 
[lib] Fix NULL pointer dereference

When the output buffer is `NULL` with size 0, but the frame content size
is non-zero, we will write to the NULL pointer because our bounds check
underflowed.

This was exposed by a recent PR that allowed an empty frame into the
single-pass shortcut in streaming mode.

* Fix the bug.
* Fix another NULL dereference in zstd-v1.
* Overflow checks in 32-bit mode.
* Add a dedicated test.
* Expose the bug in the dedicated simple_decompress fuzzer.
* Switch all mallocs in fuzzers to return NULL for size=0.
* Fix a new timeout in a fuzzer.

Neither clang nor gcc show a decompression speed regression on x86-64.
On x86-32 clang is slightly positive and gcc loses 2.5% of speed.

Credit to OSS-Fuzz.

5 years agoMerge pull request #2103 from felixhandte/relative-includes
Felix Handte [Wed, 6 May 2020 16:42:23 +0000 (09:42 -0700)] 
Merge pull request #2103 from felixhandte/relative-includes

Migrate Includes to Relative Paths

5 years agoMerge pull request #2095 from bimbashrestha/grep
Bimba Shrestha [Wed, 6 May 2020 16:18:15 +0000 (11:18 -0500)] 
Merge pull request #2095 from bimbashrestha/grep

[bugs] zstdgrep/grep inconsistencies

5 years agoMerge pull request #2109 from facebook/fasterCygwin
Yann Collet [Wed, 6 May 2020 03:50:40 +0000 (20:50 -0700)] 
Merge pull request #2109 from facebook/fasterCygwin

faster cygwin test

5 years agoadding tests back 2095/head
Bimba Shrestha [Tue, 5 May 2020 23:51:06 +0000 (16:51 -0700)] 
adding tests back

5 years agoMerge pull request #2108 from facebook/hufc_wconv
Yann Collet [Tue, 5 May 2020 23:38:17 +0000 (16:38 -0700)] 
Merge pull request #2108 from facebook/hufc_wconv

some more conversion fixes â€¦

5 years agofaster cygwin test 2109/head
Yann Collet [Tue, 5 May 2020 21:08:35 +0000 (14:08 -0700)] 
faster cygwin test

The cygwin test on Appveyor is way too long (>30 mn).
The main issue is the very long zstreamtest, because no time out has been programmed.
Ensures that both fuzzer and zstreamtest receive a 30sec slot.
Should reduce cygwin tests duration by -30mn.

5 years agoYay It Works, Clean Up Logging A Bit 2103/head
W. Felix Handte [Tue, 5 May 2020 19:25:18 +0000 (15:25 -0400)] 
Yay It Works, Clean Up Logging A Bit

5 years agoFix Sed Regex Escaping for Extended Regex Rules......
W. Felix Handte [Tue, 5 May 2020 18:54:04 +0000 (14:54 -0400)] 
Fix Sed Regex Escaping for Extended Regex Rules......

5 years agoUhhh It's Still Failing, Let's Try Printing Debug Info?
W. Felix Handte [Tue, 5 May 2020 17:58:22 +0000 (13:58 -0400)] 
Uhhh It's Still Failing, Let's Try Printing Debug Info?

5 years agoMerge branch 'dev' into hufc_wconv 2108/head
Yann Collet [Tue, 5 May 2020 17:23:00 +0000 (10:23 -0700)] 
Merge branch 'dev' into hufc_wconv

5 years agoFix Fallbacks to Work on FreeBSD
W. Felix Handte [Tue, 5 May 2020 17:18:45 +0000 (13:18 -0400)] 
Fix Fallbacks to Work on FreeBSD

5 years agosome more conversion warnings
Yann Collet [Tue, 5 May 2020 17:16:59 +0000 (10:16 -0700)] 
some more conversion warnings

hunting down some static analyzer warnings

5 years agoadding help text
Bimba Shrestha [Tue, 5 May 2020 17:03:57 +0000 (10:03 -0700)] 
adding help text

5 years agofixing inconsistencies
Bimba Shrestha [Tue, 5 May 2020 16:51:44 +0000 (09:51 -0700)] 
fixing inconsistencies

5 years agofix minor conversion warnings (#2106)
Yann Collet [Tue, 5 May 2020 16:08:05 +0000 (09:08 -0700)] 
fix minor conversion warnings (#2106)

5 years agoAdd Fallback When realpath Doesn't Support --relative-to
W. Felix Handte [Mon, 4 May 2020 22:59:47 +0000 (18:59 -0400)] 
Add Fallback When realpath Doesn't Support --relative-to

5 years agoMark zstddeclib-in.c Not Executable
W. Felix Handte [Mon, 4 May 2020 22:59:26 +0000 (18:59 -0400)] 
Mark zstddeclib-in.c Not Executable

5 years agofix minor conversion warnings 2106/head
Yann Collet [Mon, 4 May 2020 21:43:09 +0000 (14:43 -0700)] 
fix minor conversion warnings

5 years agoMerge pull request #1976 from felixhandte/minimal-lib-target
Felix Handte [Mon, 4 May 2020 19:42:56 +0000 (12:42 -0700)] 
Merge pull request #1976 from felixhandte/minimal-lib-target

Add Minification Variable to `lib/Makefile`

5 years agoTry to Fix Single File Library Combiner Script to Handle Relative Includes
W. Felix Handte [Fri, 1 May 2020 21:56:51 +0000 (17:56 -0400)] 
Try to Fix Single File Library Combiner Script to Handle Relative Includes

5 years agoRemove Useless Assignment in Makefile
W. Felix Handte [Fri, 1 May 2020 20:33:51 +0000 (16:33 -0400)] 
Remove Useless Assignment in Makefile

5 years agoAlso Move programs/ Directory to Relative Includes
W. Felix Handte [Fri, 1 May 2020 20:20:40 +0000 (16:20 -0400)] 
Also Move programs/ Directory to Relative Includes

5 years agoRewrite Include Paths to be Relative
W. Felix Handte [Fri, 1 May 2020 20:07:57 +0000 (16:07 -0400)] 
Rewrite Include Paths to be Relative

Addresses #1998.

5 years ago[bench] Extending largeNbDicts to compression (#2089)
Bimba Shrestha [Mon, 4 May 2020 17:42:22 +0000 (12:42 -0500)] 
[bench] Extending largeNbDicts to compression  (#2089)

* adding cdict_collection_t

* adding shuffleCDictionaries()

* adding compressInstructions

* adding compress()

* integrating compression into bench()

* copy paste error fix

* static analyzer uninit value complaint fix

* changing to control

* removing assert

* changing to control

* moving memcpy to seperate function

* fixing static analyzer complaint

* another hacky solution attempt

* Copying createbuffer logic

5 years agoMerge pull request #2099 from felixhandte/compile-under-pedantic
Felix Handte [Mon, 4 May 2020 17:07:13 +0000 (10:07 -0700)] 
Merge pull request #2099 from felixhandte/compile-under-pedantic

Compile Under `-pedantic -Werror` and `-std=c90`

5 years agoTest Flag in Travis CI 1976/head
W. Felix Handte [Mon, 4 May 2020 15:22:07 +0000 (11:22 -0400)] 
Test Flag in Travis CI

5 years agoAdd Space-Optimized Helper Variable to Lib Makefile
W. Felix Handte [Mon, 27 Jan 2020 22:14:08 +0000 (17:14 -0500)] 
Add Space-Optimized Helper Variable to Lib Makefile

This diff reorganizes the `lib/Makefile` to extract various settings that a
user would normally invoke together (supposing that they were aware of them)
if they were trying to build the smallest `libzstd` possible. It collects
these settings under a master setting `ZSTD_LIB_MIN_SIZE`.

Also document this new option.

5 years agoMerge pull request #1984 from MeghnaM/1636-Reduce-stack-usage-of-HUF_sort
Felix Handte [Mon, 4 May 2020 15:15:31 +0000 (08:15 -0700)] 
Merge pull request #1984 from MeghnaM/1636-Reduce-stack-usage-of-HUF_sort

Reduce stack usage of HUF_sort()

5 years agoTry to Fix MSVC Error 2099/head
W. Felix Handte [Fri, 1 May 2020 20:48:21 +0000 (16:48 -0400)] 
Try to Fix MSVC Error

It's complaining about the `memcpy`s, saying:

"warning C4090: 'function': different 'const' qualifiers"

Let's try explicitly casting to the argument types...

5 years agoDo a `-pedantic` Build in CircleCI
W. Felix Handte [Fri, 1 May 2020 16:26:20 +0000 (12:26 -0400)] 
Do a `-pedantic` Build in CircleCI

5 years agoFix Up Some Pointer Handling in Tests
W. Felix Handte [Fri, 1 May 2020 16:24:51 +0000 (12:24 -0400)] 
Fix Up Some Pointer Handling in Tests

5 years agoSwitch Helper Declaration to Not Force Inline
W. Felix Handte [Thu, 30 Apr 2020 21:43:20 +0000 (17:43 -0400)] 
Switch Helper Declaration to Not Force Inline

It was causing build issues in ANSI mode.

5 years agoPurge C++-Style Comments (`// ...`), Make Compilation Succeed Under C90
W. Felix Handte [Thu, 30 Apr 2020 21:33:59 +0000 (17:33 -0400)] 
Purge C++-Style Comments (`// ...`), Make Compilation Succeed Under C90

5 years agoAvoid inline Keyword in C90
W. Felix Handte [Thu, 30 Apr 2020 21:20:40 +0000 (17:20 -0400)] 
Avoid inline Keyword in C90

Previously we would use it for all gcc-like compilations, even when a
restrictive mode that disallowed it had been selected.

5 years agoDon't Evaluate Arguments to Dummy Function
W. Felix Handte [Thu, 30 Apr 2020 21:07:49 +0000 (17:07 -0400)] 
Don't Evaluate Arguments to Dummy Function

5 years agoAllow Empty Format Strings in Error Macro Invocations
W. Felix Handte [Thu, 30 Apr 2020 17:09:14 +0000 (13:09 -0400)] 
Allow Empty Format Strings in Error Macro Invocations

`-Wall` implies `-Wformat-zero-length`, which will cause compilation to fail
under `-Werror` when an empty string is passed as the format string to a
`printf`-family function. This commit moves us back to prefixing the provided
format string, which successfully avoids that warning.

However, this removes the failure mode where that `RAWLOG` invocation would
fail to compile when no format string was provided at all (which was desirable
to avoid having code that would successfully compile normally but fail under
`-pedantic`, which *does* require that a non-zero number of args are provided).

So this commit also introduces a function which does nothing at all, but will
fail to compile if not provided with at least one argument, which is a string.
This successfully links the compilability of pedantic and non-pedantic builds.

5 years agoMake All Invocations Start With Literal Format String
W. Felix Handte [Thu, 30 Apr 2020 17:08:36 +0000 (13:08 -0400)] 
Make All Invocations Start With Literal Format String

5 years agoMake Error Macro Invocation Without Info String Fail to Compile
W. Felix Handte [Thu, 30 Apr 2020 16:26:29 +0000 (12:26 -0400)] 
Make Error Macro Invocation Without Info String Fail to Compile

Even without `-pedantic`, these macros will now fail to compile unless you
provide an info string argument. This will prevent us from regressing.

5 years agoAdd (Possibly Empty) Info Strings to All Variadic Error Handling Macro Invocations
W. Felix Handte [Thu, 30 Apr 2020 16:24:56 +0000 (12:24 -0400)] 
Add (Possibly Empty) Info Strings to All Variadic Error Handling Macro Invocations

5 years agoFix superblock mode (#2100)
Nick Terrell [Fri, 1 May 2020 23:11:47 +0000 (16:11 -0700)] 
Fix superblock mode (#2100)

Fixes:

Enable RLE blocks for superblock mode
Fix the limitation that the literals block must shrink. Instead, when we're within 200 bytes of the next header byte size, we will just use the next one up. That way we should (almost?) always have space for the table.
Remove the limitation that the first sub-block MUST have compressed literals and be compressed. Now one sub-block MUST be compressed (otherwise we fall back to raw block which is okay, since that is streamable). If no block has compressed literals that is okay, we will fix up the next Huffman table.
Handle the case where the last sub-block is uncompressed (maybe it is very small). Before it would skip superblock in this case, now we allow the last sub-block to be uncompressed. To do this we need to regenerate the correct repcodes.
Respect disableLiteralsCompression in superblock mode
Fix superblock mode to handle a block consisting of only compressed literals
Fix a off by 1 error in superblock mode that disabled it whenever there were last literals
Fix superblock mode with long literals/matches (> 0xFFFF)
Allow superblock mode to repeat Huffman tables
Respect ZSTD_minGain().
Tests:

Simple check for the condition in #2096.
When the simple_round_trip fuzzer enables superblock mode, it checks that the compressed size isn't expanded too much.
Remaining limitations:

O(targetCBlockSize^2) because we recompute statistics every sequence
Unable to split literals of length > targetCBlockSize into multiple sequences
Refuses to generate sub-blocks that don't shrink the compressed data, so we could end up with large sub-blocks. We should emit those sections as uncompressed blocks instead.
...
Fixes #2096

5 years agoFix broken CI; make changes in response to the comments 1984/head
Meghna Malhotra [Wed, 1 Apr 2020 05:46:49 +0000 (22:46 -0700)] 
Fix broken CI; make changes in response to the comments

5 years agoRemove magic constant and made other changes addressing the comments
Meghna Malhotra [Thu, 27 Feb 2020 16:32:44 +0000 (22:02 +0530)] 
Remove magic constant and made other changes addressing the comments

5 years agoFixed tests to use correct workspace size
Meghna Malhotra [Sun, 2 Feb 2020 02:26:14 +0000 (18:26 -0800)] 
Fixed tests to use correct workspace size

5 years agoWIP: Still getting an error
Meghna Malhotra [Sat, 1 Feb 2020 23:34:51 +0000 (15:34 -0800)] 
WIP: Still getting an error

5 years agoWIP: Increased wksp size, but it's segfaulting
Meghna Malhotra [Sat, 1 Feb 2020 20:41:05 +0000 (12:41 -0800)] 
WIP: Increased wksp size, but it's segfaulting

5 years agoMove rank table into HUF_buildCTable_wksp()
Meghna Malhotra [Sat, 1 Feb 2020 19:56:31 +0000 (11:56 -0800)] 
Move rank table into HUF_buildCTable_wksp()

5 years agoMerge pull request #2101 from bimbashrestha/meson
Bimba Shrestha [Fri, 1 May 2020 17:52:37 +0000 (12:52 -0500)] 
Merge pull request #2101 from bimbashrestha/meson

[build] fix meson build issue

5 years agomeson msvc build fix 2101/head
Bimba Shrestha [Fri, 1 May 2020 14:04:09 +0000 (09:04 -0500)] 
meson msvc build fix

5 years agoMerge pull request #2097 from facebook/underlink
Yann Collet [Thu, 30 Apr 2020 17:16:24 +0000 (10:16 -0700)] 
Merge pull request #2097 from facebook/underlink

Fix underlinked libzstd

5 years agofixed zstd-nolegacy target 2097/head
Yann Collet [Wed, 29 Apr 2020 18:56:21 +0000 (11:56 -0700)] 
fixed zstd-nolegacy target

when compiled as part of allVariants

(though I'm unsure why it was working before ...)

5 years agoadded test linking user program to multi-threaded libzstd
Yann Collet [Wed, 29 Apr 2020 04:18:29 +0000 (21:18 -0700)] 
added test linking user program to multi-threaded libzstd

5 years agogeneralized pattern rules
Yann Collet [Wed, 29 Apr 2020 01:43:55 +0000 (18:43 -0700)] 
generalized pattern rules

5 years agofix libzstd-mt underlinking issue
Yann Collet [Wed, 29 Apr 2020 01:29:20 +0000 (18:29 -0700)] 
fix libzstd-mt underlinking issue

fix #2045
When compiling `libzstd` in multithreading mode,
the `libzstd-mt` recipe would not include `-pthread`,
resulting in an underlinked dynamic library.

Added a test on Travis to check that the library is fully linked.

This makes it possible, in some future release,
to build a multi-threaded `libzstd` dynamic library by default
as it would no longer impact the build script of user programs.

5 years agoMerge pull request #2094 from terrelln/stable-dst
Nick Terrell [Wed, 29 Apr 2020 00:53:24 +0000 (17:53 -0700)] 
Merge pull request #2094 from terrelln/stable-dst

[lib] Add ZSTD_d_stableOutBuffer + fix single-pass mode for empty frames

5 years agonew tests created new artifacts
Yann Collet [Tue, 28 Apr 2020 22:58:22 +0000 (15:58 -0700)] 
new tests created new artifacts

they were not properly ignored

5 years agoAdd extra warnings about not modifying the ZSTD_outBuffer 2094/head
Nick Terrell [Tue, 28 Apr 2020 19:07:42 +0000 (12:07 -0700)] 
Add extra warnings about not modifying the ZSTD_outBuffer

5 years agoMerge pull request #2048 from nocnokneo/ctest-support
Nick Terrell [Tue, 28 Apr 2020 18:01:13 +0000 (11:01 -0700)] 
Merge pull request #2048 from nocnokneo/ctest-support

Add CTest support

5 years ago[fuzz] Fuzz test ZSTD_d_stableOutBuffer
Nick Terrell [Tue, 28 Apr 2020 01:25:47 +0000 (18:25 -0700)] 
[fuzz] Fuzz test ZSTD_d_stableOutBuffer

5 years agoAdd some comments
Nick Terrell [Tue, 28 Apr 2020 01:25:30 +0000 (18:25 -0700)] 
Add some comments

5 years ago[lib] Fix single-pass mode for empty frames
Nick Terrell [Tue, 28 Apr 2020 01:10:45 +0000 (18:10 -0700)] 
[lib] Fix single-pass mode for empty frames

5 years ago[lib] Add ZSTD_d_stableOutBuffer
Nick Terrell [Tue, 28 Apr 2020 00:42:03 +0000 (17:42 -0700)] 
[lib] Add ZSTD_d_stableOutBuffer

5 years ago[zstd] Fix typo in ZSTD_dParameter
Nick Terrell [Mon, 27 Apr 2020 19:12:28 +0000 (12:12 -0700)] 
[zstd] Fix typo in ZSTD_dParameter

5 years agoMerge pull request #2088 from bimbashrestha/bug
Bimba Shrestha [Thu, 23 Apr 2020 19:16:56 +0000 (14:16 -0500)] 
Merge pull request #2088 from bimbashrestha/bug

[bug] Making compressStream2 fail when passing rawContent but claiming fullDict