Commit Graph

6310 Commits (f4abba02ba34113f53d05cae504ae832f098ec1c)

Author SHA1 Message Date
Nick Terrell f4abba02ba [libzstd] Clean up parameter code
* Move all ZSTDMT parameter setting code to ZSTD_CCtxParams_*Parameter().
  ZSTDMT now calls these functions, so we can keep all the logic in the
  same place.
* Clean up `ZSTD_CCtx_setParameter()` to only add extra checks where needed.
* Clean up `ZSTDMT_initJobCCtxParams()` by copying all parameters by default,
  and then zeroing the ones that need to be zeroed. We've missed adding several
  parameters here, and it makes more sense to only have to update it if you
  change something in ZSTDMT.
* Add `ZSTDMT_cParam_clampBounds()` to clamp a parameter into its valid
  range. Use this to keep backwards compatibility when setting ZSTDMT parameters,
  which clamp into the valid range.
2019-02-19 13:22:37 -08:00
Nick Terrell 54e9412ddd
Merge pull request #1525 from terrelln/enable-huf-flag
Fix optimal parser prices with uncompressed literals
2019-02-15 20:21:08 -05:00
Nick Terrell 19ca3fbc03 [zstdcli] Respect --[no-]compress-literals in benchmark mode 2019-02-15 16:27:39 -08:00
Nick Terrell 0c53c5ad4a [zstdcli] Add a flag to control literals compression 2019-02-15 15:00:45 -08:00
Nick Terrell 5261a288d1 Fix a bug in the compress cctx method 2019-02-15 14:58:19 -08:00
Nick Terrell 3d7377b874 [libzstd] Handle uncompressed literals 2019-02-15 14:58:11 -08:00
Nick Terrell a96e67af6c [regression] Test level 19 with uncompressed literals 2019-02-15 10:52:46 -08:00
Nick Terrell 4c870b70fc
Merge pull request #1522 from terrelln/enable-huf-flag
Add ZSTD_c_literalCompressionMode flag
2019-02-13 19:02:32 -05:00
Nick Terrell dbaa7042d9 [regression] Test ZSTD_c_literalCompressionMode
Test a positive compression level with uncompressed literals,
and a negative compression level with compressed literals.

I double checked the `results.csv` and made sure that the compressed
sizes make sense.
2019-02-13 15:00:32 -08:00
Nick Terrell f9513115e4 [libzstd] Add ZSTD_c_literalCompressionMode flag
It controls the literals compression. It is either
`auto`, `huffman`, or `uncompressed`. It defaults to
`auto`, which is the current behavior.
2019-02-13 14:59:22 -08:00
Nick Terrell ae7380d2af
Merge pull request #1519 from terrelln/play-bsd
[cirrus] Run playTests.sh
2019-02-13 16:21:14 -05:00
Nick Terrell e1a799e5de [util] Fix UTIL_isLink() for FreeBSD 2019-02-11 17:44:10 -08:00
Nick Terrell 9c071664ad [cirrus] Run playTests.sh
* Pass `-Werror` through `MOREFLAGS`
* Install `coreutils`
* Run `playTests.sh`
2019-02-11 17:44:00 -08:00
Nick Terrell 32a98bafdc
Merge pull request #1521 from bket/lstat
Detection of symbolic links on OpenBSD
2019-02-11 20:38:49 -05:00
Björn Ketelaars 77d9109c27 Add test
While here enable symlink test for OpenBSD.
2019-02-12 01:56:05 +01:00
Björn Ketelaars 482b84f07b Make detection of symbolic links more consistent
While fixing the detection of symbolic links on OpenBSD I noticed
inconsistent behaviour:

$ echo hello > hello
$ ln -s hello world
$ zstd hello world
Warning : world is a symbolic link, ignoring
hello                :316.67%   (     6 =>     19 bytes, hello.zst
$ ls *.zst
hello.zst
$ zstd world
world                :316.67%   (     6 =>     19 bytes, world.zst)
$ ls *.zst
hello.zst world.zst
2019-02-12 01:56:05 +01:00
Björn Ketelaars 1e4dc2e5f1 Detect symbolic links on OpenBSD
In #1520 it is described that FreeBSD doesn't detect symbolic links. The
same is true for OpenBSD. This diff fixes this issue for OpenBSD. I'm
guessing that something similar works for FreeBSD as well. However, I'm
unable to test this.
2019-02-12 01:56:05 +01:00
Nick Terrell a17369c7dc
Merge pull request #1518 from bket/non-portable
'head -c BYTES' is non portable
2019-02-11 15:43:03 -05:00
Björn Ketelaars b26c53b0d0 'head -c BYTES' is non-portable.
Pull request #1499 added a new test, which uses 'head -c'. The '-c'
option is non-portable (not in POSIX). Instead use 'dd'. Similar issue
has been resolved in the past (#1321).
2019-02-11 12:00:26 +01:00
Nick Terrell 197a5737c8
Merge pull request #1516 from terrelln/dict-doc
[zdict] Improve documentation
2019-02-01 19:04:05 -05:00
Nick Terrell 21616d8a77 [zdict] Improve documentation 2019-02-01 15:19:32 -08:00
Nick Terrell 5c1148a6a5
Merge pull request #1515 from thatsafunnyname/patch-1
-Wformat-security not needed with -Wformat=2
2019-02-01 13:41:27 -05:00
Peter (Stig) Edwards cdb3e7af2f
-Wformat-security not needed with -Wformat=2 2019-02-01 09:38:49 +00:00
Peter (Stig) Edwards 1951c1b3a0
-Wformat-security not needed with -Wformat=2 2019-02-01 09:31:46 +00:00
Peter (Stig) Edwards 894bbda44c
-Wformat-security not needed with -Wformat=2 2019-02-01 09:31:02 +00:00
Peter (Stig) Edwards 188c748208
-Wformat-security not needed with -Wformat=2 2019-02-01 09:30:31 +00:00
Peter (Stig) Edwards 723418f8d8
-Wformat-security not needed with -Wformat=2 2019-02-01 09:29:40 +00:00
Peter (Stig) Edwards 4a9e0502e6
-Wformat-security not needed with -Wformat=2 2019-02-01 09:29:08 +00:00
Peter (Stig) Edwards 2b7120ec71
-Wformat-security not needed with -Wformat=2 2019-02-01 09:28:41 +00:00
Peter (Stig) Edwards 2ff9249810
-Wformat-security not needed with -Wformat=2 2019-02-01 09:27:22 +00:00
Nick Terrell fafa322456
Merge pull request #1511 from lwhsu/cirrus-ci
Change Cirrus CI's badge to dev branch
2019-01-30 16:53:13 -05:00
Li-Wen Hsu 1a6f2b4f7f Change Cirrus CI's badge to dev branch 2019-01-31 05:37:04 +08:00
Nick Terrell 79463a65e9
Merge pull request #1501 from lwhsu/cirrus-ci
Add Cirrus-CI config and build status badge for testing on FreeBSD
2019-01-30 14:15:02 -05:00
Yann Collet a940e78f16
Merge pull request #1509 from felixhandte/verbose-errors
Add Debug Information to Error Checks
2019-01-29 11:32:24 -08:00
W. Felix Handte 501eb25102 Rename FORWARD_ERROR -> FORWARD_IF_ERROR 2019-01-29 12:56:07 -05:00
W. Felix Handte 429987c9a6 Add Comment 2019-01-28 17:35:31 -05:00
W. Felix Handte 2179ce00e1 Remove CHECK_E Macro 2019-01-28 17:33:13 -05:00
W. Felix Handte 03e040a966 Replace Uses of CHECK_E with RETURN_ERROR_IF(*_isError(... 2019-01-28 17:33:01 -05:00
W. Felix Handte 7ebd897157 Remove CHECK_F Macro 2019-01-28 17:16:32 -05:00
W. Felix Handte 64bb6640f2 Replace CHECK_F Uses in zstdmt_compress.c and zstd_ddict.c 2019-01-28 17:15:57 -05:00
Yann Collet 6cf253fb52
Merge pull request #1508 from facebook/fileio_lz4
fixed fileio.c compilation with LZ4 enabled
2019-01-28 14:12:27 -08:00
W. Felix Handte cafc3b1bcb Also Convert zstd_compress.c 2019-01-28 17:05:18 -05:00
W. Felix Handte 324e9654d3 Add grep-able String to Error Macros 2019-01-28 12:50:36 -05:00
W. Felix Handte 32fed9c7be Switch CHECK_F Calls to FORWARD_ERROR 2019-01-28 12:45:34 -05:00
W. Felix Handte 800c87fed0 Switch Unconditional RETURN_ERROR_IF Calls to RETURN_ERROR 2019-01-28 12:45:34 -05:00
W. Felix Handte a3538bbc6f Add RETURN_ERROR and FORWARD_ERROR Macros 2019-01-28 12:45:26 -05:00
W. Felix Handte c823237d7b Convert Checks in zstd_decompress.c to RETURN_ERROR_IF 2019-01-28 12:23:14 -05:00
W. Felix Handte ea031f4ea2 Convert Checks in zstd_decompress_block.c to RETURN_ERROR_IF 2019-01-28 11:56:39 -05:00
W. Felix Handte 54fa31f03b Add RETURN_ERROR_IF Macro That Logs Debug Information When Check Fails 2019-01-28 11:43:33 -05:00
Yann Collet 07e047873e fixed fileio.c compilation with LZ4 enabled
was broken by #1505.

I'm surprised it passed CI tests.
LZ4 tests are part of the "Extended" tests on Travis CI,
which are run on "master" and in "cron" jobs.

Since latest cron job did not failed,
especially this one : https://travis-ci.org/facebook/zstd/jobs/484365040
it suggests cron jobs are no longer using `dev` branch.

To be investigated
2019-01-25 14:42:44 -08:00