Commit Graph

290 Commits

Author SHA1 Message Date
Yann Collet
36c2a03757 updated comments for ZSTD_resetCStream() 2017-04-05 22:06:21 -07:00
Yann Collet
7cf78f1be7 Protects ZSTD_compressBegin_usingCDict() vs NULL cdict dereference
Will issue an error (GENERIC) is cdict==NULL
2017-04-04 12:38:14 -07:00
Yann Collet
f3dfcdccd1 bump version number 2017-03-21 12:18:28 -07:00
Sean Purcell
dec2b96536 Add functions missing from manual, and fix parameter alignment 2017-03-14 11:24:09 -07:00
Nick Terrell
eeb31eed39 s/ZSTD_btopt2/ZSTD_btultra/g 2017-03-09 11:44:25 -08:00
Nick Terrell
e65aab8e0f Remove 'mem.h' dependency from ZSTD_WINDOWLOG_MAX 2017-03-08 15:40:13 -08:00
Sean Purcell
d44703d145 Offsets >= 32MB in 32-bits mode 2017-03-01 16:27:56 -08:00
Yann Collet
14312d833e zstdmt : fix : loading prefix from previous segments
There used to be a (very small) chance that
loading prefix from previous segment
would be confused with a real zstd dictionary.
For that to happen, the prefix needs to start
with the same value as dictionary magic.
That's 1 chance in 4 billions if all values have equal probability.
But in fact, since some values are more common (0x00000000 for example)
others are less common, and dictionary magic was selected to be one of them,
so probabilities are likely even lower.

Anyway, this risk is no down to zero
by adding a new CCtx parameter : ZSTD_p_forceRawDict

Current parameter policy : the parameter "stick" to its CCtx,
so any dictionary loading after ZSTD_p_forceRawDict is set
will be loaded in "raw" ("content only") mode,
even if CCtx is re-used multiple times with multiple different dictionary.
It's up to the user to reset this value differently if it needs so.
2017-02-23 23:42:12 -08:00
Yann Collet
831b4890ce minor tests/Makefile refactoring
and update of zstd_manual,html
2017-02-23 23:09:10 -08:00
Sean Purcell
64417cd2ff Describe ambiguity around skippable frames 2017-02-22 13:29:01 -08:00
Sean Purcell
9757cc811b Update comment 2017-02-22 12:28:21 -08:00
Sean Purcell
9050e1925e Change name to to findFrameCompressedSize and add skippable support 2017-02-22 12:12:34 -08:00
Anders Oleson
517577bf53 spelling fixes in comments
i.e. occurred labeled Huffman
2017-02-20 12:08:59 -08:00
Yann Collet
58af614ef2 push version and NEWS to v1.1.4 2017-02-13 18:32:44 -08:00
Sean Purcell
d7bfcac18a Expose frameSrcSize to experimental API 2017-02-10 11:55:44 -08:00
Sean Purcell
269b2cd3d8 Documentation updates 2017-02-09 13:25:30 -08:00
Sean Purcell
2db7249265 Make pledgedSrcSize meaning clear for other functions
- Added tests
- Moved new size functions to static link only
2017-02-09 11:49:58 -08:00
Sean Purcell
0f5c95af44 Disambiguate pledgedSrcSize == 0
- Modify ZSTD CLI to only set contentSizeFlag if it _knows_ the size
- Change pzstd to stop setting contentSizeFlag without accurate pledgedSrcSize
2017-02-08 15:12:46 -08:00
Sean Purcell
4e709712e1 Decompressed size functions now handle multiframes and distinguish cases
- Add ZSTD_findDecompressedSize
    - Traverses multiple frames to find total output size
- Add ZSTD_getFrameContentSize
    - Gets the decompressed size of a single frame by reading header
- Deprecate ZSTD_getDecompressedSize
2017-02-08 14:50:10 -08:00
Yann Collet
ef33d00532 fixed : ZSTD_setCCtxParameter() properly exposed in DLL 2017-01-26 12:24:21 -08:00
Yann Collet
4a62f79ec9 fixed clang documentation warning 2017-01-26 09:16:56 -08:00
Yann Collet
06e7697f96 added test of new parameter ZSTD_p_forceWindow 2017-01-25 16:39:03 -08:00
Yann Collet
bb0027405a fixed zstdmt corruption issue when enabling overlapped sections
see Asana board for detailed explanation on why and how to fix it
2017-01-25 16:25:38 -08:00
Yann Collet
c593348722 ZSTDMT_initCStream_usingDict() can outlive dict
Like ZSTD_initCStream_usingDict(),
ZSTDMT_initCStream_usingDict() now keep a copy of dict internally.
This way, dict can be released :
it does not longer have to outlive all future compression sessions.
2017-01-22 16:44:15 -08:00
Yann Collet
d7e3cb58c5 Resolved merge conflict dev+zstdmt 2017-01-20 16:44:50 -08:00
Yann Collet
dab5ea93f2 Merge pull request #515 from iburinoc/emptydict
Don't create dict in streaming apis if dictSize == 0
2017-01-19 09:02:42 -08:00
Sean Purcell
0b5370ae38 Prefix notes with /**< 2017-01-18 13:45:02 -08:00
Sean Purcell
57d423c5df Don't create dict in streaming apis if dictSize == 0 2017-01-17 14:31:35 -08:00
Przemyslaw Skibinski
d72f4b6b7a added "Makefile is validated" 2017-01-17 12:40:06 +01:00
Yann Collet
5eb749e734 ZSTDMT_compress() creates a single frame
The new strategy involves cutting frame at block level.
The result is a single frame, preserving ZSTD_getDecompressedSize()

As a consequence, bench can now make a full round-trip,
since the result is compatible with ZSTD_decompress().

This strategy will not make it possible to decode the frame with multiple threads
since the exact cut between independent blocks is not known.
MT decoding needs further discussions.
2017-01-11 18:21:25 +01:00
Yann Collet
0ec6a95ba1 minor fixes 2017-01-02 00:49:42 +01:00
Yann Collet
ba75e9d8c3 fix : zlib wrapper compile in gnu90 mode 2016-12-21 19:57:18 +01:00
Yann Collet
4e5eea61a8 added ZSTD_createDDict_byReference() 2016-12-21 16:44:35 +01:00
Yann Collet
1f57c2ed32 added : ZSTD_createCDict_byReference() 2016-12-21 16:20:11 +01:00
Yann Collet
d46ecb58a5 added dll compilation tests 2016-12-17 16:28:12 +01:00
Nick Terrell
8de46ab51a Export all API functions 2016-12-16 13:27:30 -08:00
Yann Collet
2b36b238d3 changed variable name to estimatedSrcSize, to emphasize it does not need to be exact 2016-12-13 17:59:55 +01:00
Yann Collet
e795c8a5f6 Added ZSTD_initCStream_srcSize().
Added relevant test cases in zstreamtest
2016-12-13 17:00:14 +01:00
Przemyslaw Skibinski
7687913178 Merge remote-tracking branch 'refs/remotes/facebook/dev' into dev11 2016-12-08 10:42:42 +01:00
Yann Collet
426a9d4b71 changed : dll : only approved ZSTD symbols are now exposed. All other symbols remain internal. 2016-12-07 16:39:34 -08:00
Przemyslaw Skibinski
4da53219a0 zstd Manual updated to 1.1.2 2016-12-07 11:18:40 +01:00
Yann Collet
379908be3d fixed zstd.h for manual 2016-12-06 10:36:15 -08:00
Yann Collet
825dffbc43 moved zbuff source files into lib/deprecated 2016-12-05 19:28:19 -08:00
Yann Collet
e7a41a5955 added : dictID retrieval functions.
added : unit tests for dictID retrieval functions
2016-12-05 16:21:06 -08:00
Yann Collet
9ffbeea875 API : changed : streaming decompression : implicit reset on starting new frames 2016-12-02 18:37:38 -08:00
Nick Terrell
05c00f2ff7 Fix ZSTD_STATIC_LINKING_ONLY with double include 2016-11-29 11:54:39 -08:00
Przemyslaw Skibinski
179555c1d1 working fullbench-dll 2016-11-15 18:05:46 +01:00
Yann Collet
fd3be6bc97 bump version number to 1.1.2 2016-11-07 14:35:41 -08:00
Yann Collet
11812260d1 Merge pull request #439 from terrelln/dev
ZSTD_compress_usingDict() specify dict == NULL
2016-11-03 14:15:36 -07:00
Nick Terrell
d82efd8a70 ZSTD_compress_usingDict() when dict gets loaded
Specify that when `dict == NULL || dictSize < 8` no dictionary
gets loaded.
Also add some periods.
2016-11-02 18:07:16 -07:00
Yann Collet
179b19776f fileio.c does no longer need ZSTD_LEGACY_SUPPORT, and does no longer depend on zstd_legacy.h
Added : ZSTD_isFrame() in experimental section
2016-11-02 17:30:49 -07:00
Yann Collet
ee5b725823 ZSTD_initCStream() optimization : do not allocate a CDict when no dictionary used 2016-10-27 14:20:55 -07:00
Yann Collet
9516234e67 first sketch for ZSTD_initCStream_usingCDict() 2016-10-25 16:19:52 -07:00
Yann Collet
62d9a7ddfd Merge pull request #429 from inikep/btopt2
Btopt2
2016-10-25 14:48:43 -07:00
Przemyslaw Skibinski
5c5f01f3da added ZSTD_btopt2 strategy 2016-10-25 12:25:07 +02:00
Yann Collet
37d130031d updated comments on context re-use 2016-10-24 17:22:12 -07:00
Przemyslaw Skibinski
984b66cd72 added contrib\gen_html 2016-10-24 15:59:51 +02:00
Przemyslaw Skibinski
575ab00db7 Merge remote-tracking branch 'refs/remotes/facebook/dev' into dev11 2016-10-20 11:01:52 +02:00
Yann Collet
f52cd03e73 bumped version number 2016-10-11 17:29:27 -07:00
inikep
2d2613399a zstd.h: added the Introduction section 2016-10-06 16:28:21 +02:00
inikep
ba1db376ac fixed clang 3.5 warnings 2016-10-06 14:22:48 +02:00
inikep
82057aa7ec zstd.h: updated comments 2016-10-06 13:23:52 +02:00
Yann Collet
cf409a7e2a fixed : init*_advanced() followed by reset() with different pledgedSrcSiz 2016-09-26 16:41:05 +02:00
Yann Collet
97b378a6f8 Streaming : dictionary compression on multiple files / segments can correctly provide srcSize into header (when provided) using pledgedSrcSize. 2016-09-21 17:20:19 +02:00
Yann Collet
1eb2fdc74f bumped version number 2016-09-18 12:21:47 +02:00
Yann Collet
4cb212938c introduced ZSTD_resetCStream() 2016-09-15 14:54:07 +02:00
Yann Collet
d7c6589df8 support ZSTD_sizeof_*() on NULL
added ZSTD_sizeof_CDict()
2016-09-15 02:57:27 +02:00
Yann Collet
e91c4b4cef introduced ZSTD_resetDStream() .
added : ZSTD_sizeof_DDict()
2016-09-14 16:55:44 +02:00
Yann Collet
64deef3bee Fixed srcSize=1 2016-09-14 00:16:07 +02:00
Yann Collet
ac175d46d4 updated comments 2016-09-13 00:51:47 +02:00
Yann Collet
b3060f7a9e changed streaming decoder behavior : now, when all compressed frame is consumed, it means decompression is completed, with regenerated data fully flushed. 2016-09-09 16:44:16 +02:00
Yann Collet
01c199226a updated decompression streaming example 2016-09-08 19:29:04 +02:00
Yann Collet
0e07bf3f60 added comments on searchLength min / max (#337) 2016-09-07 06:33:02 +02:00
Yann Collet
1d4208c029 clarified streaming decompression inlined doc 2016-09-06 05:16:40 +02:00
Yann Collet
7c83dfd5c2 ZSTD_frameHeaderSize_prefix (#340), as result of ZSTD_initStream 2016-09-05 19:47:43 +02:00
Yann Collet
fa72f6bdce clarified inline doc for streaming 2016-09-05 17:39:56 +02:00
Yann Collet
7304eb7c09 bumped version number 2016-09-01 15:49:26 -07:00
Yann Collet
901e85fe26 version bump 2016-08-31 07:51:25 -07:00
Yann Collet
4ded9e591c added boilerplate 2016-08-30 11:06:28 -07:00
Yann Collet
4bf317dd00 first version supporting legacy streams (transparent decoding) 2016-08-28 07:43:34 -07:00
Yann Collet
87c18b2ebd fixed multiple minor warnings for XCode 2016-08-26 01:43:47 +02:00
Yann Collet
17e482efdd added ZSTD_setDStreamParameter() 2016-08-23 16:58:10 +02:00
Yann Collet
70e3b31306 fixed playtests on os-x 2016-08-23 01:18:06 +02:00
Yann Collet
cb3276329a added sizeof CStream and DStream 2016-08-23 00:31:59 +02:00
Yann Collet
7be46bf8f2 promoted streaming API to stable
(except _advanced() variants)
2016-08-19 18:39:36 +02:00
Yann Collet
fdba57d513 update version number 2016-08-19 18:32:30 +02:00
Alexander Borzunov
1f48382b1a Export functions related to dictionary compression from DLL 2016-08-18 16:12:49 +05:00
Yann Collet
53e17fbd5e updated streaming API 2016-08-17 01:39:22 +02:00
Yann Collet
655393cc72 updated doc for streaming API 2016-08-16 15:11:28 +02:00
Yann Collet
104e5b072d added : streaming decompression API 2016-08-16 15:11:28 +02:00
Yann Collet
5a0c8e2439 new streaming API (compression) 2016-08-16 15:11:27 +02:00
Yann Collet
ae40b18d55 bumped library number 2016-08-03 01:59:21 +02:00
Yann Collet
3ca750372d updated doc (#269) 2016-08-01 02:26:20 +02:00
Yann Collet
c0ce4f1211 slightly improved compression speed 2016-07-30 00:55:13 +02:00
Yann Collet
6b615d32cd Updated API comments, following suggestions by Bryan O'Sullivan 2016-07-29 19:40:37 +02:00
Yann Collet
4c5bbf64f9 fixed : frame concatenation without checksum 2016-07-28 20:30:25 +02:00
Yann Collet
60ba31c570 zbuff uses ZSTD_compressEnd() 2016-07-28 19:55:09 +02:00
Yann Collet
62470b4bab Changed ZSTD_compressEnd() 2016-07-28 15:29:08 +02:00
Yann Collet
d469a98c01 Clarified API comments, from suggestions by ‎Bryan O'Sullivan‎ 2016-07-28 04:55:03 +02:00
Yann Collet
5b56739b63 created ZSTD_compressContinueThenEnd() 2016-07-28 01:17:22 +02:00
Yann Collet
4110534886 ZSTD_maxCLevel() is promoted to "stable" API (#254, by @FrancescAlted) 2016-07-27 15:09:11 +02:00
Yann Collet
7bf72bbf5e update header to v0.8 2016-07-22 14:37:09 +02:00
Yann Collet
d5c5a77990 minor comments clarifications 2016-07-20 13:35:14 +02:00
Yann Collet
cf05b9d477 ZSTD_getBlockSizeMax() 2016-07-18 16:52:10 +02:00
Yann Collet
85f3919960 moved zstd.h to /lib 2016-07-17 20:42:21 +02:00
inikep
23a0889301 separation of lib/ into common/, compress/, decompress/, dictBuilder/, legacy/ 2016-04-22 12:43:18 +02:00
Yann Collet
e02808ffc5 bumped lib version to 0.6.1
added ZSTD_VERSION_STRING
2016-04-20 22:46:16 +02:00
Yann Collet
ee0229287c changed version to v0.6.0 2016-02-25 14:53:35 +01:00
Yann Collet
7d36028078 Integrate dictBuilder into libzstd 2016-02-12 00:10:25 +01:00
Yann Collet
982ffc773d changed enum type name to ZSTD_ErrorCode 2016-02-05 02:33:10 +01:00
Yann Collet
953ce72f4a minor comments refactoring 2016-02-04 15:28:14 +01:00
Yann Collet
7d968c7bdd move _usingDict() to stable API (zstd.h) 2016-02-03 02:11:32 +01:00
Yann Collet
59d1f79768 variable litblock header size 2016-01-23 19:28:41 +01:00
Yann Collet
fba6aed175 changed : ZSTD_LEGACY_SUPPORT set to 0 by default within zstd_decompress.c (#113) 2016-01-18 12:03:54 +01:00
Yann Collet
a87278a4f0 small compression speed 2016-01-17 00:12:55 +01:00
Yann Collet
ecd651bd91 added ZSTD_duplicateCCtx() 2016-01-07 15:35:18 +01:00
Yann Collet
722504c2a0 update version to 0.4.6 2015-12-31 18:32:15 +01:00
Yann Collet
deb078b9b1 added : -m : decompress multiple files 2015-12-17 20:30:14 +01:00
Christophe Chevalier
7b05324a71 Only define ZSTDLIB_API when building a Windows DLL 2015-12-09 17:12:12 +01:00
Christophe Chevalier
c6e845398a Add ZSTDLIB_API macro to prefix all exported methods with__declspec(dllexport) when building a DLL (on windows) 2015-12-07 17:48:53 +01:00
Yann Collet
417890cec2 strengthened streaming bufferless compression 2015-12-04 17:16:37 +01:00
Yann Collet
6a2f03295c update version to 0.4.2 2015-12-02 15:05:22 +01:00
Yann Collet
7f6e91fa98 fixed library compilation 2015-11-11 14:39:50 +01:00
Yann Collet
5be2dd25f2 Changed Library source tree
- no more zstdhc ; zstd.h is enough
- ZSTD_compress() now needs a compressionLevel
- separated zstd_compress.c and zstd_decompress.c
- updated zstdcli, fullbench, fuzzer with new API
2015-11-11 13:43:58 +01:00
Yann Collet
43e0cd512a small blocks params 2015-11-09 16:38:17 +01:00
Yann Collet
f48e35c206 minor bt improvements 2015-11-07 01:13:31 +01:00
Yann Collet
f12c1304a8 integrate fast mode 2015-11-05 18:16:59 +01:00
Yann Collet
3564487614 lazydeep 2015-11-02 16:14:46 +01:00
Yann Collet
7671f393be v0.3.2 2015-11-02 12:17:39 +01:00
Yann Collet
aa074051d6 decoding support for legacy v0.2 format 2015-10-30 11:21:50 +01:00
Yann Collet
083fcc82fc HC params 2015-10-25 14:06:35 +01:00
Yann Collet
353c5d26cf unified ctx naming convention 2015-10-21 14:39:26 +01:00
Yann Collet
f42803e5b4 restored ZSTD_compressCCtx() def 2015-10-21 13:31:46 +01:00
Yann Collet
7010c27a13 Added advanced compression functions 2015-10-21 09:07:25 +01:00
Yann Collet
b1f3f4b565 update huff0 2015-10-18 22:18:32 +01:00
Yann Collet
5abd8203cb Fix : decompression i/o detects flush write errors 2015-08-27 03:16:04 +01:00
Yann Collet
96f3b2c0f7 zstd_compress() no longer requires maxDstSize >= ZSTD_compressBound(srcSize) 2015-08-07 15:50:42 +01:00
Yann Collet
213089c078 Updated FSE
Added clang and g++ tests
2015-06-18 07:43:16 -08:00
Yann Collet
c5d46b5c90 New streaming API behavior, to solve issue 19 (https://github.com/Cyan4973/zstd/issues/19) 2015-02-16 18:06:26 +01:00
Yann Collet
4856a00164 Initial release 2015-01-24 01:58:16 +01:00