Yann Collet
f6039f3d5f
cmake refactor: move HP-UX specific logic into its own function
...
reduce visual clutter of corner case configuration.
2024-03-11 16:22:13 -07:00
Yann Collet
a4db145900
Merge pull request #3862 from likema/fix-hpux-parisc
...
Fix building on HP-UX 11.11 PA-RISC
2024-03-11 15:55:58 -07:00
W. Felix Handte
f99a450ca4
Stop Hardcoding the POSIX Version on BSDs
...
BSDs should all have a `unistd.h` header.
2024-03-11 17:25:51 -04:00
Yann Collet
1362699e87
minor man page clarification
2024-03-11 12:23:37 -07:00
Yann Collet
fbd9e628ae
added tests
2024-03-11 12:17:34 -07:00
Yann Collet
c610a01d7d
fix #3719
...
only disable `--rm` at end of command line parsing,
so that `-c` only disables `--rm` if it's effectively selected,
and not if it's overriden by a later `-o FILE` command.
2024-03-11 11:38:55 -07:00
Yann Collet
372fddf4e6
Merge pull request #3860 from likema/fix-xxhash-aix-51
...
Fix building xxhash on AIX 5.1
2024-03-09 15:34:02 -08:00
Yann Collet
cb596b024f
Merge pull request #3929 from facebook/llu_vscode
...
fix LLU->ULL
2024-03-09 14:24:57 -08:00
Yann Collet
c1875a7386
Merge pull request #3928 from facebook/doc3727
...
update -V documentation
2024-03-09 14:24:38 -08:00
Yann Collet
eb5f7a7fa2
produced golden sample for the offset==0 decoder test
...
is correctly detected as corrupted by new version,
and is accepted (changed into offset==1) by older version.
updated documentation accordingly, with an hexadecimal representation.
2024-03-09 00:33:44 -08:00
Yann Collet
d2f56ba442
update documentation
2024-03-08 15:55:30 -08:00
Yann Collet
a9fb8d4c41
new method to deal with offset==0
...
in this new method, when an `offset==0` is detected,
it's converted into (size_t)(-1), instead of 1.
The logic is that (size_t)(-1) is effectively an extremely large positive number,
which will not pass the offset distance test at next stage (`execSequence()`).
Checked the source code, and offset is always checked (as it should),
using a formula which is not vulnerable to arithmetic overflow:
```
RETURN_ERROR_IF(sequence.offset > (size_t)(oLitEnd - virtualStart),
```
The benefit is that such a case (offset==0) is always detected as corrupted data
as opposed to relying on the checksum to detect the error.
2024-03-08 15:26:06 -08:00
Yann Collet
e127139ceb
Merge pull request #3824 from elasota/specify-zero-offset
...
Specify offset 0 as invalid and specify required fixup behavior
2024-03-08 15:25:48 -08:00
Yann Collet
478e5fedf9
Merge pull request #3816 from elasota/fix-state-table
...
Fix state table formatting
2024-03-08 15:02:00 -08:00
Yann Collet
aed172a8fe
minor: fix incorrect debug level
2024-03-08 14:29:44 -08:00
Yann Collet
ad590275b4
added RISC-V emulation tests on Github CI
2024-03-07 16:54:44 -08:00
Yann Collet
007cda88ca
prevent XXH64 from being autovectorized by XXH512 by default
...
backport fix https://github.com/Cyan4973/xxHash/pull/924 from libxxhash
2024-03-07 16:43:13 -08:00
Yann Collet
8689633fdf
Merge pull request #3840 from aimuz/fix-reserved
...
lib/decompress: check for reserved bit corruption in zstd
2024-03-05 13:40:12 -08:00
Yann Collet
2abe8d63e0
fix LLU->ULL
...
LLU is a correct prefix according to C99 & C11 standards (but not C90).
However, older versions of Visual Studio do not work with it.
Replace by ULL, which doesn't have this issue.
Fixes https://github.com/facebook/zstd/issues/3647
2024-03-04 00:16:01 -08:00
Yann Collet
4fb0a77314
update -V documentation
...
to answer #3727 comment
2024-03-03 23:24:40 -08:00
Yann Collet
b293d2ebc3
Merge pull request #3927 from facebook/dependabot/github_actions/github/codeql-action-3.24.6
...
Bump github/codeql-action from 3.24.5 to 3.24.6
2024-03-03 23:18:03 -08:00
dependabot[bot]
70df177615
Bump github/codeql-action from 3.24.5 to 3.24.6
...
Bumps [github/codeql-action](https://github.com/github/codeql-action ) from 3.24.5 to 3.24.6.
- [Release notes](https://github.com/github/codeql-action/releases )
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md )
- [Commits](47b3d888fe...8a470fddaf
)
---
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 >
2024-03-04 05:34:30 +00:00
Yann Collet
e385c3dd46
Merge pull request #3753 from facebook/make2
...
minor Makefile refactoring
2024-03-03 19:13:00 -08:00
Yann Collet
bb774ae1eb
Merge pull request #3804 from facebook/dependabot/github_actions/ossf/scorecard-action-2.3.1
...
Bump ossf/scorecard-action from 2.2.0 to 2.3.1
2024-03-03 18:57:19 -08:00
Yann Collet
61d89067c9
Merge pull request #3918 from facebook/dependabot/github_actions/github/codeql-action-3.24.5
...
Bump github/codeql-action from 3.23.0 to 3.24.5
2024-03-03 18:56:06 -08:00
Yann Collet
b125202440
Merge pull request #3926 from facebook/checkoutVersion
...
fix version of actions/checkout
2024-03-03 18:54:05 -08:00
Yann Collet
bb4f85db42
fix version of actions/checkout
2024-03-03 18:47:08 -08:00
Yann Collet
063d9f24e2
Merge pull request #3811 from teo-tsirpanis/unified-target
...
Export a `zstd::libzstd` CMake target if only static or dynamic linkage is specified.
2024-03-03 15:04:22 -08:00
Theodore Tsirpanis
b27d1634a5
Merge branch 'dev' into unified-target
2024-02-28 01:25:15 +02:00
Theodore Tsirpanis
dcd713ce06
Define the unified target inside the CMake project, and export it.
...
This is less error-prone.
2024-02-27 23:39:59 +02:00
Yann Collet
a58b48ef0e
Merge pull request #3916 from facebook/no_sprintf
...
removed sprintf usage from zstdcli.c
2024-02-27 13:28:32 -08:00
Yann Collet
34cf4c139e
Merge pull request #3917 from facebook/targetCBlock_moreRegular
...
More regular block sizes with `targetCBlockSize`
2024-02-26 15:38:00 -08:00
Yann Collet
8d31e8ec42
sizeBlockSequences() also tracks uncompressed size
...
and only defines a sub-block boundary when
it believes that it is compressible.
It's effectively an optimization,
avoiding a compression cycle to reach the same conclusion.
2024-02-26 14:31:12 -08:00
Yann Collet
d23b95d21d
minor refactor for clarity
...
since we can ensure that nbSubBlocks>0
2024-02-26 14:06:34 -08:00
Yann Collet
86db60752d
optimization: bail out faster in presence of incompressible data
2024-02-26 13:27:59 -08:00
Yann Collet
ef82b214ad
nit: comment indentation
...
as reported by @terrelln
2024-02-26 13:23:59 -08:00
Yann Collet
aa8592c532
minor: reformulate nbSubBlocks assignment
2024-02-26 13:21:14 -08:00
Yann Collet
e0412c2062
fix extraneous semicolon ';'
...
as reported by @terrelln
2024-02-26 12:26:54 -08:00
dependabot[bot]
a412bedb3f
Bump github/codeql-action from 3.23.0 to 3.24.5
...
Bumps [github/codeql-action](https://github.com/github/codeql-action ) from 3.23.0 to 3.24.5.
- [Release notes](https://github.com/github/codeql-action/releases )
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md )
- [Commits](e5f05b81d5...47b3d888fe
)
---
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 >
2024-02-26 05:59:24 +00:00
Yann Collet
1fafd0c4ae
fix minor visual static analyzer warning
...
it's a false positive,
but change the code nonetheless to make it more obvious to the static analyzer.
2024-02-25 19:45:32 -08:00
Yann Collet
038a8a906b
targetCBlockSize: modified splitting strategy to generate blocks of more regular size
...
notably avoiding to feature a larger first block
2024-02-25 17:39:29 -08:00
Yann Collet
4d2bf7f0f2
removed sprintf usage from zstdcli.c
...
some static analyzers flag this standard C90 function as unsafe.
2024-02-24 23:03:40 -08:00
Yann Collet
5c5c1b0d90
Merge pull request #3915 from facebook/targetCBlockSize
...
Improve speed of ZSTD_c_targetCBlockSize
2024-02-24 18:07:35 -08:00
Yann Collet
f8372191f5
reduced minimum compressed block size
...
with the intention to match the transport layer size,
such as Ethernet and 4G mobile networks.
2024-02-24 01:59:16 -08:00
Yann Collet
f77f634d41
update API documentation
2024-02-24 01:28:17 -08:00
Yann Collet
4b51526412
fix partial block uncompressed
2024-02-24 01:24:58 -08:00
Yann Collet
6719794379
fixed some regressionTests
...
but not all
2024-02-23 18:48:29 -08:00
Yann Collet
0591e7eea1
minor: fix overly cautious conversion warning
2024-02-23 16:05:09 -08:00
Yann Collet
3b40100058
fix long sequences (> 64 KB)
2024-02-23 15:35:12 -08:00
Yann Collet
6b11fc436c
fix issue with incompressible sections
2024-02-23 14:53:56 -08:00