Nick Terrell
0c7668cd06
Merge pull request #1555 from terrelln/load-dict
...
[lib] Allow ZSTD_CCtx_loadDictionary() to be called before parameters are set
2019-03-21 17:52:57 -07:00
Nick Terrell
6b053b9f60
[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.
2019-03-21 16:13:53 -07:00
Nick Terrell
041bc0bdb7
Merge pull request #1551 from terrelln/stream-wrap
...
Refactor old stream API to completely wrap the advanced API
2019-03-21 16:10:00 -07:00
Nick Terrell
20f9ff7e53
Update documentation to tell how to replace the old streaming API with the new one.
2019-03-21 16:08:58 -07:00
Nick Terrell
e55da9e963
Wrap the new advanced api completely
2019-03-21 10:54:40 -07:00
Nick Terrell
11e73576bb
[regression] Add more streaming tests
...
* Test all of the `ZSTD_initCStream*()` variants.
* Fix a typo in the zstdcli method.
2019-03-21 10:54:18 -07:00
Nick Terrell
0dd3588acc
Merge pull request #1553 from shakeelrao/legacy-bound
...
Add legacy support to decompressBound
2019-03-19 10:53:12 -07:00
shakeelrao
186ded6d91
Fix typo in legacy documentation
2019-03-19 01:44:08 -07:00
shakeelrao
5740eb6769
Remove extraneous spacing in comments
2019-03-18 21:05:35 -07:00
shakeelrao
0a3fa6f909
Add legacy mode in documentation
2019-03-18 20:33:15 -07:00
shakeelrao
20aa1b455c
Stylistic changes
2019-03-17 19:35:43 -07:00
shakeelrao
0033bb4785
Update documentation for ZSTD_frameSizeInfo
2019-03-17 17:41:27 -07:00
shakeelrao
19b75b6ecb
Test new ZSTD_findFrameCompressedSize and update documentation
2019-03-15 18:04:19 -07:00
shakeelrao
8cd423a659
Reorder declaration in ZSTD_findFrameSizeInfoLegacy
2019-03-15 16:20:34 -07:00
shakeelrao
60796e76b0
Add legacy support to decompressBound
2019-03-15 16:10:37 -07:00
Nick Terrell
f52a7d8faa
Merge pull request #1547 from shakeelrao/fix-error
...
Fix incorrect error code in ZSTD_errorFrameSizeInfo
2019-03-15 10:57:49 -07:00
shakeelrao
4c0540da1c
Add static linking to legacy tests
2019-03-15 05:13:55 -07:00
shakeelrao
91ffc8d256
Add test to validate patch
2019-03-15 03:59:03 -07:00
Nick Terrell
45139e9fd5
Merge pull request #1550 from terrelln/cparams-cdict
...
[libzstd] Allow compression parameters to be set with a cdict
2019-03-13 19:17:22 -07:00
Nick Terrell
18fbcddd0c
[zstreamtest] Remove outdated test
2019-03-13 17:01:23 -07:00
Nick Terrell
787b76904a
[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.
2019-03-13 16:10:05 -07:00
Nick Terrell
ea3b81f02c
Merge pull request #1549 from terrelln/ref-cdict-free
...
[libzstd] Free local cdict when referencing cdict
2019-03-13 16:08:54 -07:00
Nick Terrell
0594e8135b
[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.
2019-03-13 14:54:31 -07:00
shakeelrao
18d3a97d43
Add unit test to validate the error case
2019-03-13 01:43:40 -07:00
shakeelrao
79827a179f
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.
2019-03-13 01:23:07 -07:00
Nick Terrell
13cc7c610e
Merge pull request #1543 from shakeelrao/dev
...
Provide a function to estimate decompressed size.
2019-03-04 08:00:47 -08:00
shakeelrao
9ad3f31d33
update documentation for decompressBound
2019-03-02 17:56:10 -08:00
shakeelrao
95dfd48143
update formatting
2019-03-01 23:11:15 -08:00
shakeelrao
3da3dc2f45
add missing size content test
2019-03-01 21:27:30 -08:00
shakeelrao
1e08c49f75
add stylistic changes
2019-03-01 18:29:35 -08:00
shakeelrao
2bb5eec711
update missing error case to CONTENTSIZE_ERROR
2019-03-01 00:12:16 -08:00
shakeelrao
44ae395b3e
change nbBlocks to size_t for consistency
2019-03-01 00:05:59 -08:00
shakeelrao
03026c3b1d
change compressedBound to ULL
2019-03-01 00:03:50 -08:00
shakeelrao
8930c3c79b
implement API-level changes
2019-02-28 22:55:18 -08:00
Nick Terrell
8b7fa49590
Merge pull request #1541 from terrelln/fuzz
...
[fuzz] Add --enable-fuzzer for clang fuzzing
2019-02-28 11:25:27 -08:00
shakeelrao
dce9a09772
initialize local vars in decompressBound
2019-02-28 03:01:21 -08:00
shakeelrao
515c506b4c
switch frameBound type to ULL
2019-02-28 02:10:17 -08:00
shakeelrao
d0a3f25697
change return type to ULL
2019-02-28 01:52:01 -08:00
shakeelrao
c9d674b60d
Remove autogenerated test file
2019-02-28 01:29:04 -08:00
shakeelrao
97d3d28dab
Fix decl-after-stmnt build error
2019-02-28 01:24:54 -08:00
shakeelrao
820af1e078
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 .
2019-02-28 00:42:49 -08:00
Nick Terrell
4b0024a97d
[fuzz] Add --enable-fuzzer for clang fuzzing
2019-02-27 17:15:52 -08:00
Nick Terrell
be3bd70c57
Merge pull request #1532 from terrelln/cctx-params
...
[libzstd] Rename ZSTD_CCtxParam_* to ZSTD_CCtxParams_*
2019-02-20 10:46:46 -08:00
Nick Terrell
2e8c19f6a3
Update changelog
2019-02-20 10:46:14 -08:00
Nick Terrell
a36d9302ce
Merge pull request #1531 from terrelln/appveyorTest
...
Fixes for Windows release
2019-02-19 19:42:07 -08:00
Nick Terrell
7ad7ba3178
[libzstd] Rename ZSTD_CCtxParam_* to ZSTD_CCtxParams_*
2019-02-19 17:44:52 -08:00
Nick Terrell
9f9630f455
[Windows] Don't use a .def file
2019-02-19 16:52:38 -08:00
Nick Terrell
0c86d23467
[Windows] Move public headers to include/
2019-02-19 15:49:48 -08:00
Nick Terrell
eb3a7a3827
Merge pull request #1530 from terrelln/param-order
...
Clean up parameter code
2019-02-19 14:40:10 -08:00
Nick Terrell
6efce7c9ca
[fuzzer] Add test cases
2019-02-19 13:22:44 -08:00