]> git.ipfire.org Git - thirdparty/zstd.git/log
thirdparty/zstd.git
17 months ago[Zstd] Less verbose log for patch mode. 3899/head
sergeyandreenko [Tue, 6 Feb 2024 20:07:11 +0000 (12:07 -0800)] 
[Zstd] Less verbose log for patch mode.

17 months agoMerge pull request #3895 from facebook/fix_3793
Yann Collet [Tue, 6 Feb 2024 04:12:24 +0000 (20:12 -0800)] 
Merge pull request #3895 from facebook/fix_3793

Improve compression of Arrays of Integers (High compression mode)

17 months agoadded or updated code comments 3895/head
Yann Collet [Tue, 6 Feb 2024 02:32:25 +0000 (18:32 -0800)] 
added or updated code comments

as suggested by @terrelln,
to make the code of the optimal parser a bit more understandable.

17 months agoupdate compression results for regression tests
Yann Collet [Mon, 5 Feb 2024 09:27:22 +0000 (01:27 -0800)] 
update compression results for regression tests

17 months agofix msan warnings
Yann Collet [Mon, 5 Feb 2024 09:21:06 +0000 (01:21 -0800)] 
fix msan warnings

17 months agofix uasan dictionary_stream_round_trip fuzz test
Yann Collet [Mon, 5 Feb 2024 08:36:10 +0000 (00:36 -0800)] 
fix uasan dictionary_stream_round_trip fuzz test

17 months agoMerge pull request #3897 from facebook/dependabot/github_actions/microsoft/setup...
Yann Collet [Mon, 5 Feb 2024 07:49:56 +0000 (23:49 -0800)] 
Merge pull request #3897 from facebook/dependabot/github_actions/microsoft/setup-msbuild-2.0.0

Bump microsoft/setup-msbuild from 1.3.2 to 2.0.0

17 months agofix msbuild action version number 3897/head
Yann Collet [Mon, 5 Feb 2024 06:45:18 +0000 (22:45 -0800)] 
fix msbuild action version number

17 months agoBump microsoft/setup-msbuild from 1.3.2 to 2.0.0
dependabot[bot] [Mon, 5 Feb 2024 05:43:28 +0000 (05:43 +0000)] 
Bump microsoft/setup-msbuild from 1.3.2 to 2.0.0

Bumps [microsoft/setup-msbuild](https://github.com/microsoft/setup-msbuild) from 1.3.2 to 2.0.0.
- [Release notes](https://github.com/microsoft/setup-msbuild/releases)
- [Changelog](https://github.com/microsoft/setup-msbuild/blob/main/building-release.md)
- [Commits](https://github.com/microsoft/setup-msbuild/compare/031090342aeefe171e49f3820f3b52110c66e402...6fb02220983dee41ce7ae257b6f4d8f9bf5ed4ce)

---
updated-dependencies:
- dependency-name: microsoft/setup-msbuild
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
17 months agouse ZSTD_memcpy()
Yann Collet [Sun, 4 Feb 2024 03:57:38 +0000 (19:57 -0800)] 
use ZSTD_memcpy()

which can be redirected in Linux kernel mode

17 months agoremoved trace control
Yann Collet [Sun, 4 Feb 2024 03:32:59 +0000 (19:32 -0800)] 
removed trace control

17 months agofixed wrong assert
Yann Collet [Sun, 4 Feb 2024 03:31:53 +0000 (19:31 -0800)] 
fixed wrong assert

by introducing ZSTD_OPT_SIZE

17 months agoupdate compression results
Yann Collet [Sun, 4 Feb 2024 01:52:50 +0000 (17:52 -0800)] 
update compression results

good news: there are only improvements

17 months agofixed wrong assert
Yann Collet [Sun, 4 Feb 2024 01:48:29 +0000 (17:48 -0800)] 
fixed wrong assert

17 months agominor optimization, mostly for clarity
Yann Collet [Sun, 4 Feb 2024 01:26:47 +0000 (17:26 -0800)] 
minor optimization, mostly for clarity

17 months agofinally, a version that generalizes well
Yann Collet [Sat, 3 Feb 2024 22:26:18 +0000 (14:26 -0800)] 
finally, a version that generalizes well

While it's not always strictly a win,
it's a win for files that see a noticeably compression ratio increase,
while it's a very small noise for other files.

Downside is, this patch is less efficient for 32-bit arrays of integer
than the previous patch which was introducing losses for other files,
but it's still a net improvement on this scenario.

18 months agoMerge pull request #3893 from felixhandte/gh-actions-cet-test-update-dep
Felix Handte [Thu, 1 Feb 2024 19:49:37 +0000 (14:49 -0500)] 
Merge pull request #3893 from felixhandte/gh-actions-cet-test-update-dep

Update Dependency in Intel CET Test; Re-Enable Test

18 months agoUpdate Dependency in Intel CET Test; Re-Enable Test 3893/head
W. Felix Handte [Wed, 31 Jan 2024 16:07:15 +0000 (11:07 -0500)] 
Update Dependency in Intel CET Test; Re-Enable Test

Motivated by #3884.

18 months agoMerge pull request #3890 from facebook/lorem
Yann Collet [Thu, 1 Feb 2024 18:15:57 +0000 (10:15 -0800)] 
Merge pull request #3890 from facebook/lorem

add a lorem ipsum generator

18 months agomodification: differentiate literal update at pos+1
Yann Collet [Wed, 31 Jan 2024 19:12:57 +0000 (11:12 -0800)] 
modification: differentiate literal update at pos+1

helps when litlen==1 is cheaper than litlen==0

works great on pathological arr[u32] examples
but doesn't generalize well on other files.

silesia/x-ray is amoung the most negatively affected ones.

18 months agoMerge pull request #3886 from facebook/sparc64
Yann Collet [Wed, 31 Jan 2024 18:55:11 +0000 (10:55 -0800)] 
Merge pull request #3886 from facebook/sparc64

add sparc64 compilation test

18 months agorefactor optimal parser
Yann Collet [Wed, 31 Jan 2024 10:51:46 +0000 (02:51 -0800)] 
refactor optimal parser

store stretches as intermediate solution instead of sequences.
makes it possible to link a solution to a predecessor.

18 months agoimprove high compression ratio for file like #3793
Yann Collet [Tue, 30 Jan 2024 07:25:24 +0000 (23:25 -0800)] 
improve high compression ratio for file like #3793

this works great for 32-bit arrays,
notably the synthetic ones, with extreme regularity,
unfortunately, it's not universal,
and in some cases, it's a loss.
Crucially, on average, it's a loss on silesia.
The most negatively impacted file is x-ray.
It deserves an investigation before suggesting it as an evolution.

18 months agoblindfix meson recipe 3890/head
Yann Collet [Mon, 29 Jan 2024 23:50:21 +0000 (15:50 -0800)] 
blindfix meson recipe

note: absence of GLOB capability within meson makes its maintenance more painful.

18 months agofix cmake recipe
Yann Collet [Mon, 29 Jan 2024 23:45:16 +0000 (15:45 -0800)] 
fix cmake recipe

18 months agofix Visual Studio solutions
Yann Collet [Mon, 29 Jan 2024 23:24:42 +0000 (15:24 -0800)] 
fix Visual Studio solutions

note: we probably don't want to maintain VS2008 solution anymore.
Its successor VS2010 is > 10 years old,
which is more or less the limit after which we can stop supporting old compilers.

18 months agofix paramgrill Makefile recipe
Yann Collet [Mon, 29 Jan 2024 23:18:27 +0000 (15:18 -0800)] 
fix paramgrill Makefile recipe

18 months agoadd a lorem ipsum generator
Yann Collet [Mon, 29 Jan 2024 23:00:32 +0000 (15:00 -0800)] 
add a lorem ipsum generator

this generator replaces the statistical generator
for the general case when no statistic is requested.

Generated data features a compression level speed / ratio curve
which is more in line with expectation.

18 months agoMerge pull request #3888 from facebook/dependabot/github_actions/microsoft/setup...
Yann Collet [Mon, 29 Jan 2024 22:34:53 +0000 (14:34 -0800)] 
Merge pull request #3888 from facebook/dependabot/github_actions/microsoft/setup-msbuild-1.3.2

Bump microsoft/setup-msbuild from 1.3.1 to 1.3.2

18 months agoMerge pull request #3887 from facebook/dependabot/github_actions/actions/upload-artif...
Yann Collet [Mon, 29 Jan 2024 17:49:36 +0000 (09:49 -0800)] 
Merge pull request #3887 from facebook/dependabot/github_actions/actions/upload-artifact-4.3.0

Bump actions/upload-artifact from 4.2.0 to 4.3.0

18 months agoBump microsoft/setup-msbuild from 1.3.1 to 1.3.2 3888/head
dependabot[bot] [Mon, 29 Jan 2024 05:53:45 +0000 (05:53 +0000)] 
Bump microsoft/setup-msbuild from 1.3.1 to 1.3.2

Bumps [microsoft/setup-msbuild](https://github.com/microsoft/setup-msbuild) from 1.3.1 to 1.3.2.
- [Release notes](https://github.com/microsoft/setup-msbuild/releases)
- [Changelog](https://github.com/microsoft/setup-msbuild/blob/main/building-release.md)
- [Commits](https://github.com/microsoft/setup-msbuild/compare/1ff57057b5cfdc39105cd07a01d78e9b0ea0c14c...031090342aeefe171e49f3820f3b52110c66e402)

---
updated-dependencies:
- dependency-name: microsoft/setup-msbuild
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
18 months agoBump actions/upload-artifact from 4.2.0 to 4.3.0 3887/head
dependabot[bot] [Mon, 29 Jan 2024 05:53:39 +0000 (05:53 +0000)] 
Bump actions/upload-artifact from 4.2.0 to 4.3.0

Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.2.0 to 4.3.0.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/694cdabd8bdb0f10b2cea11669e1bf5453eed0a6...26f96dfa697d77e81fd5907df203aa23a56210a8)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
18 months agoadd sparc64 compilation test 3886/head
Yann Collet [Mon, 29 Jan 2024 04:25:04 +0000 (20:25 -0800)] 
add sparc64 compilation test

18 months agoMerge pull request #3880 from facebook/dependabot/github_actions/actions/upload-artif...
Yann Collet [Sun, 28 Jan 2024 05:49:29 +0000 (21:49 -0800)] 
Merge pull request #3880 from facebook/dependabot/github_actions/actions/upload-artifact-4.2.0

Bump actions/upload-artifact from 4.1.0 to 4.2.0

18 months agoMerge pull request #3883 from facebook/cmake_test
Yann Collet [Sun, 28 Jan 2024 02:18:15 +0000 (18:18 -0800)] 
Merge pull request #3883 from facebook/cmake_test

improve cmake test

18 months agofix cmakebuild test 3883/head
Yann Collet [Sat, 27 Jan 2024 23:09:21 +0000 (15:09 -0800)] 
fix cmakebuild test

write it in a way which is more compatible with older versions of cmake (<3.13)

Also:
fix pzstd compilation (notably on macos)

18 months agoMerge pull request #3884 from facebook/disable_intelcet
Yann Collet [Sun, 28 Jan 2024 01:29:17 +0000 (17:29 -0800)] 
Merge pull request #3884 from facebook/disable_intelcet

disable Intel CET Compatibility tests

18 months agodisable Intel CET Compatibility tests 3884/head
Yann Collet [Sat, 27 Jan 2024 23:37:29 +0000 (15:37 -0800)] 
disable Intel CET Compatibility tests

The binary blob that must be downloaded from intel.com is no longer available

18 months agoBump actions/upload-artifact from 4.1.0 to 4.2.0 3880/head
dependabot[bot] [Mon, 22 Jan 2024 05:21:32 +0000 (05:21 +0000)] 
Bump actions/upload-artifact from 4.1.0 to 4.2.0

Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.1.0 to 4.2.0.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/1eb3cb2b3e0f29609092a73eb033bb759a334595...694cdabd8bdb0f10b2cea11669e1bf5453eed0a6)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
18 months agoMerge pull request #3877 from facebook/oldgrep
Yann Collet [Sun, 21 Jan 2024 19:31:58 +0000 (11:31 -0800)] 
Merge pull request #3877 from facebook/oldgrep

minor: playTests.sh more compatible with older versions of grep

18 months agomade playTests.sh more compatible with older versions of grep 3877/head
Yann Collet [Tue, 16 Jan 2024 20:14:35 +0000 (12:14 -0800)] 
made playTests.sh more compatible with older versions of grep

replaced `\+` by `*`.
`\+` means `[1-N]`,
while `*` means `[0-N]`,
so it's not strictly equivalent
but `\+` happens to be badly supported on some flavors of grep,
and for the purpose of these tests, `*` is good enough.

18 months agoMerge pull request #3865 from facebook/grep_e
Yann Collet [Mon, 15 Jan 2024 20:44:46 +0000 (12:44 -0800)] 
Merge pull request #3865 from facebook/grep_e

playTests.sh does no longer needs grep -E

18 months agoplayTests.sh does no longer needs grep -E 3865/head
Yann Collet [Mon, 15 Jan 2024 19:16:46 +0000 (11:16 -0800)] 
playTests.sh does no longer needs grep -E

it makes the test script more portable across posix systems
because `grep -E` is not guaranteed
while `grep` is fairly common.

18 months agoMerge pull request #3863 from facebook/dependabot/github_actions/github/codeql-action...
Yann Collet [Mon, 15 Jan 2024 17:44:19 +0000 (09:44 -0800)] 
Merge pull request #3863 from facebook/dependabot/github_actions/github/codeql-action-3.23.0

Bump github/codeql-action from 2.21.4 to 3.23.0

18 months agoMerge pull request #3864 from facebook/dependabot/github_actions/actions/upload-artif...
Yann Collet [Mon, 15 Jan 2024 07:44:56 +0000 (23:44 -0800)] 
Merge pull request #3864 from facebook/dependabot/github_actions/actions/upload-artifact-4.1.0

Bump actions/upload-artifact from 4.0.0 to 4.1.0

18 months agoBump actions/upload-artifact from 4.0.0 to 4.1.0 3864/head
dependabot[bot] [Mon, 15 Jan 2024 05:24:46 +0000 (05:24 +0000)] 
Bump actions/upload-artifact from 4.0.0 to 4.1.0

Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.0.0 to 4.1.0.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/c7d193f32edcb7bfad88892161225aeda64e9392...1eb3cb2b3e0f29609092a73eb033bb759a334595)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
18 months agoBump github/codeql-action from 2.21.4 to 3.23.0 3863/head
dependabot[bot] [Mon, 15 Jan 2024 05:24:41 +0000 (05:24 +0000)] 
Bump github/codeql-action from 2.21.4 to 3.23.0

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.21.4 to 3.23.0.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/a09933a12a80f87b87005513f0abb1494c27a716...e5f05b81d5b6ff8cfa111c80c22c5fd02a384118)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
18 months agoMerge pull request #3760 from jcelerier/patch-1
Yann Collet [Sat, 13 Jan 2024 19:41:30 +0000 (11:41 -0800)] 
Merge pull request #3760 from jcelerier/patch-1

[x-compile] Fix cross-compiling for AArch64 with lld

18 months agoMerge pull request #3817 from elasota/oversized-probs-clarification
Yann Collet [Sat, 13 Jan 2024 19:37:54 +0000 (11:37 -0800)] 
Merge pull request #3817 from elasota/oversized-probs-clarification

Clarify that probability tables must not contain non-zero probabilities for invalid values

18 months agoMerge pull request #3850 from KapJI/better-errors
Yann Collet [Sat, 13 Jan 2024 19:37:25 +0000 (11:37 -0800)] 
Merge pull request #3850 from KapJI/better-errors

cli: better errors on argument parsing

18 months agoMerge pull request #3858 from eli-schwartz/msvc-dev-cmd
Yann Collet [Sat, 13 Jan 2024 19:36:20 +0000 (11:36 -0800)] 
Merge pull request #3858 from eli-schwartz/msvc-dev-cmd

CI: meson: use builtin handling for MSVC

19 months agoCI: meson: use builtin handling for MSVC 3858/head
Eli Schwartz [Tue, 2 Jan 2024 06:36:45 +0000 (01:36 -0500)] 
CI: meson: use builtin handling for MSVC

This avoids downloading -- and periodically bumping the checksum for --
a third-party action that isn't strictly required, and thus helps keep
down dependencies and reduce update churn.

19 months agoMerge pull request #3855 from emaste/freebsd-14-ci
Yann Collet [Sun, 31 Dec 2023 06:16:42 +0000 (22:16 -0800)] 
Merge pull request #3855 from emaste/freebsd-14-ci

Cirrus-CI: Add FreeBSD 14

19 months agoMerge pull request #3847 from michoecho/fix_nullptr_deref_in_createCDict
Yann Collet [Sat, 30 Dec 2023 21:23:39 +0000 (13:23 -0800)] 
Merge pull request #3847 from michoecho/fix_nullptr_deref_in_createCDict

Fix a nullptr dereference in ZSTD_createCDict_advanced2()

19 months agoCirrus-CI: Add FreeBSD 14 3855/head
Ed Maste [Thu, 14 Dec 2023 00:56:14 +0000 (19:56 -0500)] 
Cirrus-CI: Add FreeBSD 14

19 months agoMerge pull request #3846 from emaste/c89
Yann Collet [Fri, 29 Dec 2023 20:34:47 +0000 (12:34 -0800)] 
Merge pull request #3846 from emaste/c89

zlibWrapper: convert to C89 / ANSI C

19 months agoMake offload API compatible with static CCtx (#3854)
Elliot Gorokhovsky [Thu, 28 Dec 2023 19:48:46 +0000 (14:48 -0500)] 
Make offload API compatible with static CCtx (#3854)

* Add ZSTD_CCtxParams_registerSequenceProducer() to public API

* add unit test

* add docs to zstd.h

* nits

* Add ZSTDLIB_STATIC_API prefix

* Add asserts

19 months agoMerge pull request #3849 from facebook/dependabot/github_actions/actions/upload-artif...
Yann Collet [Mon, 18 Dec 2023 17:49:57 +0000 (09:49 -0800)] 
Merge pull request #3849 from facebook/dependabot/github_actions/actions/upload-artifact-4.0.0

Bump actions/upload-artifact from 3.1.3 to 4.0.0

19 months agoUpdate windows-artifacts.yml 3849/head
Yann Collet [Mon, 18 Dec 2023 17:39:42 +0000 (09:39 -0800)] 
Update windows-artifacts.yml

and fixed version number in comment

19 months agocli: better errors on arguent parsing 3850/head
Ruslan Sayfutdinov [Sat, 16 Dec 2023 15:28:19 +0000 (15:28 +0000)] 
cli: better errors on arguent parsing

19 months agoBump actions/upload-artifact from 3.1.3 to 4.0.0
dependabot[bot] [Mon, 18 Dec 2023 05:26:39 +0000 (05:26 +0000)] 
Bump actions/upload-artifact from 3.1.3 to 4.0.0

Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3.1.3 to 4.0.0.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/a8a3f3ad30e3422c9c7b888a15615d19a852ae32...c7d193f32edcb7bfad88892161225aeda64e9392)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
19 months agoFix a nullptr dereference in ZSTD_createCDict_advanced2() 3847/head
Michał Chojnowski [Sat, 16 Dec 2023 11:32:52 +0000 (12:32 +0100)] 
Fix a nullptr dereference in ZSTD_createCDict_advanced2()

If the relevant allocation returns NULL, ZSTD_createCDict_advanced_internal()
will return NULL. But ZSTD_createCDict_advanced2() doesn't check for
this and attempts to use the returned pointer anyway, which leads to
a segfault.

19 months agozlibWrapper: convert to C89 / ANSI C 3846/head
Ed Maste [Thu, 14 Dec 2023 00:54:29 +0000 (19:54 -0500)] 
zlibWrapper: convert to C89 / ANSI C

Clang 16 (which is the system compiler in FreeBSD 14.0) no longer allows
K&R function definitions.  Formatting of the changes matches current
zlib.

19 months agoMerge pull request #3845 from emaste/dev
Yann Collet [Thu, 14 Dec 2023 07:54:41 +0000 (23:54 -0800)] 
Merge pull request #3845 from emaste/dev

Update FreeBSD CI: drop 12.4 (nearly EOL)

19 months agoUpdate FreeBSD CI: drop 12.4 as it is nearly EOL 3845/head
Ed Maste [Wed, 13 Dec 2023 15:53:13 +0000 (10:53 -0500)] 
Update FreeBSD CI: drop 12.4 as it is nearly EOL

12.4 is EOL as of the end of December 2023, and pkg installation will
start failing some time after that so remove those jobs now.

20 months agoMerge pull request #3839 from embg/offload_refactor
Elliot Gorokhovsky [Wed, 29 Nov 2023 01:04:08 +0000 (20:04 -0500)] 
Merge pull request #3839 from embg/offload_refactor

Move offload API params into ZSTD_CCtx_params

20 months agoMove offload API params into ZSTD_CCtx_params 3839/head
Elliot Gorokhovsky [Mon, 27 Nov 2023 14:52:52 +0000 (06:52 -0800)] 
Move offload API params into ZSTD_CCtx_params

20 months agoRefactor ZSTD_sequenceProducer_F typedef to ZSTD_sequenceProducer_F*
Elliot Gorokhovsky [Mon, 27 Nov 2023 14:52:36 +0000 (06:52 -0800)] 
Refactor ZSTD_sequenceProducer_F typedef to ZSTD_sequenceProducer_F*

20 months agoClarify that there must be at least 2 weights, i.e. encoding all weights as 0 is...
elasota [Thu, 9 Nov 2023 04:46:37 +0000 (23:46 -0500)] 
Clarify that there must be at least 2 weights, i.e. encoding all weights as 0 is invalid

20 months agoClarify that the presence of a value with weight 1 is required
elasota [Thu, 9 Nov 2023 04:25:00 +0000 (23:25 -0500)] 
Clarify that the presence of a value with weight 1 is required

20 months agoModernize macros to use `do { } while (0)`
Nick Terrell [Tue, 21 Nov 2023 21:26:25 +0000 (13:26 -0800)] 
Modernize macros to use `do { } while (0)`

This PR introduces no functional changes. It attempts to change all
macros currently using `{ }` or some variant of that to to
`do { } while (0)`, and introduces trailing `;` where necessary.
There were no bugs found during this migration.

The bug in Visual Studios warning on this has been fixed since VS2015.
Additionally, we have several instances of `do { } while (0)` which have
been present for several releases, so we don't have to worry about
breaking peoples builds.

Fixes Issue #3830.

20 months agoMerge pull request #3820 from facebook/xxh082
Yann Collet [Tue, 21 Nov 2023 17:11:40 +0000 (09:11 -0800)] 
Merge pull request #3820 from facebook/xxh082

update xxhash library to v0.8.2

20 months ago[huf] Fix null pointer addition
Nick Terrell [Mon, 20 Nov 2023 20:04:30 +0000 (12:04 -0800)] 
[huf] Fix null pointer addition

`HUF_DecompressFastArgs_init()` was adding 0 to NULL. Fix it by exiting
early for empty outputs. This is no change in behavior, because the
function was already exiting 0 in this case, just slightly later.

20 months ago[huf] Improve fast C & ASM performance on small data
Nick Terrell [Mon, 20 Nov 2023 19:33:57 +0000 (11:33 -0800)] 
[huf] Improve fast C & ASM performance on small data

* Rename `ilimit` to `ilowest` and set it equal to `src` instead of
  `src + 6 + 8`. This is safe because the fast decoding loops guarantee
  to never read below `ilowest` already. This allows the fast decoder to
  run for at least two more iterations, because it consumes at most 7
  bytes per iteration.
* Continue the fast loop all the way until the number of safe iterations
 is 0. Initially, I thought that when it got towards the end, the
 computation of how many iterations of safe might become expensive. But
 it ends up being slower to have to decode each of the 4 streams
 individually, which makes sense.

This drastically speeds up the Huffman decoder on the `github` dataset
for the issue raised in #3762, measured with `zstd -b1e1r github/`.

| Decoder  | Speed before | Speed after |
|----------|--------------|-------------|
| Fallback | 477 MB/s     | 477 MB/s    |
| Fast C   | 384 MB/s     | 492 MB/s    |
| Assembly | 385 MB/s     | 501 MB/s    |

We can also look at the speed delta for different block sizes of silesia
using `zstd -b1e1r silesia.tar -B#`.

| Decoder  | -B1K ∆ | -B2K ∆ | -B4K ∆ | -B8K ∆ | -B16K ∆ | -B32K ∆ | -B64K ∆ | -B128K ∆ |
|----------|--------|--------|--------|--------|---------|---------|---------|----------|
| Fast C   | +11.2% | +8.2%  | +6.1%  | +4.4%  | +2.7%   | +1.5%   | +0.6%   | +0.2%    |
| Assembly | +12.5% | +9.0%  | +6.2%  | +3.6%  | +1.5%   | +0.7%   | +0.2%   | +0.03%   |

20 months ago[huf] Improve fast huffman decoding speed in linux kernel
Nick Terrell [Sat, 18 Nov 2023 02:20:19 +0000 (18:20 -0800)] 
[huf] Improve fast huffman decoding speed in linux kernel

gcc in the linux kernel was not unrolling the inner loops of the Huffman
decoder, which was destroying decoding performance. The compiler was
generating crazy code with all sorts of branches. I suspect because of
Spectre mitigations, but I'm not certain. Once the loops were manually
unrolled, performance was restored.

Additionally, when gcc couldn't prove that the variable left shift in
the 4X2 decode loop wasn't greater than 63, it inserted checks to verify
it. To fix this, mask `entry.nbBits & 0x3F`, which allows gcc to eliete
this check. This is a no op, because `entry.nbBits` is guaranteed to be
less than 64.

Lastly, introduce the `HUF_DISABLE_FAST_DECODE` macro to disable the
fast C loops for Issue #3762. So if even after this change, there is a
performance regression, users can opt-out at compile time.

20 months ago[debug] Don't define g_debuglevel in the kernel
Nick Terrell [Fri, 17 Nov 2023 01:15:25 +0000 (17:15 -0800)] 
[debug] Don't define g_debuglevel in the kernel

We only use this constant when `DEBUGLEVEL>=2`, but we get
-Werror=pedantic errors for empty translation units, so still define it
except in kernel environments.

Backport from the kernel:

https://lore.kernel.org/lkml/20230616144400.172683-1-ben.dooks@codethink.co.uk/

20 months ago[linux] Remove usage of deprecated function
Nick Terrell [Fri, 17 Nov 2023 00:53:44 +0000 (16:53 -0800)] 
[linux] Remove usage of deprecated function

ZSTD_resetDStream() is deprecated and replaced by ZSTD_DCtx_reset().
This removes deprecation warnings from the kernel build.

This change is a no-op, see the docs suggesting this replacement.

https://github.com/facebook/zstd/blob/fcbf2fde9ac7ce1562c7b3a394350e764bcb580f/lib/zstd.h#L2655-L2663

20 months ago[linux] Backport intptr_t removal
Nick Terrell [Thu, 16 Nov 2023 20:00:11 +0000 (12:00 -0800)] 
[linux] Backport intptr_t removal

Linux started providing intptr_t in <linux/types.h> so we no longer need
to define it here.

https://lkml.kernel.org/r/ed66b9e4-1fb7-45be-9bb9-d4bc291c691f@p183

20 months agoupdate license text 3820/head
Yann Collet [Fri, 17 Nov 2023 00:19:25 +0000 (16:19 -0800)] 
update license text

20 months agoMerge pull request #3807 from gruenich/increase_minimum_cmake_version_3.5
Yann Collet [Tue, 14 Nov 2023 18:48:11 +0000 (10:48 -0800)] 
Merge pull request #3807 from gruenich/increase_minimum_cmake_version_3.5

[cmake] Require CMake version 3.5 or newer

20 months agofix the copyright linter
Yann Collet [Mon, 13 Nov 2023 23:46:59 +0000 (15:46 -0800)] 
fix the copyright linter

20 months agoupdate xxhash to v0.8.2
Yann Collet [Mon, 13 Nov 2023 23:42:07 +0000 (15:42 -0800)] 
update xxhash to v0.8.2

List of updates : https://github.com/Cyan4973/xxHash/releases/tag/v0.8.2

This is also a preparation task before taking care of #3819

20 months agoMerge pull request #3813 from elasota/overflow-clarification
Yann Collet [Mon, 13 Nov 2023 08:03:42 +0000 (00:03 -0800)] 
Merge pull request #3813 from elasota/overflow-clarification

Clarify that a stream containing too many Huffman weights is invalid

20 months agoMerge pull request #3812 from jondo2010/bazel_build_doc
Yann Collet [Mon, 13 Nov 2023 08:03:10 +0000 (00:03 -0800)] 
Merge pull request #3812 from jondo2010/bazel_build_doc

Add Bazel module instructions to README.md

20 months agoClarify that a non-zero probability for an invalid symbol is invalid 3817/head
elasota [Mon, 13 Nov 2023 05:03:56 +0000 (00:03 -0500)] 
Clarify that a non-zero probability for an invalid symbol is invalid

20 months agoClarify that decoding too many Huffman weights is a failure condition 3813/head
elasota [Thu, 9 Nov 2023 01:06:58 +0000 (20:06 -0500)] 
Clarify that decoding too many Huffman weights is a failure condition

20 months agoAdd Bazel module instructions to README.md 3812/head
John Hughes [Wed, 8 Nov 2023 09:08:21 +0000 (09:08 +0000)] 
Add Bazel module instructions to README.md

21 months ago[cmake] Remove code for compatibility with CMake < 3.0 3807/head
Christoph Grüninger [Wed, 1 Nov 2023 07:51:45 +0000 (08:51 +0100)] 
[cmake] Remove code for compatibility with CMake < 3.0

The required version of CMake is now 3.5.

21 months agoMerge pull request #3806 from elasota/fmt-clarifications
Yann Collet [Wed, 1 Nov 2023 17:59:54 +0000 (10:59 -0700)] 
Merge pull request #3806 from elasota/fmt-clarifications

Correct FSE probability bit consumption in specification

21 months ago[cmake] Require CMake version 3.5 or newer
Christoph Grüninger [Tue, 31 Oct 2023 22:30:43 +0000 (23:30 +0100)] 
[cmake] Require CMake version 3.5 or newer

More recent versions of CMake emit the following warning:
CMake Deprecation Warning at cmake/CMakeLists.txt:10 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.

21 months agoMerge pull request #3800 from facebook/dependabot/github_actions/actions/checkout...
Yann Collet [Tue, 31 Oct 2023 16:23:47 +0000 (09:23 -0700)] 
Merge pull request #3800 from facebook/dependabot/github_actions/actions/checkout-4.1.1

Bump actions/checkout from 4.1.0 to 4.1.1

21 months agoMerge pull request #3795 from Saverio976/doc/cmake-fetch-content
Yann Collet [Tue, 31 Oct 2023 16:23:28 +0000 (09:23 -0700)] 
Merge pull request #3795 from Saverio976/doc/cmake-fetch-content

Add doc on how to use it with cmake FetchContent

21 months agoAdd definition of "log2sup" function 3806/head
elasota [Tue, 31 Oct 2023 15:42:00 +0000 (11:42 -0400)] 
Add definition of "log2sup" function

21 months agoClarify that the log2 of the largest possible symbol is the maximum number of bits...
elasota [Tue, 31 Oct 2023 05:17:23 +0000 (01:17 -0400)] 
Clarify that the log2 of the largest possible symbol is the maximum number of bits consumed

21 months agoAdd target_include_directories because windows and macos need it for me 3795/head
Xavier Mitault [Mon, 23 Oct 2023 15:38:09 +0000 (17:38 +0200)] 
Add target_include_directories because windows and macos need it for me

21 months agoBump actions/checkout from 4.1.0 to 4.1.1 3800/head
dependabot[bot] [Mon, 23 Oct 2023 05:56:05 +0000 (05:56 +0000)] 
Bump actions/checkout from 4.1.0 to 4.1.1

Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/8ade135a41bc03ea155e62e844d188df1ea18608...b4ffde65f46336ab88eb53be808477a3936bae11)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
21 months agoMerge pull request #3789 from facebook/fix_flexArray_fse
Yann Collet [Fri, 20 Oct 2023 19:40:13 +0000 (12:40 -0700)] 
Merge pull request #3789 from facebook/fix_flexArray_fse

solving flexArray issue #3785 in fse

21 months agorevert to manually defining DTable 3789/head
Yann Collet [Thu, 19 Oct 2023 05:45:57 +0000 (22:45 -0700)] 
revert to manually defining DTable

thus avoiding the analyzer and ubsan to associate DTable to a size of 1.

21 months agobaby-step towards solving flexArray issue #3785
Yann Collet [Mon, 9 Oct 2023 23:47:52 +0000 (16:47 -0700)] 
baby-step towards solving flexArray issue #3785

the flexArray in structure FSE_DecompressWksp
is just a way to derive a pointer easily,
without risk/complexity of calculating it manually.

Not sure if this change is good enough to avoid ubsan warnings though.

21 months agoAdd doc on how to use it with cmake FetchContent
Xavier Mitault [Wed, 18 Oct 2023 11:22:15 +0000 (13:22 +0200)] 
Add doc on how to use it with cmake FetchContent