Yann Collet
ecb0f46866
add controls over streaming buffers
2017-06-21 17:25:01 -07:00
Yann Collet
204b6b7ef6
fixed streaming buffered allocation with CDict compression
2017-06-21 15:13:00 -07:00
Yann Collet
7bd1a2900e
added ZSTD_dictMode_e to control dictionary loading mode
2017-06-21 11:50:33 -07:00
Yann Collet
e51d51bdf7
fixed memcpy() overlap
2017-06-20 17:44:55 -07:00
Yann Collet
466f92eaa6
removed one useless streaming compression stage, detected by @terrelln
2017-06-20 16:25:29 -07:00
Yann Collet
c3bce24ef4
fixed potential dangling pointer, detected by @terrelln
2017-06-20 16:09:11 -07:00
Yann Collet
b44ab82f7a
ensure new ZSTD_strategy starts at value 1
2017-06-20 14:11:49 -07:00
Yann Collet
c08e649e95
first implementation of bench.c with new API ZSTD_compress_generic()
...
Doesn't speed optimize this buffer-to-buffer scenario yet.
Still internally defers to streaming implementation.
Also : fixed a long standing bug in ZSTDMT streaming API.
2017-06-19 18:25:35 -07:00
Nick Terrell
55f9cd4942
[libzstd] Fix UBSAN failure
2017-06-19 15:12:28 -07:00
Yann Collet
bf99150be3
update new api presentation in zstd.h and manual
2017-06-19 12:56:25 -07:00
Yann Collet
d7a3bffba9
new api : setting compression parameters is refused if a dictionary is already loaded
2017-06-19 11:53:01 -07:00
Yann Collet
381e66cfbd
added ZSTD_clampCParams()
...
now ZSTD_adjustCParams() is always successful,
it always produces a valid CParams
2017-06-16 17:34:54 -07:00
Yann Collet
aee916e37c
fixed +/-1 error for pledgedSrcSizePlusOne
2017-06-16 17:02:35 -07:00
Yann Collet
d3de3d51a3
fix attempt 2 : Visual sign conversion warning
2017-06-16 16:51:33 -07:00
Yann Collet
944be54774
fixed attempt : minor Visual sign conversion warning
2017-06-16 14:05:01 -07:00
Yann Collet
b26728c9c8
added ZSTD_startNewCompression()
2017-06-16 14:00:46 -07:00
Yann Collet
a0ba849fe6
changed frameContentSize field to pledgedSrcSizePlusOne
...
pledgedSrcSize is proper : it's a promise, not yet fulfilled.
It will be controlled at the end.
PlusOne is meant to have 0 (default) == unknown
2017-06-16 13:29:17 -07:00
Yann Collet
2cf7755da7
fix : pledgedSrcSize correctly reset to unknown in "continue" mode
2017-06-16 12:34:41 -07:00
Yann Collet
9e73f2f320
fix : correctly reset pledgedSrcSize to unknown status
...
when starting a new compression with an existing context
2017-06-16 12:24:01 -07:00
Yann Collet
33873f0e74
fixed : new advanced AIP : setting nbThreads to the same value > 1
2017-06-16 12:04:21 -07:00
Yann Collet
559ee82e90
fixed : calling ZSTD_compress_generic() to end-flush a stream in multiple steps
2017-06-16 11:58:21 -07:00
Yann Collet
bd18c885a3
added ZSTD_CCtx_reset
2017-06-16 10:17:50 -07:00
Yann Collet
cc9f9b7f4c
protection : ZSTD_CONTENTSIZE_UNKNOWN automatically disables contentSizeFlag
2017-06-15 18:17:34 -07:00
Yann Collet
05ae4b2190
added protection : MT incompatible with Static allocation
2017-06-15 18:03:34 -07:00
Yann Collet
f129fd3970
disabled MT code path when ZSTD_MULTITHREAD is not defined
2017-06-11 18:46:09 -07:00
Yann Collet
23aace9778
added control stage to MT mode
2017-06-11 18:32:36 -07:00
Yann Collet
f35e2de61c
linked newAPI to ZSTDMT
2017-06-05 18:32:48 -07:00
Yann Collet
8c910d2097
updated ZSTDMT streaming API
...
ZSTDMT streaming API is now similar
and has same capabilites as single-thread streaming API.
It makes it easier to blend them together.
2017-06-03 01:15:02 -07:00
Yann Collet
58e8d793e1
made debug definitions common within zstd_internal.h
2017-06-02 18:20:48 -07:00
Yann Collet
c35e535002
added support for multithreading parameters
2017-06-01 18:44:06 -07:00
Yann Collet
c4a5a21c5c
created ZSTDMT_sizeof_CCtx() and POOL_sizeof()
...
required by ZSTD_sizeofCCtx() while adding a ZSTDMT_CCtx*
2017-06-01 17:56:14 -07:00
Yann Collet
cd2892fd1e
protected impossible switch(){default:} with assert(0)
...
can be converted into assume(0) in some future
2017-06-01 09:44:54 -07:00
Yann Collet
06589fe516
Merge branch 'advancedAPI2' of github.com:facebook/zstd into advancedAPI2
2017-05-31 10:03:20 -07:00
Yann Collet
18ab5affa5
fixed visual warning
2017-05-31 09:59:22 -07:00
Yann Collet
9a691e0f55
fixed visual warnings
2017-05-31 01:17:44 -07:00
Yann Collet
01b1549f83
finally converted ZSTD_compressStream_generic() to use {in,ou}Buffer
...
replacing the older read/write variables from ZBUFF_* era.
Mostly to help code readability.
Fixed relevant callers.
2017-05-30 18:10:26 -07:00
Yann Collet
c4f46b94ce
ZSTD_createCCtx_advanced() now uses ZSTD_calloc()
...
initially uses calloc() instead of memset().
Performance improvement is unlikely measurable,
since ZSTD_CCtx is now very small,
with all tables transferred into workSpace.
2017-05-30 17:45:37 -07:00
Yann Collet
deee6e523f
expose ZSTD_compress_generic_simpleArgs()
...
which is a binding towards ZSTD_compress_generic()
using only integral types for arguments.
2017-05-30 17:42:00 -07:00
Yann Collet
ae728a43b8
removed defaultCustomMem
...
now ZSTD_customCMem is promoted as new default.
Advantages : ZSTD_customCMem = { NULL, NULL, NULL},
so it's natural default after a memset.
ZSTD_customCMem is public constant
(defaultCustomMem was private only).
Also : makes it possible to introduce ZSTD_calloc(),
which can now default to stdlib's calloc()
when it detects system default.
Fixed zlibwrapper which depended on defaultCustomMem.
2017-05-30 17:11:39 -07:00
Yann Collet
beb62b15a8
Merge branch 'dev' into advancedAPI2
...
Fixed conflic in zstd_decompress.c
2017-05-30 16:18:57 -07:00
Yann Collet
cdf7e82222
Added ZSTD_initStaticCDict()
2017-05-25 18:05:49 -07:00
Yann Collet
25989e361c
updated ZSTD_estimate?DictSize() to pass parameter byReference
...
resulting ?Dict object is smaller when created byReference.
Seems better than a documentation note.
2017-05-25 15:07:37 -07:00
Yann Collet
0fdc71c3dc
added ZSTD_initStaticDCtx()
2017-05-24 17:41:41 -07:00
Nick Terrell
55fc1f91fd
[zstd] Fix up formatting edge cases for clang-format
2017-05-24 13:50:10 -07:00
Yann Collet
c7fe262dc9
added ZSTD_initStaticCCtx()
...
makes it possible to statically or externally allocate CCtx.
static CCtx will only use provided memory area,
it will never resize nor malloc.
2017-05-23 13:20:41 -07:00
Yann Collet
5ac72b417c
Buffered are now allocated inside workSpace
2017-05-23 11:18:24 -07:00
Yann Collet
1880337c30
Simplifier compression call graph
...
Everything converge towards ZSTD_compressBegin_internal
which delegated to ZSTD_copyCCtx_internal if cdict!=NULL.
This simplifies routing which was previously depending on cdict.
2017-05-22 18:21:51 -07:00
Yann Collet
b0739bcf8f
simplified reset by removing full-reset policy
...
this was meant to be applied prior to dictionary loading.
But effectively, it seems redundant with later loading stage,
so it can be skipped safely.
2017-05-22 17:45:15 -07:00
Yann Collet
1ad7c82eb5
Implemented separation between requested and applied parameters
...
first version to pass cli tests with -DZSTD_NEWAPI
2017-05-22 17:06:04 -07:00
Yann Collet
24de7b0346
Implemented ZSTD_CCtx_refCDict()
2017-05-22 13:05:45 -07:00