]>
git.ipfire.org Git - thirdparty/zstd.git/log
Nick Terrell [Thu, 21 Mar 2019 22:17:41 +0000 (15:17 -0700)]
[lib] Allow ZSTD_CCtx_loadDictionary() to be called before parameters are set
* After loading a dictionary only create the cdict once we've started the
compression job. This allows the user to pass the dictionary before they
set other settings, and is in line with the rest of the API.
* Add tests that mix the 3 dictionary loading APIs.
* Add extra tests for `ZSTD_CCtx_loadDictionary()`.
* The first 2 tests added fail before this patch.
* Run the regression test suite.
Nick Terrell [Sat, 16 Mar 2019 01:03:31 +0000 (18:03 -0700)]
Update documentation to tell how to replace the old streaming API with the new one.
Nick Terrell [Wed, 13 Mar 2019 21:05:18 +0000 (14:05 -0700)]
Wrap the new advanced api completely
Nick Terrell [Thu, 21 Mar 2019 04:20:14 +0000 (21:20 -0700)]
[regression] Add more streaming tests
* Test all of the `ZSTD_initCStream*()` variants.
* Fix a typo in the zstdcli method.
Nick Terrell [Tue, 19 Mar 2019 17:53:12 +0000 (10:53 -0700)]
Merge pull request #1553 from shakeelrao/legacy-bound
Add legacy support to decompressBound
shakeelrao [Tue, 19 Mar 2019 08:44:08 +0000 (01:44 -0700)]
Fix typo in legacy documentation
shakeelrao [Tue, 19 Mar 2019 04:05:35 +0000 (21:05 -0700)]
Remove extraneous spacing in comments
shakeelrao [Tue, 19 Mar 2019 03:33:15 +0000 (20:33 -0700)]
Add legacy mode in documentation
shakeelrao [Mon, 18 Mar 2019 02:35:43 +0000 (19:35 -0700)]
Stylistic changes
shakeelrao [Mon, 18 Mar 2019 00:41:27 +0000 (17:41 -0700)]
Update documentation for ZSTD_frameSizeInfo
shakeelrao [Sat, 16 Mar 2019 01:04:19 +0000 (18:04 -0700)]
Test new ZSTD_findFrameCompressedSize and update documentation
shakeelrao [Fri, 15 Mar 2019 23:20:34 +0000 (16:20 -0700)]
Reorder declaration in ZSTD_findFrameSizeInfoLegacy
shakeelrao [Fri, 15 Mar 2019 23:10:37 +0000 (16:10 -0700)]
Add legacy support to decompressBound
Nick Terrell [Fri, 15 Mar 2019 17:57:49 +0000 (10:57 -0700)]
Merge pull request #1547 from shakeelrao/fix-error
Fix incorrect error code in ZSTD_errorFrameSizeInfo
shakeelrao [Fri, 15 Mar 2019 12:13:55 +0000 (05:13 -0700)]
Add static linking to legacy tests
shakeelrao [Fri, 15 Mar 2019 10:59:03 +0000 (03:59 -0700)]
Add test to validate patch
Nick Terrell [Thu, 14 Mar 2019 02:17:22 +0000 (19:17 -0700)]
Merge pull request #1550 from terrelln/cparams-cdict
[libzstd] Allow compression parameters to be set with a cdict
Nick Terrell [Thu, 14 Mar 2019 00:01:23 +0000 (17:01 -0700)]
[zstreamtest] Remove outdated test
Nick Terrell [Wed, 13 Mar 2019 22:23:24 +0000 (15:23 -0700)]
[libzstd] Allow compression parameters to be set with a cdict
The order you set parameters in the advanced API is not supposed to matter.
However, once you call `ZSTD_CCtx_refCDict()` the compression parameters
cannot be changed. Remove that restriction, and document what parameters
are used when using a CDict.
If the CCtx is in dictionary mode, then the CDict's parameters are used.
If the CCtx is not in dictionary mode, then its requested parameters are
used.
Nick Terrell [Wed, 13 Mar 2019 23:08:54 +0000 (16:08 -0700)]
Merge pull request #1549 from terrelln/ref-cdict-free
[libzstd] Free local cdict when referencing cdict
Nick Terrell [Wed, 13 Mar 2019 21:54:31 +0000 (14:54 -0700)]
[libzstd] Free local cdict when referencing cdict
We no longer care about the `cdictLocal` after calling
`ZSTD_CCtx_refCDict()`, so we should free it to save some
memory.
shakeelrao [Wed, 13 Mar 2019 08:43:40 +0000 (01:43 -0700)]
Add unit test to validate the error case
shakeelrao [Wed, 13 Mar 2019 08:23:07 +0000 (01:23 -0700)]
Fix incorrectly assigned value in ZSTD_errorFrameSizeInfo
As documented in `zstd.h`, ZSTD_decompressBound returns `ZSTD_CONTENTSIZE_ERROR`
if an error occurs (not `ZSTD_CONTENTSIZE_UNKNOWN`). This is consistent with
the error checking made in ZSTD_decompressBound, particularly line 545.
Nick Terrell [Mon, 4 Mar 2019 16:00:47 +0000 (08:00 -0800)]
Merge pull request #1543 from shakeelrao/dev
Provide a function to estimate decompressed size.
shakeelrao [Sun, 3 Mar 2019 01:56:10 +0000 (17:56 -0800)]
update documentation for decompressBound
shakeelrao [Sat, 2 Mar 2019 07:11:15 +0000 (23:11 -0800)]
update formatting
shakeelrao [Sat, 2 Mar 2019 05:27:30 +0000 (21:27 -0800)]
add missing size content test
shakeelrao [Sat, 2 Mar 2019 02:29:35 +0000 (18:29 -0800)]
add stylistic changes
shakeelrao [Fri, 1 Mar 2019 08:12:16 +0000 (00:12 -0800)]
update missing error case to CONTENTSIZE_ERROR
shakeelrao [Fri, 1 Mar 2019 08:05:59 +0000 (00:05 -0800)]
change nbBlocks to size_t for consistency
shakeelrao [Fri, 1 Mar 2019 08:03:50 +0000 (00:03 -0800)]
change compressedBound to ULL
shakeelrao [Fri, 1 Mar 2019 06:55:18 +0000 (22:55 -0800)]
implement API-level changes
Nick Terrell [Thu, 28 Feb 2019 19:25:27 +0000 (11:25 -0800)]
Merge pull request #1541 from terrelln/fuzz
[fuzz] Add --enable-fuzzer for clang fuzzing
shakeelrao [Thu, 28 Feb 2019 11:01:21 +0000 (03:01 -0800)]
initialize local vars in decompressBound
shakeelrao [Thu, 28 Feb 2019 10:10:17 +0000 (02:10 -0800)]
switch frameBound type to ULL
shakeelrao [Thu, 28 Feb 2019 09:52:01 +0000 (01:52 -0800)]
change return type to ULL
shakeelrao [Thu, 28 Feb 2019 09:28:29 +0000 (01:28 -0800)]
Remove autogenerated test file
shakeelrao [Thu, 28 Feb 2019 09:24:54 +0000 (01:24 -0800)]
Fix decl-after-stmnt build error
shakeelrao [Thu, 28 Feb 2019 08:42:49 +0000 (00:42 -0800)]
Provide an API function to estimate decompressed size.
Introduces a new utility function `ZSTD_findFrameCompressedSize_internal` which
is equivalent to `ZSTD_findFrameCompressSize`, but accepts an additional output
parameter `bound` that computes an upper-bound for the compressed data in the frame.
The new API function is named `ZSTD_decompressBound` to be consistent with
`zstd_compressBound` (the inverse operation). Clients will now be able to compute an upper-bound for
their compressed payloads instead of guessing a large size.
Implements https://github.com/facebook/zstd/issues/1536.
Nick Terrell [Thu, 28 Feb 2019 01:15:27 +0000 (17:15 -0800)]
[fuzz] Add --enable-fuzzer for clang fuzzing
Nick Terrell [Wed, 20 Feb 2019 18:46:46 +0000 (10:46 -0800)]
Merge pull request #1532 from terrelln/cctx-params
[libzstd] Rename ZSTD_CCtxParam_* to ZSTD_CCtxParams_*
Nick Terrell [Wed, 20 Feb 2019 18:46:14 +0000 (10:46 -0800)]
Update changelog
Nick Terrell [Wed, 20 Feb 2019 03:42:07 +0000 (19:42 -0800)]
Merge pull request #1531 from terrelln/appveyorTest
Fixes for Windows release
Nick Terrell [Wed, 20 Feb 2019 01:41:56 +0000 (17:41 -0800)]
[libzstd] Rename ZSTD_CCtxParam_* to ZSTD_CCtxParams_*
Nick Terrell [Wed, 20 Feb 2019 00:14:02 +0000 (16:14 -0800)]
[Windows] Don't use a .def file
Nick Terrell [Tue, 19 Feb 2019 23:49:48 +0000 (15:49 -0800)]
[Windows] Move public headers to include/
Nick Terrell [Tue, 19 Feb 2019 22:40:10 +0000 (14:40 -0800)]
Merge pull request #1530 from terrelln/param-order
Clean up parameter code
Nick Terrell [Tue, 19 Feb 2019 19:07:52 +0000 (11:07 -0800)]
[fuzzer] Add test cases
Nick Terrell [Sat, 16 Feb 2019 00:15:20 +0000 (16:15 -0800)]
[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.
Nick Terrell [Sat, 16 Feb 2019 01:21:08 +0000 (20:21 -0500)]
Merge pull request #1525 from terrelln/enable-huf-flag
Fix optimal parser prices with uncompressed literals
Nick Terrell [Fri, 15 Feb 2019 23:24:55 +0000 (15:24 -0800)]
[zstdcli] Respect --[no-]compress-literals in benchmark mode
Nick Terrell [Fri, 15 Feb 2019 22:15:36 +0000 (14:15 -0800)]
[zstdcli] Add a flag to control literals compression
Nick Terrell [Fri, 15 Feb 2019 22:14:32 +0000 (14:14 -0800)]
Fix a bug in the compress cctx method
Nick Terrell [Fri, 15 Feb 2019 18:29:03 +0000 (10:29 -0800)]
[libzstd] Handle uncompressed literals
Nick Terrell [Fri, 15 Feb 2019 18:28:44 +0000 (10:28 -0800)]
[regression] Test level 19 with uncompressed literals
Nick Terrell [Thu, 14 Feb 2019 00:02:32 +0000 (19:02 -0500)]
Merge pull request #1522 from terrelln/enable-huf-flag
Add ZSTD_c_literalCompressionMode flag
Nick Terrell [Wed, 13 Feb 2019 23:00:32 +0000 (15:00 -0800)]
[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.
Nick Terrell [Wed, 13 Feb 2019 22:59:22 +0000 (14:59 -0800)]
[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.
Nick Terrell [Wed, 13 Feb 2019 21:21:14 +0000 (16:21 -0500)]
Merge pull request #1519 from terrelln/play-bsd
[cirrus] Run playTests.sh
Nick Terrell [Tue, 12 Feb 2019 01:43:43 +0000 (17:43 -0800)]
[util] Fix UTIL_isLink() for FreeBSD
Nick Terrell [Mon, 11 Feb 2019 18:32:30 +0000 (10:32 -0800)]
[cirrus] Run playTests.sh
* Pass `-Werror` through `MOREFLAGS`
* Install `coreutils`
* Run `playTests.sh`
Nick Terrell [Tue, 12 Feb 2019 01:38:49 +0000 (20:38 -0500)]
Merge pull request #1521 from bket/lstat
Detection of symbolic links on OpenBSD
Björn Ketelaars [Tue, 12 Feb 2019 00:14:58 +0000 (01:14 +0100)]
Add test
While here enable symlink test for OpenBSD.
Björn Ketelaars [Mon, 11 Feb 2019 23:07:32 +0000 (00:07 +0100)]
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
Björn Ketelaars [Mon, 11 Feb 2019 23:03:11 +0000 (00:03 +0100)]
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.
Nick Terrell [Mon, 11 Feb 2019 20:43:03 +0000 (15:43 -0500)]
Merge pull request #1518 from bket/non-portable
'head -c BYTES' is non portable
Björn Ketelaars [Mon, 11 Feb 2019 10:49:35 +0000 (11:49 +0100)]
'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).
Nick Terrell [Sat, 2 Feb 2019 00:04:05 +0000 (19:04 -0500)]
Merge pull request #1516 from terrelln/dict-doc
[zdict] Improve documentation
Nick Terrell [Fri, 1 Feb 2019 23:19:32 +0000 (15:19 -0800)]
[zdict] Improve documentation
Nick Terrell [Fri, 1 Feb 2019 18:41:27 +0000 (13:41 -0500)]
Merge pull request #1515 from thatsafunnyname/patch-1
-Wformat-security not needed with -Wformat=2
Peter (Stig) Edwards [Fri, 1 Feb 2019 09:38:49 +0000 (09:38 +0000)]
-Wformat-security not needed with -Wformat=2
Peter (Stig) Edwards [Fri, 1 Feb 2019 09:31:46 +0000 (09:31 +0000)]
-Wformat-security not needed with -Wformat=2
Peter (Stig) Edwards [Fri, 1 Feb 2019 09:31:02 +0000 (09:31 +0000)]
-Wformat-security not needed with -Wformat=2
Peter (Stig) Edwards [Fri, 1 Feb 2019 09:30:31 +0000 (09:30 +0000)]
-Wformat-security not needed with -Wformat=2
Peter (Stig) Edwards [Fri, 1 Feb 2019 09:29:40 +0000 (09:29 +0000)]
-Wformat-security not needed with -Wformat=2
Peter (Stig) Edwards [Fri, 1 Feb 2019 09:29:08 +0000 (09:29 +0000)]
-Wformat-security not needed with -Wformat=2
Peter (Stig) Edwards [Fri, 1 Feb 2019 09:28:41 +0000 (09:28 +0000)]
-Wformat-security not needed with -Wformat=2
Peter (Stig) Edwards [Fri, 1 Feb 2019 09:27:22 +0000 (09:27 +0000)]
-Wformat-security not needed with -Wformat=2
Nick Terrell [Wed, 30 Jan 2019 21:53:13 +0000 (16:53 -0500)]
Merge pull request #1511 from lwhsu/cirrus-ci
Change Cirrus CI's badge to dev branch
Li-Wen Hsu [Wed, 30 Jan 2019 21:37:04 +0000 (05:37 +0800)]
Change Cirrus CI's badge to dev branch
Nick Terrell [Wed, 30 Jan 2019 19:15:02 +0000 (14:15 -0500)]
Merge pull request #1501 from lwhsu/cirrus-ci
Add Cirrus-CI config and build status badge for testing on FreeBSD
Yann Collet [Tue, 29 Jan 2019 19:32:24 +0000 (11:32 -0800)]
Merge pull request #1509 from felixhandte/verbose-errors
Add Debug Information to Error Checks
W. Felix Handte [Tue, 29 Jan 2019 17:56:07 +0000 (12:56 -0500)]
Rename FORWARD_ERROR -> FORWARD_IF_ERROR
W. Felix Handte [Mon, 28 Jan 2019 22:35:31 +0000 (17:35 -0500)]
Add Comment
W. Felix Handte [Mon, 28 Jan 2019 22:28:14 +0000 (17:28 -0500)]
Remove CHECK_E Macro
W. Felix Handte [Mon, 28 Jan 2019 22:27:29 +0000 (17:27 -0500)]
Replace Uses of CHECK_E with RETURN_ERROR_IF(*_isError(...
W. Felix Handte [Mon, 28 Jan 2019 22:16:32 +0000 (17:16 -0500)]
Remove CHECK_F Macro
W. Felix Handte [Mon, 28 Jan 2019 22:15:57 +0000 (17:15 -0500)]
Replace CHECK_F Uses in zstdmt_compress.c and zstd_ddict.c
Yann Collet [Mon, 28 Jan 2019 22:12:27 +0000 (14:12 -0800)]
Merge pull request #1508 from facebook/fileio_lz4
fixed fileio.c compilation with LZ4 enabled
W. Felix Handte [Mon, 28 Jan 2019 22:05:18 +0000 (17:05 -0500)]
Also Convert zstd_compress.c
W. Felix Handte [Mon, 28 Jan 2019 17:50:36 +0000 (12:50 -0500)]
Add grep-able String to Error Macros
W. Felix Handte [Mon, 28 Jan 2019 17:42:00 +0000 (12:42 -0500)]
Switch CHECK_F Calls to FORWARD_ERROR
W. Felix Handte [Mon, 28 Jan 2019 17:35:56 +0000 (12:35 -0500)]
Switch Unconditional RETURN_ERROR_IF Calls to RETURN_ERROR
W. Felix Handte [Mon, 28 Jan 2019 17:34:08 +0000 (12:34 -0500)]
Add RETURN_ERROR and FORWARD_ERROR Macros
W. Felix Handte [Mon, 28 Jan 2019 17:22:52 +0000 (12:22 -0500)]
Convert Checks in zstd_decompress.c to RETURN_ERROR_IF
W. Felix Handte [Thu, 6 Dec 2018 01:17:11 +0000 (17:17 -0800)]
Convert Checks in zstd_decompress_block.c to RETURN_ERROR_IF
W. Felix Handte [Thu, 6 Dec 2018 00:23:18 +0000 (16:23 -0800)]
Add RETURN_ERROR_IF Macro That Logs Debug Information When Check Fails
Yann Collet [Fri, 25 Jan 2019 22:42:44 +0000 (14:42 -0800)]
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
Yann Collet [Thu, 24 Jan 2019 01:11:08 +0000 (17:11 -0800)]
Merge pull request #1505 from kostmo/remove-global-params
Remove global parameters, pass into public functions instead
Karl Ostmo [Wed, 23 Jan 2019 01:31:13 +0000 (17:31 -0800)]
Remove global parameters, pass into public functions instead