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
shakeelrao
0a3fa6f909
Add legacy mode in documentation
2019-03-18 20:33:15 -07:00
shakeelrao
19b75b6ecb
Test new ZSTD_findFrameCompressedSize and update documentation
2019-03-15 18:04:19 -07:00
shakeelrao
60796e76b0
Add legacy support to decompressBound
2019-03-15 16:10:37 -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
shakeelrao
9ad3f31d33
update documentation for decompressBound
2019-03-02 17:56:10 -08:00
shakeelrao
1e08c49f75
add stylistic changes
2019-03-01 18:29:35 -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
shakeelrao
d0a3f25697
change return type to ULL
2019-02-28 01:52:01 -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
7ad7ba3178
[libzstd] Rename ZSTD_CCtxParam_* to ZSTD_CCtxParams_*
2019-02-19 17:44:52 -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
Yann Collet
f9e4f89252
improved comments for adjustCParams() and getCParams()
2019-01-02 12:18:40 -08:00
Yann Collet
1993f5d412
fixed ovlog tests
...
and updated man page
2018-12-12 21:09:14 -08:00
Yann Collet
f2f86d369b
Merge branch 'btultra2' into ovlog_def
2018-12-12 20:58:14 -08:00
Yann Collet
9792acda3b
Merge branch 'dev' into btultra2
2018-12-12 20:18:27 -08:00
Yann Collet
9b784dec7f
changed parameter name to ZSTD_c_overlapLog
...
from overlapSizeLog.
Reasoning :
`overlapLog` is already used everwhere, in the code, command line and documentation.
`ZSTD_c_overlapSizeLog` feels unnecessarily different.
2018-12-11 16:55:33 -08:00
Yann Collet
52b94f902c
add clarification for ZSTD_CCtx_setPledgedSrcSize()
...
as requested in #1391
2018-12-11 12:08:21 -08:00
Yann Collet
5a1e01e5f1
clarified experimentalParam
2018-12-10 17:36:20 -08:00
Yann Collet
c226a7b9f3
fixed ZSTD_compress2()
...
as suggested by @terrelln
2018-12-10 17:33:49 -08:00
Yann Collet
34aa401afd
updated documentation
...
introducing ZSTD_btultra2
2018-12-06 17:22:19 -08:00
Yann Collet
39e28982cf
introduced constants ZSTD_STRATEGY_MIN and ZSTD_STRATEGY_MAX
2018-12-06 16:16:16 -08:00
Yann Collet
be9e561da4
changed ZSTD_c_compressionStrategy into ZSTD_c_strategy
...
also : fixed paramgrill, and limit conditions
2018-12-06 15:00:52 -08:00
Yann Collet
e9448cdf4c
introduced strategy btultra2
...
note : not yet applied on any compression level
2018-12-06 13:38:09 -08:00
Yann Collet
0c404a48f0
moved ZSTD_WINDOWLOG_LIMIT_DEFAULT into static-linking-only area
2018-12-06 10:57:19 -08:00
Yann Collet
96d887429b
clarified usage of word "job"
...
only applies in MT / async context now.
2018-12-06 10:14:34 -08:00
Yann Collet
3583d19c4e
changed parameter names from ZSTD_p_* to ZSTD_c_*
...
for naming consistency
2018-12-05 17:26:02 -08:00
Yann Collet
c2053310e5
updated API documentation
2018-12-05 16:23:00 -08:00
Yann Collet
3e042d5cc0
ZSTD_decompressDCtx() is compatible with sticky parameters
2018-12-04 17:30:58 -08:00
Yann Collet
aec945f0dc
implemented ZSTD_dParam_getBounds()
...
and ZSTD_DCtx_setParameter()
2018-12-04 15:35:37 -08:00
Yann Collet
34e146f548
advanced decompression function replaces by normal streaming one
...
advanced parameters compatible with ZSTD_decompressStream().
2018-12-04 10:28:36 -08:00
Yann Collet
6ced8f7c7c
joined normal streaming API with advanced one
2018-12-03 14:22:38 -08:00
Yann Collet
da1f3066a3
preparative for ZSTD_DCtx_setParameter()
2018-11-30 15:59:50 -08:00
Yann Collet
d8e215cbee
created ZSTD_compress2() and ZSTD_compressStream2()
...
ZSTD_compress_generic() is renamed ZSTD_compressStream2().
Note that, for the time being,
the "stable" API and advanced one use different parameter planes :
setting parameters using the advanced API does not influence ZSTD_compressStream()
and using ZSTD_initCStream() does not influence parameters for ZSTD_compressStream2().
2018-11-30 11:25:56 -08:00
Yann Collet
d3a0c71259
pushed experimental parameters
...
into ZSTD_STATIC_LINKING_ONLY section
2018-11-21 16:18:55 -08:00
Yann Collet
d4d4e109e9
getParameter fills an int*
...
rather than an unsigned*
for consistency
since type of setParameter() changed to int.
2018-11-21 15:37:26 -08:00
Yann Collet
fea920615c
promote ZSTD_findFrameCompressedSize() into staging area
2018-11-21 15:25:50 -08:00
Yann Collet
41c7d0b1e1
changed hashEveryLog into hashRateLog
2018-11-21 14:36:57 -08:00
Yann Collet
5c6d4b18ac
completed implementation of ZSTD_cParam_getBounds()
...
for all parameters
2018-11-20 16:06:00 -08:00
Yann Collet
2e7fd6a2cb
fixed remaining searchLength invocations
2018-11-20 15:13:27 -08:00
Yann Collet
e874dacc08
changed searchLength into minMatch
...
refactored all relevant API and calls
for consistency.
2018-11-20 14:56:07 -08:00
Yann Collet
114bd4346e
changed enum type name to ZSTD_ResetDirective
...
for naming consistency :
types should start with a capital letter (after prefix)
2018-11-20 12:00:20 -08:00
Yann Collet
3b838abf97
ZSTD_CCtx_setParameter : value
argument is now int
...
for compatibility with compression level
2018-11-20 11:53:01 -08:00
Yann Collet
19e5f2a35b
removed some constants and _simpleArgs() from staging
...
constants that *may* change in the future
will be accessed through functions instead
(to be created).
_simpleArgs() variant do not have (yet) a clear enough added value
to deserve "stable" status.
2018-11-19 17:38:15 -08:00
Yann Collet
5c68639186
updated ZSTD_DCtx_reset()
...
signature and behavior is now the same as ZSTD_CCtx_reset()
2018-11-15 16:12:39 -08:00
Yann Collet
06c8d5a4f4
Merge branch 'dev' into advancedAPI
...
fixed rsyncable
2018-11-15 10:51:24 -08:00
Nick Terrell
b9693d3a49
[lib] Add rsyncable mode
...
- Add rsyncable mode to multithreaded mode
- Factor out LDM's hash function for reuse
2018-11-14 16:59:57 -08:00
Yann Collet
21a42bf5f9
added advanced decompression api
2018-11-14 16:54:54 -08:00
Yann Collet
cf9f4b63b8
fixed fuzz test src code
2018-11-14 14:46:49 -08:00
Yann Collet
ff8d371708
modified ZSTD_CCtx_reset()
...
which now accepts an enum,
to distinguish between resetting the session, or the parameters (or both).
removed ZSTD_CCtx_resetParameters(), which is redundant.
start replacing invocation of ZSTD_CCtx_reset*() functions
Updated advanced API documentation
trimmed down amount of API staged in RC,
in particular, all functions related to ZSTD_CCtxParams()
seem too advanced.
2018-11-14 12:33:57 -08:00
Yann Collet
d7e10a774a
added constant ZSTD_WINDOWLOG_LIMIT_DEFAULT
...
answering #1407 .
Also : removed obsolete function ZSTD_setDStreamParameter()
which could only be used with one parameter (DStream_p_maxWindowSize).
Now replaced by ZSTD_DCtx_setWindowSize() (which exists since a few revisions)
2018-11-13 18:12:34 -08:00
Yann Collet
2c8fde538f
added constant ZSTD_MAGIC_SKIPPABLE_MASK
...
and updated several API comments
2018-11-13 17:36:35 -08:00
Yann Collet
b83d1e7714
removed some static const
variables
...
and replaced by traditional macro constants.
Unfortunately, C doesn't consider `static const` to mean "constant"
2018-11-13 16:56:32 -08:00
Yann Collet
768a264200
Merge branch 'dev' of github.com:facebook/zstd into dev
2018-11-13 15:56:36 -08:00
Yann Collet
092c4abd4c
bumped version number to v1.3.8
2018-11-13 15:53:38 -08:00
W. Felix Handte
4127de5fa6
Switch Enum to Only Non-Negative Values, Update Comments
2018-11-12 12:47:47 -08:00
Allen Hai
3783720f70
vertically align code comment
2018-10-26 16:16:06 -05:00
Allen Hai
26e34d8a73
provide consistent spacing to enum field
2018-10-25 18:45:20 -05:00
Yann Collet
1e6208e75e
bumped version number to v1.3.7
...
updated documentation
2018-10-11 14:40:12 -07:00
Yann Collet
8fc79fac07
clarify streaming api doc
...
as suggested by @indygreg in #1360
2018-10-08 15:53:29 -07:00
Yann Collet
04f47bbdd2
Merge branch 'dev' into adapt
2018-09-24 16:56:45 -07:00
Yann Collet
32b7cf1bcf
fixed tautological tests
...
involving ZSTD_TARGETLENGTH_MIN (== 0)
2018-09-21 15:04:43 -07:00
Yann Collet
a54c86cfc6
defined a minimum negative level
...
which can be probed using new function ZSTD_minCLevel().
Also : redefined ZSTD_TARGETLENGTH_MIN/MAX for consistency
used the opportunity to bump version number to v1.3.6
2018-09-20 16:52:03 -07:00
Yann Collet
89bc309d90
error out when --adapt is associated with --single-thread
...
since they are not compatible
2018-09-19 14:49:13 -07:00
Yann Collet
2f78228f65
Merge branch 'dev' into adapt
2018-09-19 12:43:42 -07:00
Yann Collet
005f000aed
updated documentation of *refPrefix()
...
indicating the equivalence with `diff` operation.
2018-09-18 13:07:08 -07:00
Yann Collet
7269fe6cd3
minor code comment update
2018-09-14 16:06:35 -07:00
Yann Collet
0403148315
Merge pull request #1295 from felixhandte/hdr-intro-comment-negative-lvls
...
Proposed Update to Zstd.h Introduction Comment
2018-09-14 15:29:19 -07:00
Nick Terrell
5ee5e71be3
[zstd] Add note about empty ZSTD_CDict
2018-08-23 17:48:06 -07:00
W. Felix Handte
e589ac6276
Reformat Introduction Comment and Mention Negative Levels
2018-08-22 17:07:34 -07:00
Yann Collet
105677c6db
created ZSTDMT_toFlushNow()
...
tells in a non-blocking way if there is something ready to flush right now.
only works with multi-threading for the time being.
Useful to know if flush speed will be limited by lack of production.
2018-08-17 18:11:54 -07:00
Yann Collet
3e4617ef54
frameProgression reports nbActiveWorkers and output flushed
2018-08-14 11:49:25 -07:00
Yann Collet
2dd76037be
zstd cli can increase level when input is too slow
2018-08-09 15:51:30 -07:00
W. Felix Handte
01bb1c1016
Add CCtx Param Controlling Dict Attachment Behavior
2018-06-21 17:29:25 -04:00
Yann Collet
b2632bcf6c
Merge pull request #1174 from duc0/document_default_level
...
Expose ZSTD_CLEVEL_DEFAULT and update documentation
2018-06-12 12:09:01 -07:00
Duc Ngo
869e2718f6
Line break
2018-06-11 10:02:15 -07:00
Duc Ngo
e8ef725e13
Address comments
2018-06-11 10:01:35 -07:00
Duc Ngo
e34c000e44
Expose ZSTD_CLEVEL_DEFAULT and update documentation
2018-06-08 11:33:44 -07:00
Yann Collet
c2c47e24e0
support targetlen==0 with strategy==ZSTD_fast
...
to mean "normal compression",
targetlen >= 1 now means "disable huffman compression of literals"
2018-06-07 15:49:01 -07:00
Yann Collet
a57b4df85f
removed literalCompression directive
...
in this version, literal compression is always disabled for ZSTD_fast strategy.
Performance parity between ZSTD_compress_advanced() and ZSTD_compress_generic()
2018-06-07 15:24:12 -07:00
Yann Collet
24319975b6
bumped version number to v1.3.5
2018-06-06 15:51:55 -07:00
Yann Collet
9b979d0e33
minor : improved API code comment
...
Extend guarantee that ZSTD_getFrameContentSize() will delivering the decompressed size
to any single-pass compression function.
Answer #1156
2018-05-31 11:12:18 -07:00
Yann Collet
12f60b8c98
clarified documentation related to refPrefix()
2018-04-25 10:17:06 -07:00
Yann Collet
ace856a835
updated documentation of streaming compression api
2018-04-24 14:44:27 -07:00
Nick Terrell
e8c9dc5cea
Fix documentation
2018-04-13 12:43:38 -07:00
Nick Terrell
9f76eebd17
Add ZSTD_CCtx_resetParameters() function
...
* Fix docs for `ZSTD_CCtx_reset()`.
* Add `ZSTD_CCtx_resetParameters()`.
Fixes #1094 .
2018-04-12 16:54:07 -07:00
Nick Terrell
280a236e9e
Add ZSTD_CCtx(Param)?_getParameter() function
...
Closes #1096 .
2018-04-12 11:50:12 -07:00
Yann Collet
04212178b5
doc : clarified advanced API usage
...
sticky parameters only work with `ZSTD_compress_generic()`
2018-04-10 11:40:36 -07:00
Yann Collet
ad5ba6cdcf
updated comment on parameters that can be changed during compression
2018-04-09 17:39:07 -07:00
Yann Collet
f35b8ba9da
updated ZSTD_p_chainLog description
2018-04-05 11:05:11 -07:00
Yann Collet
8be984ec45
fixed comments as suggested by @terrelln
2018-03-30 20:09:27 -07:00
Yann Collet
e6e848bfe9
added ZSTD_getFrameHeader_advanced()
...
makes it possible to request frame header from a magicless frame
2018-03-29 17:51:08 -06:00
Yann Collet
a6694838e1
added more code documentation for ZSTD_getFrameHeader()
2018-03-29 15:24:17 -06:00
Yann Collet
153bc1c004
removed limit ZSTD_TARGETLENGTH_MAX
...
this makes it possible to specify extremely large negative compression levels,
achieving the side effect as "no compression".
It will also be possible to define larger targetlength for ultra compression mode.
There is no adverse side effect due to removing this limit.
2018-03-21 15:50:05 -07:00
Yann Collet
a99c4a3621
Merge branch 'dev' into advancedDecompress
2018-03-21 06:08:28 -07:00
Yann Collet
87b0cf05bd
Merge pull request #1057 from facebook/lrmSettings
...
LRM parameters
2018-03-21 05:59:39 -07:00
Yann Collet
0dadb6b70d
implemented ZSTD_DCtx_refPrefix*()
2018-03-20 15:45:56 -07:00
Yann Collet
569b8ba4d9
implemented ZSTD_DCtx_refDDict()
2018-03-20 15:43:49 -07:00
Yann Collet
6873fec658
changed dictMore for dictContentType
...
which seems clearer to describe what the variable/argument is about.
2018-03-20 15:13:14 -07:00