]> git.ipfire.org Git - thirdparty/zstd.git/log
thirdparty/zstd.git
3 years agoConvert Outer Control Structure to Loop 2774/head
W. Felix Handte [Mon, 11 Oct 2021 19:57:29 +0000 (15:57 -0400)] 
Convert Outer Control Structure to Loop

3 years agoStyle: Add Comments to Variables and Move a Couple into the Loop
W. Felix Handte [Tue, 5 Oct 2021 18:53:45 +0000 (14:53 -0400)] 
Style: Add Comments to Variables and Move a Couple into the Loop

3 years agoFix Flaky Test
W. Felix Handte [Mon, 13 Sep 2021 20:35:58 +0000 (16:35 -0400)] 
Fix Flaky Test

This test depended on `_extDict` and `_noDict` compressing identically, which
is not a guarantee we make, AFAIK.

3 years agoUpdate results.csv
W. Felix Handte [Thu, 9 Sep 2021 21:17:46 +0000 (17:17 -0400)] 
Update results.csv

3 years agoSimplify DMS Implementation by Removing noDict Support
W. Felix Handte [Thu, 9 Sep 2021 21:01:31 +0000 (17:01 -0400)] 
Simplify DMS Implementation by Removing noDict Support

3 years agoFall Back in _extDict to New _noDict Rather than Old Merged Impl
W. Felix Handte [Thu, 9 Sep 2021 20:42:13 +0000 (16:42 -0400)] 
Fall Back in _extDict to New _noDict Rather than Old Merged Impl

3 years agoNit: Rename Function
W. Felix Handte [Thu, 9 Sep 2021 20:39:29 +0000 (16:39 -0400)] 
Nit: Rename Function

3 years agoNit: Unnest Blocks that Don't Declare Anything
W. Felix Handte [Wed, 8 Sep 2021 20:47:26 +0000 (16:47 -0400)] 
Nit: Unnest Blocks that Don't Declare Anything

3 years agoSearch One Last Position
W. Felix Handte [Wed, 8 Sep 2021 20:41:43 +0000 (16:41 -0400)] 
Search One Last Position

3 years agoAdvance Long Index Lookup (+0.5% Speed)
W. Felix Handte [Wed, 8 Sep 2021 20:15:01 +0000 (16:15 -0400)] 
Advance Long Index Lookup (+0.5% Speed)

This lookup can be advanced to before the short match check because either way
we will use it (in the next loop iter or in `_search_next_long`).

3 years agoWrite Back Advanced Hash in Long Matches as Well (+Ratio)
W. Felix Handte [Wed, 8 Sep 2021 16:45:42 +0000 (12:45 -0400)] 
Write Back Advanced Hash in Long Matches as Well (+Ratio)

Since we're now hashing the position ahead even if we find a long match and
don't search that next position, we can write it back into the hashtable even
in long matches. This seems to cost us no speed, and improves compression
ratio slightly!

3 years agoUse Look-Ahead Hash for Next Long Check after Short Match (+0.5% Speed)
W. Felix Handte [Wed, 8 Sep 2021 16:41:15 +0000 (12:41 -0400)] 
Use Look-Ahead Hash for Next Long Check after Short Match (+0.5% Speed)

This costs a little ratio, unfortunately.

3 years agoHash Long One Position Ahead (+2.5% Speed)
W. Felix Handte [Thu, 2 Sep 2021 16:25:08 +0000 (12:25 -0400)] 
Hash Long One Position Ahead (+2.5% Speed)

Aside from maybe a latency win in the loop, this means that when we find a
short match, we've already done the hash we need to check the next long match.

3 years agoPull Match Found Stuff Out of the Loop
W. Felix Handte [Thu, 2 Sep 2021 16:15:58 +0000 (12:15 -0400)] 
Pull Match Found Stuff Out of the Loop

3 years agoExtract Working Variables
W. Felix Handte [Thu, 2 Sep 2021 16:03:49 +0000 (12:03 -0400)] 
Extract Working Variables

3 years agoTrack Step Rather than Recalculating (+0.5% Speed)
W. Felix Handte [Wed, 1 Sep 2021 21:50:53 +0000 (17:50 -0400)] 
Track Step Rather than Recalculating (+0.5% Speed)

3 years agoExtract Single-Segment Variant of ZSTD_dfast
W. Felix Handte [Wed, 1 Sep 2021 21:26:19 +0000 (17:26 -0400)] 
Extract Single-Segment Variant of ZSTD_dfast

3 years agoLimit train samples (#2809)
stanjo74 [Tue, 5 Oct 2021 00:47:52 +0000 (17:47 -0700)] 
Limit train samples (#2809)

* Limit training samples size to 2GB

* simplified DISPLAYLEVEL() macro to use global vqriable instead of local.

* refactored training samples loading

* fixed compiler warning

* addressed comments from the pull request

* addressed @terrelln comments

* missed some fixes

* fixed type mismatch

* Fixed bug passing estimated number of samples rather insted of the loaded number of samples.
Changed unit conversion not to use bit-shifts.

* fixed a declaration after code

* fixed type conversion compile errors

* fixed more type castting

* fixed more type mismatching

* changed sizes type to size_t

* move type casting

* more type cast fixes

3 years agoMerge pull request #2747 from Helflym/dev
Yann Collet [Fri, 1 Oct 2021 15:13:39 +0000 (08:13 -0700)] 
Merge pull request #2747 from Helflym/dev

Add AIX support in Makefile

3 years agoMerge pull request #2803 from terrelln/linux-kernel-ci
Nick Terrell [Wed, 29 Sep 2021 16:48:47 +0000 (09:48 -0700)] 
Merge pull request #2803 from terrelln/linux-kernel-ci

[contrib][linux-kernel] Add standard warnings and -Werror to CI

3 years agoMerge pull request #2802 from solbjorn/fix-kernel-wundef
Nick Terrell [Wed, 29 Sep 2021 16:48:17 +0000 (09:48 -0700)] 
Merge pull request #2802 from solbjorn/fix-kernel-wundef

[contrib][linux] Fix -Wundef inside Linux kernel tree

3 years agoMerge pull request #2810 from 3nids/patch-1
Nick Terrell [Wed, 29 Sep 2021 16:47:17 +0000 (09:47 -0700)] 
Merge pull request #2810 from 3nids/patch-1

add missing BUNDLE DESTINATION

3 years agoMerge pull request #2755 from senhuang42/skip_long_matches_lazy
sen [Wed, 29 Sep 2021 16:44:07 +0000 (12:44 -0400)] 
Merge pull request #2755 from senhuang42/skip_long_matches_lazy

Skip most long matches in lazy hash table update

3 years agoadd missing BUNDLE DESTINATION 2810/head
Denis Rouzaud [Wed, 29 Sep 2021 05:09:08 +0000 (07:09 +0200)] 
add missing BUNDLE DESTINATION

fixes build on iOS

3 years agoUpdate regression test 2755/head
Sen Huang [Tue, 28 Sep 2021 15:29:11 +0000 (08:29 -0700)] 
Update regression test

3 years agoPull hot loop into its own function
Sen Huang [Tue, 28 Sep 2021 14:48:56 +0000 (07:48 -0700)] 
Pull hot loop into its own function

3 years agoTry beginning and end of match
Sen Huang [Thu, 23 Sep 2021 14:08:56 +0000 (07:08 -0700)] 
Try beginning and end of match

3 years agoSkip most long matches in lazy hash table update
Sen Huang [Wed, 18 Aug 2021 13:52:17 +0000 (06:52 -0700)] 
Skip most long matches in lazy hash table update

3 years agoMerge pull request #2808 from terrelln/huf-oss-fuzz-fix
Nick Terrell [Mon, 27 Sep 2021 22:00:52 +0000 (15:00 -0700)] 
Merge pull request #2808 from terrelln/huf-oss-fuzz-fix

[huf] Fix OSS-Fuzz assert

3 years agoMerge pull request #2805 from nolange/smaller_code_with_disabled_features
Felix Handte [Mon, 27 Sep 2021 21:43:21 +0000 (17:43 -0400)] 
Merge pull request #2805 from nolange/smaller_code_with_disabled_features

Smaller code with disabled features

3 years ago[huf] Fix OSS-Fuzz assert 2808/head
Nick Terrell [Mon, 27 Sep 2021 20:56:07 +0000 (13:56 -0700)] 
[huf] Fix OSS-Fuzz assert

PR #2784 introduced a bug in the decompressor that caused some valid
inputs to fail to decompress. The bitstream isn't reloaded after the 4X*
loop if the number of elements remaining is small enough, causing us to
read more bits than are available in the bitcontainer.

This was caught by the MSAN fuzzer in OSS-Fuzz because the assembly
implementation isn't used in the MSAN build.

Credit to OSS-Fuzz.

3 years agominor : fix comment
Yann Collet [Sun, 26 Sep 2021 15:44:18 +0000 (08:44 -0700)] 
minor : fix comment

provide correct reasons to include zstd_internal.h

3 years agoadded link to RFC
Yann Collet [Sun, 26 Sep 2021 13:58:10 +0000 (06:58 -0700)] 
added link to RFC

3 years agominor : makes the "stable" property of Zstandard format more prominent
Yann Collet [Sun, 26 Sep 2021 13:48:52 +0000 (06:48 -0700)] 
minor : makes the "stable" property of Zstandard format more prominent

3 years agozstd_decompress: use a helper function for context create 2805/head
Norbert Lange [Sun, 26 Sep 2021 08:59:05 +0000 (10:59 +0200)] 
zstd_decompress: use a helper function for context create

Multiple ZSTD_createDCtx* functions call other (public)
ZSTD_createDCtx* functions, this makes it harder for humans
and compilers to throw out code that is not used.

This farms out the logic into a static function, if a program
only uses a single ZSTD_createDCtx variant, all others can be easily
dropped and the remaining implementation can be specialized.

3 years agodecompress: conditionally remove bmi2 from context
Norbert Lange [Sun, 26 Sep 2021 09:14:35 +0000 (11:14 +0200)] 
decompress: conditionally remove bmi2 from context

Use an helper function, which will just return 0 in case
the feature is disabled.
Allows constant propagation and removal of dead code.

3 years agodecompress: conditionally remove legacy members from context
Norbert Lange [Fri, 24 Sep 2021 23:19:11 +0000 (01:19 +0200)] 
decompress: conditionally remove legacy members from context

Remove the then unneeded variables from the struct,
and all accesses to them.

3 years ago[contrib][linux] Fix -Wundef inside Linux kernel tree 2802/head
Alexander Lobakin [Fri, 24 Sep 2021 19:50:37 +0000 (21:50 +0200)] 
[contrib][linux] Fix -Wundef inside Linux kernel tree

Commit d7ef97a013b5
("[build] Fix oss-fuzz build with the dataflow sanitizer") broke
build inside Linux-kernel after 'import', as it no longer can
conditionally remove ZSTD_MEMORY_SANITIZER definition from
the #if DEF_A || DEF_B block. This emits -Wundef warning which
can be treated as error.
Split this preprocessor condition into two separate conditions
to fix this.

Fixes: d7ef97a013b5 ("[build] Fix oss-fuzz build with the dataflow sanitizer")
Signed-off-by: Alexander Lobakin <alobakin@pm.me>
3 years ago[contrib][linux-kernel] Add standard warnings and -Werror to CI 2803/head
Nick Terrell [Fri, 24 Sep 2021 21:46:45 +0000 (14:46 -0700)] 
[contrib][linux-kernel] Add standard warnings and -Werror to CI

Test the kernel build with the standard warnings enabled so that we
don't miss issues like fixed in PR #2802.

Stacked on top of PR #2802 so CI passes, so it includes the fix. But, I
won't merge until it is merged, so @solbjorn gets the credit for the
fix.

3 years agoMerge pull request #2790 from solbjorn/huf-asm-kernel
Nick Terrell [Fri, 24 Sep 2021 19:42:03 +0000 (12:42 -0700)] 
Merge pull request #2790 from solbjorn/huf-asm-kernel

[contrib][linux] Fix build after introducing ASM HUF implementation

3 years agoMerge pull request #2796 from terrelln/linux-fixes
Nick Terrell [Thu, 23 Sep 2021 23:11:53 +0000 (16:11 -0700)] 
Merge pull request #2796 from terrelln/linux-fixes

[lib] Make lib compatible with `-Wfall-through` excepting legacy

3 years agoMerge pull request #2799 from terrelln/oss-fuzz-build
Nick Terrell [Thu, 23 Sep 2021 22:55:10 +0000 (15:55 -0700)] 
Merge pull request #2799 from terrelln/oss-fuzz-build

[build] Fix oss-fuzz build with the dataflow sanitizer

3 years agoMerge pull request #2798 from abxhr/typo-fix
Nick Terrell [Thu, 23 Sep 2021 20:11:45 +0000 (13:11 -0700)] 
Merge pull request #2798 from abxhr/typo-fix

Fix typo

3 years ago[build] Fix oss-fuzz build with the dataflow sanitizer 2799/head
Nick Terrell [Thu, 23 Sep 2021 18:48:39 +0000 (11:48 -0700)] 
[build] Fix oss-fuzz build with the dataflow sanitizer

The dataflow sanitizer requires all code to be instrumented. We can't
instrument the ASM function, so we have to disable it.

3 years agoMerge pull request #2797 from facebook/btconst
Yann Collet [Thu, 23 Sep 2021 18:37:15 +0000 (11:37 -0700)] 
Merge pull request #2797 from facebook/btconst

minor: constify MatchState* parameter when possible

3 years agoFix typo 2798/head
Abshar Mohammed Aslam [Thu, 23 Sep 2021 17:54:38 +0000 (21:54 +0400)] 
Fix typo

3 years ago[lib] Make lib compatible with `-Wfall-through` excepting legacy 2796/head
Nick Terrell [Thu, 23 Sep 2021 02:56:07 +0000 (19:56 -0700)] 
[lib] Make lib compatible with `-Wfall-through` excepting legacy

Switch to a macro `ZSTD_FALLTHROUGH;` instead of a comment. On supported
compilers this uses an attribute, otherwise it becomes a comment.

This is necessary to be compatible with clang's `-Wfall-through`, and
gcc's `-Wfall-through=2` which don't support comments. Without this the
linux build emits a bunch of warnings.

Also add a test to CI to ensure that we don't regress.

3 years agoconstify MatchState* parameter when possible 2797/head
Yann Collet [Thu, 23 Sep 2021 15:27:44 +0000 (08:27 -0700)] 
constify MatchState* parameter when possible

turns out, it's possible to constify MatchState* parameter
in some parts of the binary tree algorithm,
making it a pure read-only parameter,
as opposed to a mutable state.

This is supposed to be helpful for both maintenance and the compiler.

3 years ago[contrib][linux] Add contrib/linux-kernel/linux to .gitignore 2790/head
Alexander Lobakin [Thu, 23 Sep 2021 14:33:24 +0000 (16:33 +0200)] 
[contrib][linux] Add contrib/linux-kernel/linux to .gitignore

The mentioned path is being created/used by the 'import' rule for
generating source files for Linux kernel.

Signed-off-by: Alexander Lobakin <alobakin@pm.me>
3 years ago[contrib][linux] Add huf_decompress_amd64.o target to Makefile
Alexander Lobakin [Tue, 21 Sep 2021 18:17:34 +0000 (20:17 +0200)] 
[contrib][linux] Add huf_decompress_amd64.o target to Makefile

Commit a5f2c4552803 ("Huffman ASM") added a new ASM source file,
but it wasn't added to the kernel Makefile despite that it received
support for Huffman ASM according to the internal definitions. This
leads to undefined references, as huf_decompress.o now calls those
ASM functions.
Add it to the list of sources when building inside the kernel tree.
Kbuild can handle .S files just fine, so none additional rules
needed.

Fixes: a5f2c4552803 ("Huffman ASM")
Signed-off-by: Alexander Lobakin <alobakin@pm.me>
3 years ago[contrib][linux] Fix build with CONFIG_WERROR
Alexander Lobakin [Tue, 21 Sep 2021 18:06:49 +0000 (20:06 +0200)] 
[contrib][linux] Fix build with CONFIG_WERROR

Linux 5.15 introduces a new Kconfig option, CONFIG_WERROR, which
forces -Werror for the entire kernel.
Current in-kernel ZSTD implementation uses functions deprecated
in 1.5.0, and thus fails on -Wdeprecated-declarations.
Turn this particular error into warning to be able to build the
kernel with CONFIG_WERROR. I'm not disabling them completely to
make sure they'll be visible and [hopefully] fixed sooner or later.

Signed-off-by: Alexander Lobakin <alobakin@pm.me>
3 years agoMerge pull request #2780 from senhuang42/blocksplit_stack_reduce
sen [Thu, 23 Sep 2021 13:48:04 +0000 (09:48 -0400)] 
Merge pull request #2780 from senhuang42/blocksplit_stack_reduce

Reduce stack usage of block splitter

3 years agoMove block splitter from stack to CCtx 2780/head
senhuang42 [Wed, 22 Sep 2021 15:16:46 +0000 (11:16 -0400)] 
Move block splitter from stack to CCtx

3 years agoMerge pull request #2795 from terrelln/linux-fixes
Nick Terrell [Thu, 23 Sep 2021 02:56:53 +0000 (19:56 -0700)] 
Merge pull request #2795 from terrelln/linux-fixes

[contrib][linux] Reduce stack usage by 80 bytes

3 years ago[contrib][linux] Reduce stack usage by 80 bytes 2795/head
Nick Terrell [Thu, 23 Sep 2021 01:13:02 +0000 (18:13 -0700)] 
[contrib][linux] Reduce stack usage by 80 bytes

Instead of calling `ZSTD_compress_advanced()` and
`ZSTD_initCStream_advanced()`, which each take a `ZSTD_parameters` by
value, use the new advanced API.

Stack usage went from 2024 -> 1944.

3 years agoMerge pull request #2794 from terrelln/spdx-license
Nick Terrell [Thu, 23 Sep 2021 00:33:31 +0000 (17:33 -0700)] 
Merge pull request #2794 from terrelln/spdx-license

[contrib][linux] Fix up SPDX license identifiers

3 years agoMerge pull request #2793 from facebook/rdoc
Yann Collet [Thu, 23 Sep 2021 00:07:49 +0000 (17:07 -0700)] 
Merge pull request #2793 from facebook/rdoc

Minor documentation update

3 years ago[contrib][linux] Fix up SPDX license identifiers 2794/head
Nick Terrell [Wed, 22 Sep 2021 22:06:08 +0000 (15:06 -0700)] 
[contrib][linux] Fix up SPDX license identifiers

Correctly identify that we are GPL v2+ or BSD 3 clause, as pointed out
in issue #2663.

3 years agoregenerated zstdless.1 2793/head
Yann Collet [Wed, 22 Sep 2021 21:48:51 +0000 (14:48 -0700)] 
regenerated zstdless.1

3 years agoupdated zstdgrep man page
Yann Collet [Wed, 22 Sep 2021 21:30:59 +0000 (14:30 -0700)] 
updated zstdgrep man page

3 years agoupdate zstdgrep doc
Yann Collet [Wed, 22 Sep 2021 21:30:06 +0000 (14:30 -0700)] 
update zstdgrep doc

to mention ripgrep alternative which transparently supports zstd-compressed files.

3 years agoupdated man pages
Yann Collet [Wed, 22 Sep 2021 21:18:24 +0000 (14:18 -0700)] 
updated man pages

using ronn-ng

3 years agoemphasize usage of -r in documentation
Yann Collet [Wed, 22 Sep 2021 21:00:20 +0000 (14:00 -0700)] 
emphasize usage of -r in documentation

notably as a way to overcome shell expansion limitations,
notably in a scenario of dictionary training.

3 years agoMerge pull request #2779 from senhuang42/fse_fix
sen [Wed, 22 Sep 2021 17:51:21 +0000 (13:51 -0400)] 
Merge pull request #2779 from senhuang42/fse_fix

Fix NCountWriteBound

3 years agoMerge pull request #2788 from senhuang42/param_switch
sen [Wed, 22 Sep 2021 17:27:55 +0000 (13:27 -0400)] 
Merge pull request #2788 from senhuang42/param_switch

Use new paramSwitch enum for row matchfinder and block splitter

3 years agoMerge pull request #2791 from terrelln/huf-asm-fixes
Nick Terrell [Wed, 22 Sep 2021 16:59:02 +0000 (09:59 -0700)] 
Merge pull request #2791 from terrelln/huf-asm-fixes

[huf] Fix compilation when DYNAMIC_BMI2=0 && BMI2 is supported

3 years agoAdd test case for FSE over-write 2779/head
senhuang42 [Wed, 22 Sep 2021 15:27:56 +0000 (11:27 -0400)] 
Add test case for FSE over-write

3 years ago[huf] Fix compilation when DYNAMIC_BMI2=0 && BMI2 is supported 2791/head
Nick Terrell [Tue, 21 Sep 2021 23:36:33 +0000 (16:36 -0700)] 
[huf] Fix compilation when DYNAMIC_BMI2=0 && BMI2 is supported

* Fix compilation issues pointed out in PR #2790.
* Add test cases to GitHub actions that test all combinations of
  `DYNAMIC_BMI2` BMI2 support.

3 years agoUse new paramSwitch enum for LDM 2788/head
senhuang42 [Tue, 21 Sep 2021 15:56:02 +0000 (11:56 -0400)] 
Use new paramSwitch enum for LDM

3 years agoUse new paramSwitch enum for LCM, row matchfinder, and block splitter
senhuang42 [Mon, 20 Sep 2021 13:04:07 +0000 (09:04 -0400)] 
Use new paramSwitch enum for LCM, row matchfinder, and block splitter

3 years agoMerge pull request #2722 from terrelln/huf-asm
Nick Terrell [Tue, 21 Sep 2021 00:32:30 +0000 (17:32 -0700)] 
Merge pull request #2722 from terrelln/huf-asm

Assembly implementation of 4X1 & 4X2 Huffman

3 years agoHuffman ASM 2722/head
Nick Terrell [Fri, 17 Sep 2021 18:43:04 +0000 (11:43 -0700)] 
Huffman ASM

3 years agoMerge pull request #2784 from terrelln/huf-asm-fuzzer
Nick Terrell [Mon, 20 Sep 2021 18:57:27 +0000 (11:57 -0700)] 
Merge pull request #2784 from terrelln/huf-asm-fuzzer

[fuzzer] Add Huffman decompression fuzzer

3 years agoMerge pull request #2787 from animalize/msvc2019
Yann Collet [Mon, 20 Sep 2021 18:14:51 +0000 (11:14 -0700)] 
Merge pull request #2787 from animalize/msvc2019

add msvc2019 to build.generic.cmd

3 years agoadd msvc2019 to build.generic.cmd 2787/head
Ma Lin [Sun, 19 Sep 2021 01:57:06 +0000 (09:57 +0800)] 
add msvc2019 to build.generic.cmd

3 years ago[fuzzer] Add huf_decompress fuzzer 2784/head
Nick Terrell [Fri, 17 Sep 2021 19:58:04 +0000 (12:58 -0700)] 
[fuzzer] Add huf_decompress fuzzer

Add a fuzzer for Huffman decompression. Fix several bugs in Huffman
decompression, mostly related to `op == NULL` and pointer underflow.

3 years agoMerge pull request #2783 from terrelln/huf-asm-makefiles
Nick Terrell [Fri, 17 Sep 2021 21:56:47 +0000 (14:56 -0700)] 
Merge pull request #2783 from terrelln/huf-asm-makefiles

[build] Add support for ASM files in Make + CMake

3 years ago[build] Add support for ASM files in Make + CMake 2783/head
Nick Terrell [Fri, 17 Sep 2021 18:42:08 +0000 (11:42 -0700)] 
[build] Add support for ASM files in Make + CMake

* Extract out common portion of `lib/Makefile` into `lib/libzstd.mk`.
  Most relevantly, the way we find library files.
* Use `lib/libzstd.mk` in the other Makefiles instead of repeating the
  same code.
* Add a test `tests/test-variants.sh` that checks that the builds of
  `make -C programs allVariants` are correct, and run it in Actions.
* Adds support for ASM files in the CMake build.

The Meson build is not updated because it lists every file in zstd,
and supports ASM off the bat, so the Huffman ASM commit will just add
the ASM file to the list.

The Visual Studios build is not updated because I'm not adding ASM
support to Visual Studios yet.

3 years agoMerge pull request #2778 from senhuang42/opt_inlining_revert
sen [Wed, 15 Sep 2021 18:22:10 +0000 (14:22 -0400)] 
Merge pull request #2778 from senhuang42/opt_inlining_revert

Revert opt outlining change

3 years agoFix NCountWriteBound
Sen Huang [Wed, 15 Sep 2021 16:51:42 +0000 (09:51 -0700)] 
Fix NCountWriteBound

3 years agoRevert opt outlining change 2778/head
Sen Huang [Wed, 15 Sep 2021 16:08:41 +0000 (09:08 -0700)] 
Revert opt outlining change

3 years agoMerge pull request #2777 from terrelln/oss-fuzz-fix
Nick Terrell [Tue, 14 Sep 2021 20:20:22 +0000 (13:20 -0700)] 
Merge pull request #2777 from terrelln/oss-fuzz-fix

[rsyncable] Fix test failures

3 years ago[rsyncable] Fix test failures 2777/head
Nick Terrell [Tue, 14 Sep 2021 18:57:26 +0000 (11:57 -0700)] 
[rsyncable] Fix test failures

Test failures showed up on the daily cron job. They didn't show up
in CI because the condition is somewhat rare, and didn't trigger
during the CI tests.

This PR fixes up the logic in `findSynchronizationPoint()` to correctly
handle the edge case. It also un-comments an assert that helps catch the
issue, and verify that rsyncable mode is calculating the correct hash.

After the fix, the test that failed passes:

```
./zstreamtest --newapi -t1 --no-big-tests -s9680
```

3 years agoMerge pull request #2771 from facebook/opt_investigation
Yann Collet [Tue, 14 Sep 2021 17:36:34 +0000 (10:36 -0700)] 
Merge pull request #2771 from facebook/opt_investigation

Improve optimal parser performance on small data

3 years agoMerge pull request #2776 from terrelln/oss-fuzz-fix
Nick Terrell [Tue, 14 Sep 2021 16:37:43 +0000 (09:37 -0700)] 
Merge pull request #2776 from terrelln/oss-fuzz-fix

[rsyncable] Ensure ZSTD_compressBound() is respected

3 years agoMerge branch 'dev' into opt_investigation 2771/head
Yann Collet [Tue, 14 Sep 2021 08:15:51 +0000 (01:15 -0700)] 
Merge branch 'dev' into opt_investigation

3 years agoMerge pull request #2773 from senhuang42/huffman_bugix
sen [Tue, 14 Sep 2021 01:02:42 +0000 (21:02 -0400)] 
Merge pull request #2773 from senhuang42/huffman_bugix

Fix dictionary training huffman segfault and small speed improvement

3 years ago[rsyncable] Ensure ZSTD_compressBound() is respected 2776/head
Nick Terrell [Mon, 13 Sep 2021 23:59:20 +0000 (16:59 -0700)] 
[rsyncable] Ensure ZSTD_compressBound() is respected

In degenerate cases `--rsyncable` could create very small blocks (1
byte). This causes the compressed output to be larger than
`ZSTD_compressBound()`. Fix the issue by ensuring that rsyncable mode
never outputs blocks smaller than 128 KB.

The minimum job size is 512 KB, so we shouldn't lose many
synchronization points from skipping any that cause blocks smaller than
128 KB. And even if we do, that is fine, because we'll find the next
one.

This fixes the `raw_dictionary_round_trip` oss-fuzz assert.

Credit to OSS-Fuzz

3 years agoUpdate regression test 2773/head
Sen Huang [Thu, 9 Sep 2021 16:02:21 +0000 (09:02 -0700)] 
Update regression test

3 years agoAdd a dictionary training large corpus test
Sen Huang [Thu, 9 Sep 2021 15:55:43 +0000 (08:55 -0700)] 
Add a dictionary training large corpus test

3 years agoUse 32 buckets for log2 bucketing in huffman sort
Sen Huang [Thu, 9 Sep 2021 15:28:12 +0000 (08:28 -0700)] 
Use 32 buckets for log2 bucketing in huffman sort

3 years agoupdated regression tests
Yann Collet [Sun, 12 Sep 2021 17:22:35 +0000 (10:22 -0700)] 
updated regression tests

3 years agoMerge branch 'dev' into opt_investigation
Yann Collet [Sun, 12 Sep 2021 08:42:49 +0000 (01:42 -0700)] 
Merge branch 'dev' into opt_investigation

3 years agofix automated_benchmarking
Yann Collet [Sun, 12 Sep 2021 08:36:18 +0000 (01:36 -0700)] 
fix automated_benchmarking

make it able to process text output sent into either stdout or stderr

3 years agoMerge pull request #2775 from eli-schwartz/meson
Yann Collet [Fri, 10 Sep 2021 12:47:52 +0000 (05:47 -0700)] 
Merge pull request #2775 from eli-schwartz/meson

meson: fix type error for integer option

3 years agomeson: fix type error for integer option 2775/head
Eli Schwartz [Mon, 6 Sep 2021 20:04:48 +0000 (16:04 -0400)] 
meson: fix type error for integer option

meson forgave using the wrong type, but this isn't guaranteed. muon
simply failed.

3 years agoMerge pull request #2749 from felixhandte/zstd-fast-pipelined
Felix Handte [Thu, 9 Sep 2021 21:05:30 +0000 (17:05 -0400)] 
Merge pull request #2749 from felixhandte/zstd-fast-pipelined

Pipelined Implementation of ZSTD_fast (~+5% Speed)

3 years agomake automated-benchmarking faster
Yann Collet [Wed, 8 Sep 2021 22:12:28 +0000 (15:12 -0700)] 
make automated-benchmarking faster

by employing parallel compilation of object files.

3 years agouse ZSTD_memcpy() for better portability
Yann Collet [Wed, 8 Sep 2021 21:45:53 +0000 (14:45 -0700)] 
use ZSTD_memcpy() for better portability

notably within kernel space

3 years agoupdate regression tests
Yann Collet [Wed, 8 Sep 2021 21:37:42 +0000 (14:37 -0700)] 
update regression tests