Commit Graph

8495 Commits (f9802d80a0d53797f19152334893ec63ade0089c)

Author SHA1 Message Date
Thomas Waldmann f9802d80a0 fix typos (work done by Andrea Gelmini) 2021-01-07 18:47:23 +01:00
Yann Collet f011f639de
Merge pull request #2454 from facebook/cycleLog_noDeps
removed internal library dependency from CLI
2021-01-06 15:30:05 -08:00
Yann Collet 0d793a675a removed internal dependency from CLI
ZSTD_cycleLog() is a very short function,
creating a rather large dependency onto libzstd's internal just for it is overkill.
Prefer duplicating this 2-lines function.

This PR makes the zstd CLI one step closer to being linkable to the dynamic library (see #2450)
More steps are still needed to reach this goal.
2021-01-06 01:35:52 -08:00
Nick Terrell a077a6a0a9
Merge pull request #2451 from terrelln/adjust-dict-2
Don't shrink window log when streaming with a dictionary
2021-01-04 22:27:30 -05:00
Nick Terrell 58476bcf7f Don't shrink window log in ZSTD_getCParams()
Treat ZSTD_getCParams() and ZSTD_adjustCParams() in the same way
we treat streaming compression. Choose parameters based on the
dictionary size + source size, and assume the source size is small
if unkown. But, don't shrink the window log down in
ZSTD_adjustCParams_internal().
2021-01-04 15:54:09 -08:00
Nick Terrell 9d31c704d5 Don't shrink window log when streaming with a dictionary
Fixes #2442.

1. When creating a dictionary keep the same behavior as before.
   Assume the source size is 513 bytes when adjusting parameters.
2. When calling ZSTD_getCParams() or ZSTD_adjustCParams() keep
   the same behavior as before.
3. When attaching a dictionary keep the same behavior of ignoring
   the dictionary size. When streaming this will select the
   largest parameters and not adjust them down. But, the CDict
   will use the correctly sized parameters, which seems like the
   right tradeoff.
4. When not attaching a dictionary (either forced not to, or
   using a prefix dictionary) we select parameters based on the
   dictionary size + source size, and assume the source size is
   small, which is the same behavior as before. But, now we don't
   adjust the window log (and hash and chain log) down when the
   source size is unknown.

When the source size is unknown all cdicts should attach, except
when the user disables attaching, or `forceWindow` is used. This
means that when streaming with a CDict we end up in the good case
where we get small CDict parameters, and large source parameters.

TODO: Add a streaming + dictionary regression test case.
2021-01-04 15:54:09 -08:00
Nick Terrell a98a6e2091 [test][regression] Add no source size with dictionary test
* Add a test that runs without a pledgedSrcSize and with a dictionary.
* Add github.tar data with uses the github dictionary while compressing
  github.tar, instead of each file individually.
2021-01-04 15:54:09 -08:00
Nick Terrell e856052576
Merge pull request #2452 from terrelln/2021
[license] Update year to 2021
2021-01-04 18:23:18 -05:00
Nick Terrell 66e811d782 [license] Update year to 2021 2021-01-04 17:53:52 -05:00
Yann Collet bc0a1e4d59
Merge pull request #2445 from facebook/nomsanfuzz
remove flackey msan ossfuzz test
2021-01-03 10:41:55 -08:00
Yann Collet a0835b5bab Merge branch 'dev' into nomsanfuzz 2020-12-29 11:45:42 -08:00
Yann Collet ff2f888d56 fixed one more minor cast issue
can't use address calculation with `void*`
2020-12-29 11:44:37 -08:00
Yann Collet 3fd21d5438 Merge branch 'dev' into nomsanfuzz 2020-12-28 14:08:45 -08:00
Yann Collet 7f8be046b9 fixed minor warnings introduced in #2439 2020-12-28 14:07:31 -08:00
Yann Collet cfff4c1cd5
Merge pull request #2439 from senhuang42/skippable_frame_api
Generate skippable frame API
2020-12-28 11:22:07 -08:00
Yann Collet 603829d3d2
Merge pull request #2444 from indygreg/dict-ifndef-guards
Add ifndef guards for _LARGEFILE_SOURCE and _LARGEFILE64_SOURCE
2020-12-28 11:19:58 -08:00
Yann Collet f1585fefa2 remove flackey msan ossfuzz test
while waiting for it to be fixed
2020-12-28 11:18:58 -08:00
Gregory Szorc dd1a7e41ee Add ifndef guards for _LARGEFILE_SOURCE and _LARGEFILE64_SOURCE
This ensures the symbols aren't redefined, which would result in a compiler
error.

I was getting redefined symbols for _LARGEFILE64_SOURCE when building for
32-bit x86 Linux on an older CentOS release in a CI environment. With this
change, I'm able to compile the single file library in this environment.

Closes #2443.
2020-12-26 10:02:45 -07:00
Yann Collet d4f7d75f84
Merge pull request #2438 from facebook/makej
try to keep libzstd.a "as is" once created
2020-12-22 00:31:38 -08:00
Yann Collet 20afffefbc
Merge pull request #2440 from facebook/fixga32
try to fix 32-bit test on github actions
2020-12-21 16:26:50 -08:00
Yann Collet f1225b186e try to fix 32-bit test on github actions
for some reasons, this test fails at _installing_ 32-bit dependencies
using the exact same command that actually works in other tests !!?

It's unclear why it fails repeateadly for this test only.
Try another way to install dependencies to fix that.
2020-12-21 15:47:20 -08:00
Yann Collet f2ac2b7bcf try to fix cross-compiler tests 2020-12-21 15:43:14 -08:00
Yann Collet 8429525de0
Merge pull request #2437 from facebook/zlibwrap_make
streamline zlibwrapper makefile
2020-12-21 09:13:33 -08:00
senhuang42 5c41490bfe Use pre-defined constants 2020-12-21 11:52:05 -05:00
senhuang42 339d8ba103 Add unit test 2020-12-21 11:33:27 -05:00
senhuang42 7e11bd012b Implement skippable frame function 2020-12-21 11:13:22 -05:00
Yann Collet 585196353d fix ppc64 build on circleci 2020-12-20 21:44:40 -08:00
Yann Collet 8233f55df8 verbose cross-compile tests on circleci
for better diagnosis
2020-12-20 21:31:58 -08:00
Yann Collet 52aa7f47dd updated clang+msan test 2020-12-20 18:29:36 -08:00
Yann Collet 9a9d3f76c4 fixed zstd+sanitizer build 2020-12-20 17:53:04 -08:00
Yann Collet f9884036c2 fixed zstd recipe 2020-12-20 17:19:23 -08:00
Yann Collet 9648bf027b try to keep libzstd.a "as is" once created
to be compatible with scenarios such as
`make -j allmost`
2020-12-20 17:10:57 -08:00
Yann Collet eacf1b3bc3 streamlined github action test 2020-12-20 15:03:59 -08:00
Yann Collet f78917cdd3 streamline zlibwrapper makefile
making better usage of default build rules
2020-12-20 12:53:30 -08:00
Yann Collet 7c495e8ea2 updated version number to v1.4.8 2020-12-18 15:52:11 -08:00
Yann Collet ceadfa2444
Merge pull request #2434 from facebook/wksp_align4
added emphasis on the alignment condition of workspace
2020-12-18 15:39:12 -08:00
Yann Collet a7cb4af573 added emphasis on the alignment condition of workspace
and made it a programming mistake (`assert()`)
rather than a runtime error.
2020-12-18 15:04:09 -08:00
Yann Collet 87dcf71115
Merge pull request #2433 from facebook/travisless
Reduce workload on travisCI
2020-12-18 15:03:10 -08:00
Yann Collet 7f09cdc8a8 removed duplicated release-only tests
from travisCI
as they are already part of Github Actions
2020-12-18 12:50:36 -08:00
Yann Collet 54cc01c5be removed tests duplicated between TravisCI and Github Actions
reduce load on TravisCI
2020-12-18 11:01:22 -08:00
Yann Collet 456ca2aa06
Merge pull request #2432 from facebook/check32
added runtime test in CI for 32-bit binaries
2020-12-17 18:00:21 -08:00
Yann Collet 792fdf84f8 Merge branch 'check32' of github.com:facebook/zstd into check32 2020-12-17 15:45:22 -08:00
Yann Collet 3536e9d5ff removing tests using too much resources for 32-bit address space 2020-12-17 15:44:54 -08:00
Yann Collet d4d1e45bcb
Merge pull request #2430 from terrelln/huf-compress-weights-fix
Fix alignment of scratchBuffer in HUF_compressWeights()
2020-12-17 15:24:56 -08:00
Yann Collet d5eb7d1569 added pre-requisites for 32-bit tests in CI 2020-12-17 15:05:26 -08:00
Yann Collet c11db9c8b5 additional master->release switches (CI tests) 2020-12-17 15:01:04 -08:00
Yann Collet 4680d817c0 added a simple runtime test in CI for 32-bit binaries 2020-12-17 14:53:36 -08:00
Nick Terrell ae85676d44 Fix alignment of scratchBuffer in HUF_compressWeights()
The scratch buffer must be 4-byte aligned. This causes test failures in
32-bit systems, where the stack isn't aligned.

Fixes Issue #2428.
2020-12-17 14:30:27 -08:00
Yann Collet ce34dc39a0 removed incorrect test 2020-12-16 23:53:13 -08:00
Yann Collet 0b39531d75 moving all references to `release` branch
was previously `master`
2020-12-16 23:00:35 -08:00