]> git.ipfire.org Git - thirdparty/zstd.git/log
thirdparty/zstd.git
2 years agoBump ossf/scorecard-action from 2.1.3 to 2.2.0 3690/head
dependabot[bot] [Mon, 26 Jun 2023 05:59:43 +0000 (05:59 +0000)] 
Bump ossf/scorecard-action from 2.1.3 to 2.2.0

Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.1.3 to 2.2.0.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](https://github.com/ossf/scorecard-action/compare/80e868c13c90f172d68d1f4501dee99e2479f7af...08b4669551908b1024bb425080c797723083c031)

---
updated-dependencies:
- dependency-name: ossf/scorecard-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2 years agoMerge pull request #3684 from emaste/dev
Yann Collet [Sat, 24 Jun 2023 05:56:07 +0000 (22:56 -0700)] 
Merge pull request #3684 from emaste/dev

Update FreeBSD CI images to latest supported releases

2 years agoUpdate FreeBSD CI images to latest supported releases 3684/head
Ed Maste [Wed, 21 Jun 2023 16:16:26 +0000 (12:16 -0400)] 
Update FreeBSD CI images to latest supported releases

2 years agofixed incorrect test in Win32 pthread wrapper
Yann Collet [Tue, 20 Jun 2023 15:34:26 +0000 (08:34 -0700)] 
fixed incorrect test in Win32 pthread wrapper

reported by @Banzai24-yht in #3683

2 years agoMerge pull request #3676 from facebook/overflow_zeroes
Yann Collet [Fri, 16 Jun 2023 01:16:41 +0000 (18:16 -0700)] 
Merge pull request #3676 from facebook/overflow_zeroes

Bitstream produces only zeroes after an overflow event

2 years agofixed MEM_STATIC already defined in Linux Kernel mode 3676/head
Yann Collet [Thu, 15 Jun 2023 03:03:39 +0000 (20:03 -0700)] 
fixed MEM_STATIC already defined in Linux Kernel mode

2 years agofix : unused attribute for FORCE_INLINE functions
Yann Collet [Wed, 14 Jun 2023 23:32:51 +0000 (16:32 -0700)] 
fix : unused attribute for FORCE_INLINE functions

fix2 : reloadDStreamFast is used by decompress4x2,
modified the entry point, so that it works fine in this case too.

2 years agomake the bitstream generate only 0-value bits after an overflow
Yann Collet [Wed, 14 Jun 2023 22:42:37 +0000 (15:42 -0700)] 
make the bitstream generate only 0-value bits after an overflow

2 years agoMerge pull request #3674 from facebook/zeroSeq_noExtra
Yann Collet [Tue, 13 Jun 2023 23:17:07 +0000 (16:17 -0700)] 
Merge pull request #3674 from facebook/zeroSeq_noExtra

detect extraneous bytes in the Sequences section

2 years agodetect extraneous bytes in the Sequences section 3674/head
Yann Collet [Tue, 13 Jun 2023 18:43:45 +0000 (11:43 -0700)] 
detect extraneous bytes in the Sequences section

when nbSeq == 0.

Reported by @ip7z

2 years agoMerge pull request #3671 from facebook/dependabot/github_actions/actions/checkout...
Yann Collet [Mon, 12 Jun 2023 16:58:53 +0000 (09:58 -0700)] 
Merge pull request #3671 from facebook/dependabot/github_actions/actions/checkout-3.5.3

Bump actions/checkout from 3.5.2 to 3.5.3

2 years agoBump actions/checkout from 3.5.2 to 3.5.3 3671/head
dependabot[bot] [Mon, 12 Jun 2023 06:00:14 +0000 (06:00 +0000)] 
Bump actions/checkout from 3.5.2 to 3.5.3

Bumps [actions/checkout](https://github.com/actions/checkout) from 3.5.2 to 3.5.3.
- [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/8e5e7e5ab8b370d6c329ec480221332ada57f0ab...c85c95e3d7251135ab7dc9ce3241c5835cc595a9)

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

Signed-off-by: dependabot[bot] <support@github.com>
2 years agoMerge pull request #3669 from facebook/zeroSeq_2B
Yann Collet [Tue, 6 Jun 2023 04:06:15 +0000 (00:06 -0400)] 
Merge pull request #3669 from facebook/zeroSeq_2B

fixed decoder behavior when nbSeqs==0 is encoded using 2 bytes

2 years agofixed decoder behavior when nbSeqs==0 is encoded using 2 bytes 3669/head
Yann Collet [Mon, 5 Jun 2023 23:03:00 +0000 (16:03 -0700)] 
fixed decoder behavior when nbSeqs==0 is encoded using 2 bytes

The sequence section starts with a number, which tells how sequences are present in the section.
If this number if 0, the section automatically ends.

The number 0 can be represented using the 1 byte or the 2 bytes formats.
That's because the 2-bytes formats fully overlaps the 1 byte format.

However, when 0 is represented using the 2-bytes format,
the decoder was expecting the sequence section to continue,
and was looking for FSE tables, which is incorrect.

Fixed this behavior, in both the reference decoder and the educational behavior.

In practice, this behavior never happens,
because the encoder will always select the 1-byte format to represent 0,
since this is more efficient.

Completed the fix with a new golden sample for tests,
a clarification of the specification,
and a decoder errata paragraph.

2 years agoMerge pull request #3664 from facebook/llu
Yann Collet [Mon, 5 Jun 2023 19:03:27 +0000 (15:03 -0400)] 
Merge pull request #3664 from facebook/llu

changed LLU suffix into ULL for Visual 2012 and lower

2 years agoMerge pull request #3659 from facebook/fixHarness
Yann Collet [Mon, 5 Jun 2023 19:03:14 +0000 (15:03 -0400)] 
Merge pull request #3659 from facebook/fixHarness

Fixed a bug in the educational decoder

2 years agoMerge pull request #3668 from facebook/fix3667
Yann Collet [Mon, 5 Jun 2023 19:02:55 +0000 (15:02 -0400)] 
Merge pull request #3668 from facebook/fix3667

fix a minor inefficiency in compress_superblock

2 years agofix a minor inefficiency in compress_superblock 3668/head
Yann Collet [Mon, 5 Jun 2023 16:51:52 +0000 (09:51 -0700)] 
fix a minor inefficiency in compress_superblock

and in `decodecorpus`:
the specific case `nbSeq=127` can be represented using the 1-byte format.
Note that both the 1-byte and the 2-bytes formats are valid to represent this case,
so there was no "error", produced data remains valid,
it's just that the 1-byte format is more efficient.

fix #3667

Credit to @ip7z for finding this issue.

2 years agochanged LLU suffix into ULL for Visual 2012 and lower 3664/head
Yann Collet [Wed, 31 May 2023 20:29:53 +0000 (13:29 -0700)] 
changed LLU suffix into ULL for Visual 2012 and lower

both suffixes are supposed to be valid,
but for some reason, Visual 2012 and lower only support ULL.

2 years agoFixed a bug in the educational decoder 3659/head
Yann Collet [Sat, 27 May 2023 18:22:30 +0000 (11:22 -0700)] 
Fixed a bug in the educational decoder

Credit to Igor Pavlov

2 years agoAdd options in Makefile to cmake
Tao He [Thu, 25 May 2023 14:48:01 +0000 (22:48 +0800)] 
Add options in Makefile to cmake

Signed-off-by: Tao He <sighingnow@gmail.com>
2 years agoFix UBSAN issue (zero addition to NULL)
Nick Terrell [Thu, 25 May 2023 21:35:49 +0000 (14:35 -0700)] 
Fix UBSAN issue (zero addition to NULL)

Fix UBSAN issue that came up internally.

2 years agoMerge pull request #3631 from facebook/example_streaming_mt
Yann Collet [Wed, 24 May 2023 00:38:28 +0000 (20:38 -0400)] 
Merge pull request #3631 from facebook/example_streaming_mt

minor : update streaming_compression example

2 years agoGet zstd working with ARM64EC on Windows
Duncan Horn [Mon, 1 May 2023 21:29:52 +0000 (14:29 -0700)] 
Get zstd working with ARM64EC on Windows

2 years agoMerge pull request #3623 from felixhandte/compile-out-compressors
Felix Handte [Mon, 22 May 2023 21:38:10 +0000 (17:38 -0400)] 
Merge pull request #3623 from felixhandte/compile-out-compressors

Allow Build-Time Exclusion of Individual Compression Strategies

2 years agoReorder Definitions in zstd_opt.c to Group Under Macro Guards (Slightly) 3623/head
W. Felix Handte [Mon, 22 May 2023 16:41:48 +0000 (12:41 -0400)] 
Reorder Definitions in zstd_opt.c to Group Under Macro Guards (Slightly)

2 years agoReorder Definitions in zstd_lazy.c to Group Under Macro Guards
W. Felix Handte [Mon, 22 May 2023 16:37:03 +0000 (12:37 -0400)] 
Reorder Definitions in zstd_lazy.c to Group Under Macro Guards

2 years agoAlso Allow/Document/Test Excluding dfast and Up
W. Felix Handte [Thu, 4 May 2023 16:31:41 +0000 (12:31 -0400)] 
Also Allow/Document/Test Excluding dfast and Up

2 years agoAdd Documentation to lib/README.md
W. Felix Handte [Thu, 4 May 2023 16:20:02 +0000 (12:20 -0400)] 
Add Documentation to lib/README.md

2 years agoAlso Reorganize Zstd Opt Declarations
W. Felix Handte [Mon, 24 Apr 2023 20:53:30 +0000 (16:53 -0400)] 
Also Reorganize Zstd Opt Declarations

2 years agoRemove blockCompressor NULL Checks
W. Felix Handte [Mon, 24 Apr 2023 18:50:54 +0000 (14:50 -0400)] 
Remove blockCompressor NULL Checks

2 years agoAbort if Unsupported Parameters Used
W. Felix Handte [Mon, 24 Apr 2023 15:50:01 +0000 (11:50 -0400)] 
Abort if Unsupported Parameters Used

2 years agoRe-Order Lazy Declarations; Minimize ifndefs
W. Felix Handte [Mon, 24 Apr 2023 14:40:52 +0000 (10:40 -0400)] 
Re-Order Lazy Declarations; Minimize ifndefs

2 years agoAdd CI Test for Excluding Matchfinders
W. Felix Handte [Fri, 21 Apr 2023 20:14:27 +0000 (16:14 -0400)] 
Add CI Test for Excluding Matchfinders

2 years agoAdd ZSTD_LIB_EXCLUDE_COMPRESSORS_DFAST_AND_UP Build Variable
W. Felix Handte [Fri, 21 Apr 2023 20:14:11 +0000 (16:14 -0400)] 
Add ZSTD_LIB_EXCLUDE_COMPRESSORS_DFAST_AND_UP Build Variable

2 years agoDefine Macros for Possibly-Present Functions; Use Them Rather than Ifdef Guards
W. Felix Handte [Fri, 21 Apr 2023 15:32:41 +0000 (11:32 -0400)] 
Define Macros for Possibly-Present Functions; Use Them Rather than Ifdef Guards

2 years agoMerge Ultra and Ultra2 Exclusion
W. Felix Handte [Thu, 20 Apr 2023 15:53:23 +0000 (11:53 -0400)] 
Merge Ultra and Ultra2 Exclusion

Ultra2 does not exist for dict compression, and so uses ultra. So ultra must
be present if ultra2 is.

2 years agoTweak Ultra/Opt Guards
W. Felix Handte [Thu, 20 Apr 2023 15:46:29 +0000 (11:46 -0400)] 
Tweak Ultra/Opt Guards

2 years agoAvoid Ratio Regression Tests When Compressors are Excluded
W. Felix Handte [Thu, 20 Apr 2023 15:46:04 +0000 (11:46 -0400)] 
Avoid Ratio Regression Tests When Compressors are Excluded

2 years agoAdjust Strategy in CParams to Avoid Using Excluded Block Compressors
W. Felix Handte [Wed, 19 Apr 2023 21:53:40 +0000 (17:53 -0400)] 
Adjust Strategy in CParams to Avoid Using Excluded Block Compressors

2 years agoMacro-Exclude Block Compressors from Declaration/Definition
W. Felix Handte [Wed, 19 Apr 2023 19:38:04 +0000 (15:38 -0400)] 
Macro-Exclude Block Compressors from Declaration/Definition

2 years agoNULL Out Block Compressor Table Entries When Excluded
W. Felix Handte [Wed, 19 Apr 2023 16:19:56 +0000 (12:19 -0400)] 
NULL Out Block Compressor Table Entries When Excluded

Don't check about excluding `ZSTD_fast`. It's always included so that we know
we can resolve downwards and hit a strategy that's present.

2 years agoAllow `ZSTD_selectBlockCompressor()` to Return NULL
W. Felix Handte [Wed, 19 Apr 2023 15:41:51 +0000 (11:41 -0400)] 
Allow `ZSTD_selectBlockCompressor()` to Return NULL

Return an error rather than segfaulting.

2 years agoMerge pull request #3634 from facebook/dependabot/github_actions/github/codeql-action... 3645/head
Felix Handte [Mon, 1 May 2023 15:06:07 +0000 (08:06 -0700)] 
Merge pull request #3634 from facebook/dependabot/github_actions/github/codeql-action-2.3.2

Bump github/codeql-action from 2.3.0 to 2.3.2

2 years agoBump github/codeql-action from 2.3.0 to 2.3.2 3634/head
dependabot[bot] [Mon, 1 May 2023 06:04:02 +0000 (06:04 +0000)] 
Bump github/codeql-action from 2.3.0 to 2.3.2

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.3.0 to 2.3.2.
- [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/b2c19fb9a2a485599ccf4ed5d65527d94bc57226...f3feb00acb00f31a6f60280e6ace9ca31d91c76a)

---
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>
2 years agominor : update streaming_compression example 3631/head
Yann Collet [Wed, 26 Apr 2023 19:45:23 +0000 (12:45 -0700)] 
minor : update streaming_compression example

display a warning when requesting multi-threading
while linking to a library that doesn't support multi-threading.

2 years agoMerge pull request #3629 from facebook/dependabot/github_actions/github/codeql-action...
Elliot Gorokhovsky [Wed, 26 Apr 2023 02:58:25 +0000 (22:58 -0400)] 
Merge pull request #3629 from facebook/dependabot/github_actions/github/codeql-action-2.3.0

Bump github/codeql-action from 2.2.11 to 2.3.0

2 years agoBump github/codeql-action from 2.2.11 to 2.3.0 3629/head
dependabot[bot] [Mon, 24 Apr 2023 06:03:24 +0000 (06:03 +0000)] 
Bump github/codeql-action from 2.2.11 to 2.3.0

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.2.11 to 2.3.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/d186a2a36cc67bfa1b860e6170d37fb9634742c7...b2c19fb9a2a485599ccf4ed5d65527d94bc57226)

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

Signed-off-by: dependabot[bot] <support@github.com>
2 years agoMerge pull request #3624 from danlark1/patch-4
Yann Collet [Thu, 20 Apr 2023 17:46:20 +0000 (10:46 -0700)] 
Merge pull request #3624 from danlark1/patch-4

Disable unused variable warning in msan configurations

2 years agoDisable unused variable warning in msan configurations 3624/head
Daniel Kutenin [Thu, 20 Apr 2023 10:14:08 +0000 (11:14 +0100)] 
Disable unused variable warning in msan configurations

2 years agoMerge pull request #3614 from mredig/darwin-fat
Yann Collet [Wed, 19 Apr 2023 22:06:36 +0000 (15:06 -0700)] 
Merge pull request #3614 from mredig/darwin-fat

add makefile entry to build fat binary on macos

2 years agoMerge pull request #3620 from facebook/errata_128k
Yann Collet [Wed, 19 Apr 2023 18:31:16 +0000 (11:31 -0700)] 
Merge pull request #3620 from facebook/errata_128k

[doc] add decoder errata paragraph

2 years agoadded golden file for the new decompressor erratum 3620/head
Yann Collet [Wed, 19 Apr 2023 07:24:35 +0000 (00:24 -0700)] 
added golden file for the new decompressor erratum

2 years agoAdd ZSTD_d_maxBlockSize parameter
Nick Terrell [Sat, 15 Apr 2023 00:06:24 +0000 (17:06 -0700)] 
Add ZSTD_d_maxBlockSize parameter

Reduces memory when blocks are guaranteed to be smaller than allowed by
the format. This is useful for streaming compression in conjunction with
ZSTD_c_maxBlockSize.

This PR saves 2 * (formatMaxBlockSize - paramMaxBlockSize) when streaming.
Once it is rebased on top of PR #3616 it will save
3 * (formatMaxBlockSize - paramMaxBlockSize).

2 years agoMerge pull request #3621 from facebook/remove_CIs
Yann Collet [Tue, 18 Apr 2023 00:54:40 +0000 (17:54 -0700)] 
Merge pull request #3621 from facebook/remove_CIs

removed travis & appveyor scripts

2 years agoReduce streaming decompression memory by 128KB
Nick Terrell [Fri, 14 Apr 2023 21:27:06 +0000 (14:27 -0700)] 
Reduce streaming decompression memory by 128KB

The split literals buffer patch increased streaming decompression memory
by 64KB (shrunk lit buffer from 128KB to 64KB, and added 128KB). This
patch removes the added 128KB buffer, because it isn't necessary.

The buffer was there because the literals compression code didn't know
the true `blockSizeMax` of the frame, and always put split literals so
they ended 128KB - 32 from the beginning of the block. Instead, we can
pass down the true `blockSizeMax` and ensure that the split literals
end up at `blockSizeMax - 32` from the beginning of the block. We
already reserve a full `blockSizeMax` bytes in streaming mode, so we
won't be overwriting the extDict window.

2 years agoremoved travis & appveyor scripts 3621/head
Yann Collet [Mon, 17 Apr 2023 22:50:31 +0000 (15:50 -0700)] 
removed travis & appveyor scripts

we don't employ these CI systems anymore

2 years agoadded decoder errata paragraph
Yann Collet [Mon, 17 Apr 2023 22:43:27 +0000 (15:43 -0700)] 
added decoder errata paragraph

for compressed blocks of size exactly 128 KB
which used to be disallowed by the spec
but have become allowed in more recent version of the spec.

While this limitation is fixed in decoders v1.5.4+,
implementers should refrain from generating such block with their custom encoder
as they could be misclassified as corrupted by older decoder versions.

2 years agoMerge pull request #3619 from facebook/dependabot/github_actions/actions/checkout...
Yann Collet [Mon, 17 Apr 2023 06:50:36 +0000 (23:50 -0700)] 
Merge pull request #3619 from facebook/dependabot/github_actions/actions/checkout-3.5.2

Bump actions/checkout from 3.5.0 to 3.5.2

2 years agoBump actions/checkout from 3.5.0 to 3.5.2 3619/head
dependabot[bot] [Mon, 17 Apr 2023 06:02:27 +0000 (06:02 +0000)] 
Bump actions/checkout from 3.5.0 to 3.5.2

Bumps [actions/checkout](https://github.com/actions/checkout) from 3.5.0 to 3.5.2.
- [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/8f4b7f84864484a7bf31766abe9204da3cbe65b3...8e5e7e5ab8b370d6c329ec480221332ada57f0ab)

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

Signed-off-by: dependabot[bot] <support@github.com>
2 years agoadd makefile entry to build fat binary on macos 3614/head
Michael Redig [Thu, 13 Apr 2023 23:43:06 +0000 (18:43 -0500)] 
add makefile entry to build fat binary on macos

2 years ago[oss-fuzz] Fix simple_round_trip fuzzer with overlapping decompression
Nick Terrell [Wed, 12 Apr 2023 23:00:28 +0000 (16:00 -0700)] 
[oss-fuzz] Fix simple_round_trip fuzzer with overlapping decompression

When `ZSTD_c_maxBlockSize` is set, we weren't computing the
decompression margin correctly, leading to `dstSize_tooSmall` errors.
Fix that computation.

This is just a bug in the fuzzer, not a bug in the library itself.

Credit to OSS-Fuzz

2 years agoMerge pull request #3606 from facebook/dependabot/github_actions/github/codeql-action...
Felix Handte [Mon, 10 Apr 2023 15:32:54 +0000 (08:32 -0700)] 
Merge pull request #3606 from facebook/dependabot/github_actions/github/codeql-action-2.2.11

Bump github/codeql-action from 2.2.9 to 2.2.11

2 years agoMerge pull request #3607 from facebook/dependabot/github_actions/cygwin/cygwin-instal...
Yann Collet [Mon, 10 Apr 2023 08:30:20 +0000 (01:30 -0700)] 
Merge pull request #3607 from facebook/dependabot/github_actions/cygwin/cygwin-install-action-4

Bump cygwin/cygwin-install-action from 3 to 4

2 years agoBump cygwin/cygwin-install-action from 3 to 4 3607/head
dependabot[bot] [Mon, 10 Apr 2023 06:00:18 +0000 (06:00 +0000)] 
Bump cygwin/cygwin-install-action from 3 to 4

Bumps [cygwin/cygwin-install-action](https://github.com/cygwin/cygwin-install-action) from 3 to 4.
- [Release notes](https://github.com/cygwin/cygwin-install-action/releases)
- [Commits](https://github.com/cygwin/cygwin-install-action/compare/f5e0f048310c425e84bc789f493a828c6dc80a25...006ad0b0946ca6d0a3ea2d4437677fa767392401)

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

Signed-off-by: dependabot[bot] <support@github.com>
2 years agoBump github/codeql-action from 2.2.9 to 2.2.11 3606/head
dependabot[bot] [Mon, 10 Apr 2023 06:00:15 +0000 (06:00 +0000)] 
Bump github/codeql-action from 2.2.9 to 2.2.11

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.2.9 to 2.2.11.
- [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/04df1262e6247151b5ac09cd2c303ac36ad3f62b...d186a2a36cc67bfa1b860e6170d37fb9634742c7)

---
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>
2 years agoAdd new line + [no-] to mmap-dict help output (#3601)
daniellerozenblit [Thu, 6 Apr 2023 17:01:58 +0000 (13:01 -0400)] 
Add new line + [no-] to mmap-dict help output (#3601)

2 years agoMerge pull request #3600 from Kim-SSi/dev
Yann Collet [Wed, 5 Apr 2023 16:27:11 +0000 (09:27 -0700)] 
Merge pull request #3600 from Kim-SSi/dev

Add win32 to windows-artifacts.yml

2 years agoChange to use strategy.matrix 3600/head
Kim [Wed, 5 Apr 2023 08:22:29 +0000 (20:22 +1200)] 
Change to use strategy.matrix

2 years agoAdd win32 to windows-artifacts.yml
Kim [Wed, 5 Apr 2023 06:35:58 +0000 (18:35 +1200)] 
Add win32 to windows-artifacts.yml

2 years agoMerge pull request #3587 from facebook/dependabot/github_actions/github/codeql-action...
Yann Collet [Tue, 4 Apr 2023 23:53:55 +0000 (16:53 -0700)] 
Merge pull request #3587 from facebook/dependabot/github_actions/github/codeql-action-2.2.9

Bump github/codeql-action from 2.2.8 to 2.2.9

2 years agoMerge pull request #3588 from facebook/dependabot/github_actions/ossf/scorecard-actio...
Yann Collet [Tue, 4 Apr 2023 23:53:28 +0000 (16:53 -0700)] 
Merge pull request #3588 from facebook/dependabot/github_actions/ossf/scorecard-action-2.1.3

Bump ossf/scorecard-action from 2.1.2 to 2.1.3

2 years agoMerge pull request #3593 from facebook/appvbadge 3595/head
Yann Collet [Tue, 4 Apr 2023 01:25:06 +0000 (18:25 -0700)] 
Merge pull request #3593 from facebook/appvbadge

removed Appveyor Badge

2 years agoMerge pull request #3592 from facebook/overRead_magicless
Yann Collet [Tue, 4 Apr 2023 00:46:37 +0000 (17:46 -0700)] 
Merge pull request #3592 from facebook/overRead_magicless

fix potential over-reads

2 years agoremoved Appveyor Badge 3593/head
Yann Collet [Tue, 4 Apr 2023 00:40:39 +0000 (17:40 -0700)] 
removed Appveyor Badge

as we don't use Appveyor CI anymore.

2 years agofixing potential over-reads 3592/head
Yann Collet [Mon, 3 Apr 2023 23:52:32 +0000 (16:52 -0700)] 
fixing potential over-reads

detected by @terrelln,
these issue could be triggered in specific scenarios
namely decompression of certain invalid magic-less frames,
or requested properties from certain invalid skippable frames.

2 years agoMerge pull request #3591 from felixhandte/win-rel-artifact-name 3590/head
Felix Handte [Mon, 3 Apr 2023 20:46:17 +0000 (13:46 -0700)] 
Merge pull request #3591 from felixhandte/win-rel-artifact-name

Rename/Restructure Windows Release Artifact

2 years agoRename/Restructure Windows Release Artifact 3591/head
W. Felix Handte [Mon, 3 Apr 2023 19:00:05 +0000 (15:00 -0400)] 
Rename/Restructure Windows Release Artifact

https://github.com/facebook/zstd/releases/tag/v1.5.0 describes the structure
we want to adhere to. This commit tries to accomplish that automatically, so
we can avoid manual fixups on future releases.

2 years agoMerge pull request #3589 from facebook/fix3583
Yann Collet [Mon, 3 Apr 2023 17:58:49 +0000 (10:58 -0700)] 
Merge pull request #3589 from facebook/fix3583

fix #3583

2 years agofix #3583 3589/head
Yann Collet [Mon, 3 Apr 2023 16:45:11 +0000 (09:45 -0700)] 
fix #3583

As reported by @georgmu,
the previous fix is undone by the later initialization.
Switch order, so that initialization is adjusted by special case.

2 years agoBump ossf/scorecard-action from 2.1.2 to 2.1.3 3588/head
dependabot[bot] [Mon, 3 Apr 2023 06:00:58 +0000 (06:00 +0000)] 
Bump ossf/scorecard-action from 2.1.2 to 2.1.3

Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.1.2 to 2.1.3.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](https://github.com/ossf/scorecard-action/compare/e38b1902ae4f44df626f11ba0734b14fb91f8f86...80e868c13c90f172d68d1f4501dee99e2479f7af)

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

Signed-off-by: dependabot[bot] <support@github.com>
2 years agoBump github/codeql-action from 2.2.8 to 2.2.9 3587/head
dependabot[bot] [Mon, 3 Apr 2023 06:00:54 +0000 (06:00 +0000)] 
Bump github/codeql-action from 2.2.8 to 2.2.9

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.2.8 to 2.2.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/67a35a08586135a9573f4327e904ecbf517a882d...04df1262e6247151b5ac09cd2c303ac36ad3f62b)

---
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>
2 years agoupdated changelog 3585/head
Yann Collet [Thu, 30 Mar 2023 00:20:15 +0000 (17:20 -0700)] 
updated changelog

in preparation for v1.5.5

2 years agoupdated version number to v1.5.5
Yann Collet [Tue, 28 Mar 2023 23:43:33 +0000 (16:43 -0700)] 
updated version number to v1.5.5

also : updated man pages

2 years agoMerge pull request #3584 from facebook/fix_o_blockdev
Yann Collet [Sat, 1 Apr 2023 06:01:50 +0000 (23:01 -0700)] 
Merge pull request #3584 from facebook/fix_o_blockdev

fix decompression with -o writing into a block device

2 years agoCheck that `dest` is valid for decompression (#3555)
daniellerozenblit [Sat, 1 Apr 2023 06:00:55 +0000 (02:00 -0400)] 
Check that `dest` is valid for decompression (#3555)

* add check for valid dest buffer and fuzz on random dest ptr when malloc 0

* add uptrval to linux-kernel

* remove bin files

* get rid of uptrval

* restrict max pointer value check to platforms where sizeof(size_t) == sizeof(void*)

2 years agodo not add invocation of UTIL_isRegularFile() 3584/head
Yann Collet [Fri, 31 Mar 2023 20:09:52 +0000 (13:09 -0700)] 
do not add invocation of UTIL_isRegularFile()

2 years agoMerge pull request #3581 from facebook/seekable_readOpt
Yann Collet [Fri, 31 Mar 2023 19:26:16 +0000 (12:26 -0700)] 
Merge pull request #3581 from facebook/seekable_readOpt

Seekable format read optimization

2 years agoMerge pull request #3579 from facebook/clangclwintest
Yann Collet [Fri, 31 Mar 2023 19:26:01 +0000 (12:26 -0700)] 
Merge pull request #3579 from facebook/clangclwintest

added a Clang-CL Windows test to CI

2 years agoMerge pull request #3540 from dvoropaev/tests_timeout
Yann Collet [Fri, 31 Mar 2023 19:25:38 +0000 (12:25 -0700)] 
Merge pull request #3540 from dvoropaev/tests_timeout

Increase tests timeout

2 years agoMerge pull request #3576 from zhuhan0/dev
Yann Collet [Fri, 31 Mar 2023 19:25:13 +0000 (12:25 -0700)] 
Merge pull request #3576 from zhuhan0/dev

Couple tweaks to improve decompression speed with clang PGO compilation

2 years agofix decompression with -o writing into a block device
Yann Collet [Fri, 31 Mar 2023 18:13:52 +0000 (11:13 -0700)] 
fix decompression with -o writing into a block device

decompression features automatic support of sparse files,
aka a form of "compression" where entire blocks consists only of zeroes.
This only works for some compatible file systems (like ext4),
others simply ignore it (like afs).

Triggering this feature relies of `fseek()`.
But `fseek()` is not compatible with non-seekable devices, such as pipes.
Therefore it's disabled for pipes.

However, there are other objects which are not compatible with `fseek()`, such as block devices.

Changed the logic, so that `fseek()` (and therefore sparse write) is only automatically enabled on regular files.

Note that this automatic behavior can always be overridden by explicit commands `--sparse` and `--no-sparse`.

fix #3583

2 years agoseekable_format: Add unit test for multiple decompress calls 3581/head
Yoni Gilad [Tue, 22 Mar 2022 16:24:09 +0000 (18:24 +0200)] 
seekable_format: Add unit test for multiple decompress calls

This does the following:
1. Compress test data into multiple frames
2. Perform a series of small decompressions and seeks forward, checking
   that compressed data wasn't reread unnecessarily.
3. Perform some seeks forward and backward to ensure correctness.

2 years agoseekable_format: Prevent rereading frame when seeking forward
Yoni Gilad [Thu, 17 Feb 2022 17:46:29 +0000 (19:46 +0200)] 
seekable_format: Prevent rereading frame when seeking forward

When decompressing a seekable file, if seeking forward within
a frame (by issuing multiple ZSTD_seekable_decompress calls
with a small gap between them), the frame will be unnecessarily
reread from the beginning. This patch makes it continue using
the current frame data and simply skip over the unneeded bytes.

2 years agoadded a Clang-CL Windows test to CI 3579/head
Yann Collet [Wed, 29 Mar 2023 00:37:23 +0000 (17:37 -0700)] 
added a Clang-CL Windows test to CI

If I understand correctly,
this should trigger the issue notified in #3569.

2 years agoMerge pull request #3569 from tru/linker_flag_fix
Yann Collet [Wed, 29 Mar 2023 05:05:07 +0000 (22:05 -0700)] 
Merge pull request #3569 from tru/linker_flag_fix

Disable linker flag detection on MSVC/ClangCL.

2 years agoMerge pull request #3573 from facebook/dependabot/github_actions/github/codeql-action...
Yann Collet [Tue, 28 Mar 2023 23:59:41 +0000 (16:59 -0700)] 
Merge pull request #3573 from facebook/dependabot/github_actions/github/codeql-action-2.2.8

Bump github/codeql-action from 2.2.6 to 2.2.8

2 years agommap for windows (#3557)
daniellerozenblit [Tue, 28 Mar 2023 23:44:53 +0000 (19:44 -0400)] 
mmap for windows (#3557)

* mmap for windows

* remove enabling mmap for testing

* rename FIO dictionary initialization methods + un-const dictionary objects in free functions

* remove enabling mmap for testing

* initDict returns void, underlying setDictBuffer methods return the size of the set buffer

* fix comment

2 years agoRemove clang-only branch hints from ZSTD_decodeSequence 3576/head
Han Zhu [Tue, 28 Mar 2023 21:33:50 +0000 (14:33 -0700)] 
Remove clang-only branch hints from ZSTD_decodeSequence

Looking at the __builtin_expect in ZSTD_decodeSequence:

{   size_t offset;
    #if defined(__clang__)
 if (LIKELY(ofBits > 1)) {
    #else
 if (ofBits > 1) {
    #endif
 ZSTD_STATIC_ASSERT(ZSTD_lo_isLongOffset == 1);

From profile-annotated assembly, the probability of ofBits > 1 is about 75%
(101k counts out of 135k counts). This is much smaller than the recommended
likelihood to use __builtin_expect which is 99%. As a result, clang moved the
else block further away which hurts cache locality. Removing this
__built_expect along with two others in ZSTD_decodeSequence gave better
performance when PGO is enabled. I suggest to remove these branch hints and
rely on PGO which leverages runtime profiles from actual workload to calculate
branch probability instead.

2 years agoInline BIT_reloadDStream
Han Zhu [Mon, 27 Mar 2023 22:57:55 +0000 (15:57 -0700)] 
Inline BIT_reloadDStream

Inlining `BIT_reloadDStream` provided >3% decompression speed improvement for
clang PGO-optimized zstd binary, measured using the Silesia corpus with
compression level 1. The win comes from improved register allocation which leads
to fewer spills and reloads. Take a look at this comparison of
profile-annotated hot assembly before and after this change:
https://www.diffchecker.com/UjDGIyLz/. The diff is a bit messy, but notice three
fewer moves after inlining.

In general LLVM's register allocator works better when it can see more code. For
example, when the register allocator sees a call instruction, it partitions the
registers into caller registers and callee registers, and it is not free to do
whatever it wants with all the registers for the current function. Inlining the
callee lets the register allocation access all registers and use them more
flexsibly.