]> git.ipfire.org Git - thirdparty/zstd.git/log
thirdparty/zstd.git
2 days agoMerge pull request #4019 from b7f7/fix_cmake_rc_build dev
Yann Collet [Tue, 16 Apr 2024 23:06:17 +0000 (16:06 -0700)] 
Merge pull request #4019 from b7f7/fix_cmake_rc_build

fix missing include folder for resource compiler

2 days agoMerge pull request #4020 from Ansuel/install-mt-pc
Yann Collet [Tue, 16 Apr 2024 23:04:23 +0000 (16:04 -0700)] 
Merge pull request #4020 from Ansuel/install-mt-pc

Provide variant pkg-config file for multi-threaded static lib

6 days agoMerge pull request #4022 from facebook/dependabot/github_actions/github/codeql-action...
Felix Handte [Fri, 12 Apr 2024 15:51:02 +0000 (08:51 -0700)] 
Merge pull request #4022 from facebook/dependabot/github_actions/github/codeql-action-3.24.10

Bump github/codeql-action from 3.24.9 to 3.24.10

9 days agoMerge pull request #4021 from pstef/dev
Yann Collet [Tue, 9 Apr 2024 18:02:49 +0000 (11:02 -0700)] 
Merge pull request #4021 from pstef/dev

Fix zlibWrapper build

10 days agoProvide variant pkg-config file for multi-threaded static lib 4020/head
Christian Marangi [Sat, 6 Apr 2024 12:41:54 +0000 (14:41 +0200)] 
Provide variant pkg-config file for multi-threaded static lib

Multi-threaded static library require -pthread to correctly link and works.
The pkg-config we provide tho only works with dynamic multi-threaded library
and won't provide the correct libs and cflags values if lib-mt is used.

To handle this, introduce an env variable MT to permit advanced user to
install and generate a correct pkg-config file for lib-mt or detect if
lib-mt target is called.

With MT env set on calling make install-pc, libzstd.pc.in is a
pkg-config file for a multi-threaded static library.

On calling make lib-mt, a libzstd.pc is generated for a multi-threaded
static library as it's what asked by the user by forcing it.

libzstd.pc is changed to PHONY to force regeneration of it on calling
lib targets or install-pc to handle case where the same directory is
used for mixed compilation.

This was notice while migrating from meson to make build system where
meson generates a correct .pc file while make doesn't.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
11 days agoBump github/codeql-action from 3.24.9 to 3.24.10 4022/head
dependabot[bot] [Mon, 8 Apr 2024 05:47:58 +0000 (05:47 +0000)] 
Bump github/codeql-action from 3.24.9 to 3.24.10

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.24.9 to 3.24.10.
- [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/1b1aada464948af03b950897e5eb522f92603cc2...4355270be187e1b672a7a1c7c7bae5afdc1ab94a)

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

Signed-off-by: dependabot[bot] <support@github.com>
12 days agoFix zlibWrapper build 4021/head
Piotr Paweł Stefaniak [Sun, 7 Apr 2024 11:04:26 +0000 (13:04 +0200)] 
Fix zlibWrapper build

Just after a clone I'm getting this:

~/zstd/zlibWrapper$ cc -c zstd_zlibwrapper.o gz*.c -lz -lzstd -DSTDC
gzwrite.c: In function ‘gz_write’:
gzwrite.c:226:43: error: ‘z_uInt’ undeclared (first use in this
                         function); did you mean ‘uInt’?
  226 |             state.state->strm.avail_in = (z_uInt)n;
      |                                           ^~~~~~
      |                                           uInt
gzwrite.c:226:43: note: each undeclared identifier is reported only
                        once for each function it appears in
gzwrite.c:226:50: error: expected ‘;’ before ‘n’
  226 |             state.state->strm.avail_in = (z_uInt)n;
      |                                                  ^
      |                                                  ;

z_uInt is never used directly, zconf.h redefines uInt to z_uInt under
the condition that Z_PREFIX is set. All examples use uInt, and the type
of avail_in is also uInt.

In this commit I modify the cast to refer to the same type as the type
of lvalue.

Arguably, the real fix here is to handle possible overflows, but that's
beyond the scope of this commit.

13 days agoMerge pull request #3996 from facebook/fix_nodejs_version_warning
Yann Collet [Sat, 6 Apr 2024 06:06:21 +0000 (23:06 -0700)] 
Merge pull request #3996 from facebook/fix_nodejs_version_warning

fix nodejs deprecation warning

13 days agoMerge pull request #4012 from elasota/spec-remove-fse-overflow
Yann Collet [Sat, 6 Apr 2024 06:06:06 +0000 (23:06 -0700)] 
Merge pull request #4012 from elasota/spec-remove-fse-overflow

Remove specification text stating that probability overflow is invalid

13 days agoMerge pull request #4011 from facebook/fix4005
Yann Collet [Sat, 6 Apr 2024 06:05:53 +0000 (23:05 -0700)] 
Merge pull request #4011 from facebook/fix4005

decompression errors always display the full origin filename

13 days agofix missing include folder for resource compiler 4019/head
BadWolf [Fri, 5 Apr 2024 22:05:58 +0000 (00:05 +0200)] 
fix missing include folder for resource compiler

2 weeks agoRemove text specifying probability overflow as invalid, the variable-size value encod... 4012/head
elasota [Tue, 2 Apr 2024 00:08:42 +0000 (20:08 -0400)] 
Remove text specifying probability overflow as invalid, the variable-size value encoding scheme makes this impossible.

2 weeks agodecompression errors always display the full origin filename fix4005 4011/head
Yann Collet [Mon, 1 Apr 2024 18:12:26 +0000 (11:12 -0700)] 
decompression errors always display the full origin filename

instead of the truncated size-limited version.

2 weeks agoFix building on windows-x86 if clang already includes
Yuriy Chernyshov [Thu, 28 Mar 2024 10:54:53 +0000 (11:54 +0100)] 
Fix building on windows-x86 if clang already includes

[D101338](https://reviews.llvm.org/D101338) landed in 2021, so clang16 should have it

2 weeks agoMerge pull request #3994 from sunpoet/dev
Yann Collet [Mon, 1 Apr 2024 06:09:46 +0000 (23:09 -0700)] 
Merge pull request #3994 from sunpoet/dev

Use md5sum rather than gmd5sum for FreeBSD

2 weeks agoMerge pull request #3997 from facebook/readme_bench_156
Yann Collet [Sun, 31 Mar 2024 20:17:01 +0000 (13:17 -0700)] 
Merge pull request #3997 from facebook/readme_bench_156

updated benchmarks for v1.5.6

3 weeks agoupdated benchmarks for v1.5.6 readme_bench_156 3997/head
Yann Collet [Thu, 28 Mar 2024 01:19:31 +0000 (18:19 -0700)] 
updated benchmarks for v1.5.6

3 weeks agoMerge pull request #3988 from facebook/dependabot/github_actions/github/codeql-action...
Yann Collet [Thu, 28 Mar 2024 01:05:42 +0000 (18:05 -0700)] 
Merge pull request #3988 from facebook/dependabot/github_actions/github/codeql-action-3.24.9

Bump github/codeql-action from 3.24.7 to 3.24.9

3 weeks agofix nodejs deprecation warning fix_nodejs_version_warning 3996/head
Yann Collet [Wed, 27 Mar 2024 23:10:15 +0000 (16:10 -0700)] 
fix nodejs deprecation warning

by updating msys2 action

3 weeks agoMerge pull request #3987 from ManuelBlanc/msbuild_vswhere
Yann Collet [Wed, 27 Mar 2024 22:48:40 +0000 (15:48 -0700)] 
Merge pull request #3987 from ManuelBlanc/msbuild_vswhere

Use vswhere to find MSBuild; add VS2022 support

3 weeks agoUse md5sum rather than gmd5sum for FreeBSD 3994/head
Po-Chuan Hsieh [Wed, 27 Mar 2024 12:53:52 +0000 (20:53 +0800)] 
Use md5sum rather than gmd5sum for FreeBSD

Reference: https://man.freebsd.org/cgi/man.cgi?query=md5sum

3 weeks ago[fuzz] Turn off -Werror by default
Nick Terrell [Tue, 26 Mar 2024 17:01:19 +0000 (10:01 -0700)] 
[fuzz] Turn off -Werror by default

This was causing OSS-Fuzz errors, due to compiler differences.
* Fix the issue
* Also turn off -Werror so we don't fail fuzzer builds for warnings
* Turn on -Werror in our CI

3 weeks agoBump github/codeql-action from 3.24.7 to 3.24.9 3988/head
dependabot[bot] [Mon, 25 Mar 2024 05:31:42 +0000 (05:31 +0000)] 
Bump github/codeql-action from 3.24.7 to 3.24.9

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.24.7 to 3.24.9.
- [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/3ab4101902695724f9365a384f86c1074d94e18c...1b1aada464948af03b950897e5eb522f92603cc2)

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

Signed-off-by: dependabot[bot] <support@github.com>
3 weeks agoImprove MSBuild search; add latest option 3987/head
ManuelBlanc [Sat, 23 Mar 2024 22:34:07 +0000 (18:34 -0400)] 
Improve MSBuild search; add latest option

3 weeks agoUse vswhere to find MSBuild; add VS2022 support
ManuelBlanc [Sat, 23 Mar 2024 12:44:52 +0000 (08:44 -0400)] 
Use vswhere to find MSBuild; add VS2022 support

See:
https://github.com/microsoft/vswhere/wiki/Find-MSBuild

4 weeks agoMerge pull request #3985 from facebook/scorecard_permission 3984/head
Yann Collet [Thu, 21 Mar 2024 20:56:20 +0000 (13:56 -0700)] 
Merge pull request #3985 from facebook/scorecard_permission

try to silence some scorecard warnings

4 weeks agotry to silence some scorecard warnings 3985/head
Yann Collet [Thu, 21 Mar 2024 20:25:48 +0000 (13:25 -0700)] 
try to silence some scorecard warnings

4 weeks agoMerge pull request #3977 from facebook/doc_advanced
Yann Collet [Thu, 21 Mar 2024 19:33:15 +0000 (12:33 -0700)] 
Merge pull request #3977 from facebook/doc_advanced

Doc update

4 weeks agofix -Werror=pointer-arith in fuzzers (#3983)
Elliot Gorokhovsky [Thu, 21 Mar 2024 19:16:38 +0000 (15:16 -0400)] 
fix -Werror=pointer-arith in fuzzers (#3983)

4 weeks agoMerge pull request #3982 from embg/fuzzer_readme
Yann Collet [Thu, 21 Mar 2024 18:10:03 +0000 (11:10 -0700)] 
Merge pull request #3982 from embg/fuzzer_readme

Document the process for adding a new fuzzer

4 weeks agoMerge pull request #3975 from terrelln/2024-03-18-cmake-docs
Yann Collet [Thu, 21 Mar 2024 17:41:54 +0000 (10:41 -0700)] 
Merge pull request #3975 from terrelln/2024-03-18-cmake-docs

[cmake] Emit warnings for contradictory build settings

4 weeks agoMerge pull request #3979 from yoniko/Werror-fuzz
Yann Collet [Thu, 21 Mar 2024 17:41:34 +0000 (10:41 -0700)] 
Merge pull request #3979 from yoniko/Werror-fuzz

Fail on errors when building fuzzers

4 weeks agoMerge pull request #3981 from terrelln/2024-03-19-generate-sequences
Yann Collet [Thu, 21 Mar 2024 17:41:21 +0000 (10:41 -0700)] 
Merge pull request #3981 from terrelln/2024-03-19-generate-sequences

Fix & fuzz ZSTD_generateSequences

4 weeks agoFix & fuzz ZSTD_generateSequences 3981/head
Nick Terrell [Tue, 19 Mar 2024 19:37:55 +0000 (12:37 -0700)] 
Fix & fuzz ZSTD_generateSequences

This function was seriously flawed:
* It didn't do output bounds checks
* It produced invalid sequences when an uncompressed or RLE block was emitted
* It produced invalid sequences when the block splitter was enabled
* It produced invalid sequences when ZSTD_c_targetCBlockSize was enabled

I've attempted to fix these issues, but this function is just a bad idea,
so I've marked it as deprecated and unsafe. We should replace it with
`ZSTD_extractSequences()` which operates on a compressed frame.

4 weeks agoFuzzing and bugfixes for magicless-format decoding (#3976)
Elliot Gorokhovsky [Wed, 20 Mar 2024 23:22:34 +0000 (19:22 -0400)] 
Fuzzing and bugfixes for magicless-format decoding (#3976)

* fuzzing and bugfixes for magicless format

* reset dctx before each decompression

* do not memcmp empty buffers

* nit: decompressor errata

4 weeks agoAdd docs on how to add a new fuzzer 3982/head
Elliot Gorokhovsky [Tue, 19 Mar 2024 21:05:23 +0000 (14:05 -0700)] 
Add docs on how to add a new fuzzer

4 weeks agoFail on errors when building fuzzers 3979/head
Yonatan Komornik [Mon, 18 Mar 2024 22:25:22 +0000 (15:25 -0700)] 
Fail on errors when building fuzzers

Fails on errors when building fuzzers with `fuzz.py` (adds `Werror`).
Currently allows `declaration-after-statement`, `c++-compat` and
`deprecated` as they are abundant in code (some fixes to
`declaration-after-statement` are presented in this commit).

4 weeks agoFix bugs in simple decompression fuzzer (#3978)
Yonatan Komornik [Mon, 18 Mar 2024 22:36:40 +0000 (15:36 -0700)] 
Fix bugs in simple decompression fuzzer (#3978)

Fixes 2 issue in `simple_decompress.c`:
1. Wrong type used for storing the results of `ZSTD_findDecompressedSize` resulting in never matching to `ZSTD_CONTENTSIZE_ERROR` or `ZSTD_CONTENTSIZE_UNKNOWN`.

2. Experimental API is used (`ZSTD_findDecompressedSize`) without defining `ZSTD_STATIC_LINKING_ONLY`.

4 weeks agofix ZSTD_TARGETCBLOCKSIZE_MIN test 3977/head
Yann Collet [Mon, 18 Mar 2024 21:10:08 +0000 (14:10 -0700)] 
fix ZSTD_TARGETCBLOCKSIZE_MIN test

when requested CBlockSize is too low,
bound it to the minimum
instead of returning an error.

4 weeks agofix typo
Yann Collet [Mon, 18 Mar 2024 19:33:22 +0000 (12:33 -0700)] 
fix typo

4 weeks agoupdated API manual
Yann Collet [Mon, 18 Mar 2024 19:30:54 +0000 (12:30 -0700)] 
updated API manual

4 weeks agoadd doc on CCtx UB state
Yann Collet [Mon, 18 Mar 2024 19:30:35 +0000 (12:30 -0700)] 
add doc on CCtx UB state

4 weeks agoadd a paragraph on UB DCtx state after error
Yann Collet [Mon, 18 Mar 2024 19:17:41 +0000 (12:17 -0700)] 
add a paragraph on UB DCtx state after error

4 weeks agoupdate targetCBlockSize documentation
Yann Collet [Mon, 18 Mar 2024 19:04:02 +0000 (12:04 -0700)] 
update targetCBlockSize documentation

4 weeks ago[cmake] Emit warnings for contradictory build settings 3975/head
Nick Terrell [Mon, 18 Mar 2024 16:28:06 +0000 (09:28 -0700)] 
[cmake] Emit warnings for contradictory build settings

Document that the `ZSTD_BUILD_{SHARED,STATIC}` take precedence over `BUILD_SHARED_LIBS` when exactly one is ON.

Thanks to @teo-tsirpanis for pointing out the potentially confusing behavior.

4 weeks agopzstd: use c++14 without conditions
Alexander Kanavin [Mon, 19 Jun 2023 15:10:09 +0000 (17:10 +0200)] 
pzstd: use c++14 without conditions

Doing this check with a direct c++ snippet is prone to portability problems:

- \043 is not portable between shells: dash expands it to #,
bash does not;

- using # directly works with make 4.3 but does not with make 4.2.

Let's just use the c++ version that covers both the code and the gtest.

4 weeks agoImplement one-shot fallback for magicless format (#3971)
Elliot Gorokhovsky [Mon, 18 Mar 2024 14:55:53 +0000 (10:55 -0400)] 
Implement one-shot fallback for magicless format (#3971)

4 weeks ago[cmake] Fix up PR #3716
Nick Terrell [Thu, 14 Mar 2024 19:12:55 +0000 (12:12 -0700)] 
[cmake] Fix up PR #3716

* Make a variable `PublicHeaders` for Zstd's public headers
* Add `PublicHeaders` to `Headers`, which was missing
* Only export `${LIBRARY_DIR}` publicly, not `common/`
* Switch the `target_include_directories()` to `INTERFACE` because zstd uses relative includes internally, so doesn't need any include directories to build
* Switch installation to use the `PublicHeaders` variable, and test that the right headers are installed

4 weeks agoMakes it possible to use the lib through FetchContent or ExternalProject_Add
dsvi [Fri, 4 Aug 2023 22:47:46 +0000 (01:47 +0300)] 
Makes it possible to use the lib through FetchContent or ExternalProject_Add

4 weeks agoMerge pull request #3973 from facebook/dependabot/github_actions/github/codeql-action...
Yann Collet [Mon, 18 Mar 2024 07:44:55 +0000 (00:44 -0700)] 
Merge pull request #3973 from facebook/dependabot/github_actions/github/codeql-action-3.24.7

Bump github/codeql-action from 3.24.6 to 3.24.7

4 weeks agoMerge pull request #3972 from facebook/dependabot/github_actions/actions/cache-4
Yann Collet [Mon, 18 Mar 2024 07:44:12 +0000 (00:44 -0700)] 
Merge pull request #3972 from facebook/dependabot/github_actions/actions/cache-4

Bump actions/cache from 3 to 4

4 weeks agoBump github/codeql-action from 3.24.6 to 3.24.7 3973/head
dependabot[bot] [Mon, 18 Mar 2024 05:37:56 +0000 (05:37 +0000)] 
Bump github/codeql-action from 3.24.6 to 3.24.7

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.24.6 to 3.24.7.
- [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/8a470fddafa5cbb6266ee11b37ef4d8aae19c571...3ab4101902695724f9365a384f86c1074d94e18c)

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

Signed-off-by: dependabot[bot] <support@github.com>
4 weeks agoBump actions/cache from 3 to 4 3972/head
dependabot[bot] [Mon, 18 Mar 2024 05:37:52 +0000 (05:37 +0000)] 
Bump actions/cache from 3 to 4

Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v3...v4)

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

Signed-off-by: dependabot[bot] <support@github.com>
4 weeks agoMerge pull request #3969 from facebook/v156_prep
Yann Collet [Fri, 15 Mar 2024 17:26:49 +0000 (10:26 -0700)] 
Merge pull request #3969 from facebook/v156_prep

bump version number

4 weeks agoMerge pull request #3966 from facebook/debug_lineNumber
Yann Collet [Fri, 15 Mar 2024 17:26:06 +0000 (10:26 -0700)] 
Merge pull request #3966 from facebook/debug_lineNumber

add line number to debug traces

5 weeks agoupdate CHANGELOG for v1.5.6 3969/head
Yann Collet [Fri, 15 Mar 2024 00:01:34 +0000 (17:01 -0700)] 
update CHANGELOG for v1.5.6

5 weeks agoupdated version to v1.5.6
Yann Collet [Thu, 14 Mar 2024 22:38:14 +0000 (15:38 -0700)] 
updated version to v1.5.6

5 weeks agoRemove duplicate and incorrect docs in zstd_decompress.c (#3967)
Elliot Gorokhovsky [Thu, 14 Mar 2024 19:55:01 +0000 (15:55 -0400)] 
Remove duplicate and incorrect docs in zstd_decompress.c (#3967)

5 weeks agoadd line number to debug traces 3966/head
Yann Collet [Thu, 14 Mar 2024 19:11:11 +0000 (12:11 -0700)] 
add line number to debug traces

5 weeks ago[cmake] Always create libzstd target
Nick Terrell [Thu, 14 Mar 2024 15:47:04 +0000 (08:47 -0700)] 
[cmake] Always create libzstd target

If both `ZSTD_BUILD_SHARED` and `ZSTD_BUILD_STATIC` are set, then cmake exports the libraries `libzstd_shared` and `libzstd_static` only.
It does not export `libzstd`, which is only exported when exactly one of `ZSTD_BUILD_SHARED` and `ZSTD_BUILD_STATIC` is set.
This PR exports `libzstd` in that case, based on the value of the standard CMake variable [`BUILD_SHARED_LIBS`](https://cmake.org/cmake/help/latest/variable/BUILD_SHARED_LIBS.html).
This ensures that `libzstd` can always be used to refer to the exported zstd library, since the build errors if neither `ZSTD_BUILD_SHARED` nor `ZSTD_BUILD_STATIC` are set.

I tested all the possible combinations of `ZSTD_BUILD_SHARED`, `ZSTD_BUILD_STATIC`, and `BUILD_SHARED_LIBS` and they always worked as expected:
* If only exactly one of `ZSTD_BUILD_SHARED` and `ZSTD_BUILD_STATIC` is set, that is used as `libzstd`.
* Otherwise, libzstd is set based on `BUILD_SHARED_LIBS`.

Fixes #3859.

5 weeks agoMerge pull request #3964 from felixhandte/promote-tgt-c-blk-size-to-stable
Felix Handte [Thu, 14 Mar 2024 17:06:46 +0000 (13:06 -0400)] 
Merge pull request #3964 from felixhandte/promote-tgt-c-blk-size-to-stable

Promote `ZSTD_c_targetCBlockSize` Parameter to Stable API

5 weeks agoMerge pull request #3963 from felixhandte/also-handle-hidden-files-output-dir-mirror
Felix Handte [Thu, 14 Mar 2024 14:21:00 +0000 (10:21 -0400)] 
Merge pull request #3963 from felixhandte/also-handle-hidden-files-output-dir-mirror

Remove Erroneous Exclusion of Hidden Files and Folders in `--output-dir-mirror`

5 weeks agoMerge pull request #3962 from facebook/cover_lessIncludes
Yann Collet [Wed, 13 Mar 2024 23:52:54 +0000 (16:52 -0700)] 
Merge pull request #3962 from facebook/cover_lessIncludes

reduce the amount of #include in cover.h

5 weeks agoMerge pull request #3960 from felixhandte/use-utimensat-on-posix-2001
Felix Handte [Wed, 13 Mar 2024 21:10:35 +0000 (17:10 -0400)] 
Merge pull request #3960 from felixhandte/use-utimensat-on-posix-2001

Use `utimensat()` on FreeBSD

5 weeks agoPromote `ZSTD_c_targetCBlockSize` Parameter to Stable API 3964/head
W. Felix Handte [Wed, 13 Mar 2024 20:56:54 +0000 (16:56 -0400)] 
Promote `ZSTD_c_targetCBlockSize` Parameter to Stable API

This feature has demonstrated itself to be useful in web compression and we
want to encourage other folks to use it. But we currently make it difficult
to do so since it's locked away in the experimental API.

The API itself is really straightforward and I think it's fine to commit to
maintaining support / compatibility for this API even if in the future the
underlying implementation may continue to evolve.

Note that this commit changes its enum name and also its numeric value. Users
who respected the instructions of using the experimental API should be fine
with both of these changes since they should only have referred to it by the.

Conceivably someone could have done bad feature detection of this capability
by doing `#ifdef ZSTD_c_targetCBlockSize` which will now return false since
it's no longer a macro... but I think that's an acceptable hypothetical
breakage.

5 weeks agoRemove Erroneous Exclusion of Hidden Files and Folders in `--output-dir-mirror` 3963/head
W. Felix Handte [Wed, 13 Mar 2024 20:33:30 +0000 (16:33 -0400)] 
Remove Erroneous Exclusion of Hidden Files and Folders in `--output-dir-mirror`

5 weeks agoAdd a Few Tests
W. Felix Handte [Wed, 13 Mar 2024 20:32:04 +0000 (16:32 -0400)] 
Add a Few Tests

5 weeks agoUse `utimensat()` on FreeBSD 3960/head
W. Felix Handte [Tue, 12 Mar 2024 21:01:17 +0000 (14:01 -0700)] 
Use `utimensat()` on FreeBSD

FreeBSD only claims to support POSIX 2001 [0]. But they do in fact support
`utimensat()`. This adds a specific check to opt them in to using it. This
value was selected by consulting [1].

See discussion on #3952.

Further addresses #3748.

[0] https://github.com/freebsd/freebsd-src/blob/937a0055858a098027f464abf0b2b1ec5d36748f/sys/sys/unistd.h#L96

[1] https://docs.freebsd.org/en/books/porters-handbook/versions/

5 weeks ago[asm][aarch64] Mark that BTI and PAC are supported
Nick Terrell [Wed, 13 Mar 2024 16:58:34 +0000 (09:58 -0700)] 
[asm][aarch64] Mark that BTI and PAC are supported

Mark that `huf_decompress_amd64.S` supports BTI and PAC, which it trivially does because it is empty for aarch64.

The issue only requested BTI markings, but it also makes sense to mark PAC, which is the only other feature.

Also run add a test for this mode to the ARM64 QEMU test. Before this PR it warns on `huf_decompress_amd64.S`, after it doesn't.

Fixes Issue #3841.

5 weeks agoreduce the amount of includes in "cover.h" 3962/head
Yann Collet [Wed, 13 Mar 2024 18:29:28 +0000 (11:29 -0700)] 
reduce the amount of includes in "cover.h"

5 weeks agoMerge pull request #3958 from facebook/doc3698
Yann Collet [Wed, 13 Mar 2024 14:15:45 +0000 (07:15 -0700)] 
Merge pull request #3958 from facebook/doc3698

updated documentation

5 weeks agoMerge pull request #3956 from facebook/fix3702
Yann Collet [Wed, 13 Mar 2024 14:15:06 +0000 (07:15 -0700)] 
Merge pull request #3956 from facebook/fix3702

Do not truncate file name in verbose mode

5 weeks ago[CI] Run tests with CMake on Windows
Nick Terrell [Tue, 12 Mar 2024 19:38:21 +0000 (12:38 -0700)] 
[CI] Run tests with CMake on Windows

Build and run tests on Windows with CMake

5 weeks ago[cpu] Backport fix for rbx clobbering on Windows with Clang
Nick Terrell [Tue, 12 Mar 2024 19:16:55 +0000 (12:16 -0700)] 
[cpu] Backport fix for rbx clobbering on Windows with Clang

Backport folly fix for rbx clobbering: https://github.com/facebook/folly/commit/f22f88b8b9d70160388f0f149bc9abaeb82c250b

This supercedes PR #3646.

5 weeks agoMerge pull request #3954 from facebook/zeroSeq_sample
Yann Collet [Tue, 12 Mar 2024 22:31:01 +0000 (15:31 -0700)] 
Merge pull request #3954 from facebook/zeroSeq_sample

Add the zeroSeq sample

5 weeks agoUpdates `ZSTD_RowFindBestMatch` comment (#3947)
Yonatan Komornik [Tue, 12 Mar 2024 22:10:07 +0000 (15:10 -0700)] 
Updates `ZSTD_RowFindBestMatch` comment (#3947)

Updates the comment on the head of `ZSTD_RowFindBestMatch` to make sure it's aligned with recent changes to the hash table.

5 weeks agoExercise ZSTD_findDecompressedSize() in the simple decompression fuzzer (#3959)
Elliot Gorokhovsky [Tue, 12 Mar 2024 21:07:06 +0000 (17:07 -0400)] 
Exercise ZSTD_findDecompressedSize() in the simple decompression fuzzer (#3959)

* Improve decompression fuzzer

* Fix legacy frame header fuzzer crash, add unit test

5 weeks agofix duplicated paragraph 3958/head
Yann Collet [Tue, 12 Mar 2024 20:09:10 +0000 (13:09 -0700)] 
fix duplicated paragraph

reported by @zougloub

5 weeks agoupdated documentation
Yann Collet [Tue, 12 Mar 2024 19:27:33 +0000 (12:27 -0700)] 
updated documentation

following recommendations by @zougloub at #3698

5 weeks agoExport ZSTD_LEGACY_SUPPORT in tests/Makefile (#3955)
Elliot Gorokhovsky [Tue, 12 Mar 2024 18:36:54 +0000 (14:36 -0400)] 
Export ZSTD_LEGACY_SUPPORT in tests/Makefile (#3955)

This doesn't affect most of the targets, but will help me sleep better at night knowing that future refactors won't break the legacy support.

Should have been included in https://github.com/facebook/zstd/pull/3943 but I noticed after that merged, so putting up a separate PR.

5 weeks agono longer truncate file name in verbose mode 3956/head
Yann Collet [Tue, 12 Mar 2024 18:27:42 +0000 (11:27 -0700)] 
no longer truncate file name in verbose mode

fix #3702

5 weeks agoAdd common file extensions to --exclude-compressed (#3951)
daniellerozenblit [Tue, 12 Mar 2024 17:49:06 +0000 (13:49 -0400)] 
Add common file extensions to --exclude-compressed (#3951)

5 weeks agoremoved golden-decompression/.gitignore 3954/head
Yann Collet [Tue, 12 Mar 2024 17:47:27 +0000 (10:47 -0700)] 
removed golden-decompression/.gitignore

replaced by an exclusion rule in tests/.gitignore

5 weeks agoMerge pull request #3901 from robandpdx-org/convert-facebook-zstd-to-actions
Yann Collet [Tue, 12 Mar 2024 16:54:40 +0000 (09:54 -0700)] 
Merge pull request #3901 from robandpdx-org/convert-facebook-zstd-to-actions

Convert the CircleCI workflow to a GitHub Actions workflow

5 weeks agoMerge pull request #3952 from felixhandte/stop-hardcoding-posix-version-on-bsd
Felix Handte [Tue, 12 Mar 2024 16:49:19 +0000 (12:49 -0400)] 
Merge pull request #3952 from felixhandte/stop-hardcoding-posix-version-on-bsd

Stop Hardcoding the POSIX Version on BSDs

5 weeks agoadd same .gitignore rule in golden-decompression/
Yann Collet [Tue, 12 Mar 2024 16:47:54 +0000 (09:47 -0700)] 
add same .gitignore rule in golden-decompression/

as requested by @embg

5 weeks agoMerge pull request #3933 from facebook/fix3819
Yann Collet [Tue, 12 Mar 2024 16:46:48 +0000 (09:46 -0700)] 
Merge pull request #3933 from facebook/fix3819

prevent XXH64 from being autovectorized by XXH512 by default

5 weeks agoMerge pull request #3934 from facebook/risc5ci
Yann Collet [Tue, 12 Mar 2024 16:46:20 +0000 (09:46 -0700)] 
Merge pull request #3934 from facebook/risc5ci

add RISC-V emulation tests to Github CI

5 weeks agoMerge pull request #3936 from facebook/debug5
Yann Collet [Tue, 12 Mar 2024 16:45:20 +0000 (09:45 -0700)] 
Merge pull request #3936 from facebook/debug5

minor: fix incorrect debug level

5 weeks agoMerge pull request #3942 from facebook/fix3719
Yann Collet [Tue, 12 Mar 2024 16:44:52 +0000 (09:44 -0700)] 
Merge pull request #3942 from facebook/fix3719

Fix #3719 : mixing -c, -o and --rm

5 weeks agoMerge pull request #3946 from facebook/cmake_hpux
Yann Collet [Tue, 12 Mar 2024 16:44:20 +0000 (09:44 -0700)] 
Merge pull request #3946 from facebook/cmake_hpux

cmake refactor: move HP-UX specific logic into its own function

5 weeks agoMerge pull request #3948 from facebook/tests_2927
Yann Collet [Tue, 12 Mar 2024 16:43:59 +0000 (09:43 -0700)] 
Merge pull request #3948 from facebook/tests_2927

add tests inspired from #2927

5 weeks agoAdd the zeroSeq sample
Yann Collet [Tue, 12 Mar 2024 16:28:25 +0000 (09:28 -0700)] 
Add the zeroSeq sample

that should have been part of #3674

5 weeks agoMerge pull request #3937 from facebook/offset0
Yann Collet [Tue, 12 Mar 2024 16:25:06 +0000 (09:25 -0700)] 
Merge pull request #3937 from facebook/offset0

new method to deal with offset==0 erroneous edge case

5 weeks agochore: fix some typos (#3949)
acceptacross [Tue, 12 Mar 2024 15:44:42 +0000 (23:44 +0800)] 
chore: fix some typos (#3949)

Signed-off-by: acceptacross <csqcqs@gmail.com>
5 weeks agoPin tsan and msan CI jobs to ubuntu-20.04 (#3945)
Elliot Gorokhovsky [Tue, 12 Mar 2024 15:25:00 +0000 (11:25 -0400)] 
Pin tsan and msan CI jobs to ubuntu-20.04 (#3945)

5 weeks agoUse ZSTD_LEGACY_SUPPORT=5 in make test (#3943)
Elliot Gorokhovsky [Tue, 12 Mar 2024 14:08:26 +0000 (10:08 -0400)] 
Use ZSTD_LEGACY_SUPPORT=5 in make test (#3943)

5 weeks agoadd tests inspired from #2927 3948/head
Yann Collet [Tue, 12 Mar 2024 00:57:57 +0000 (17:57 -0700)] 
add tests inspired from #2927

centered around -T# and --fast=# arguments

5 weeks agoFix AsyncIO reading seed queueing (#3940)
Yonatan Komornik [Mon, 11 Mar 2024 23:28:32 +0000 (16:28 -0700)] 
Fix AsyncIO reading seed queueing (#3940)

Fixes a bug in AsyncIO where we queue reads after opening a file so our queue will always be saturated (or as saturated as possible).
Previous code was looping up to `availableJobsCount` not realizing `availableJobsCount` was also decreasing in each iteration, so instead of queueing 10 jobs we'd queue 5 (and instead of 2 we'd queue 1).
This PR fixes the loop to queue as long as `availableJobsCount` is not 0.

5 weeks agocmake refactor: move HP-UX specific logic into its own function 3946/head
Yann Collet [Mon, 11 Mar 2024 23:11:15 +0000 (16:11 -0700)] 
cmake refactor: move HP-UX specific logic into its own function

reduce visual clutter of corner case configuration.