]>
git.ipfire.org Git - thirdparty/zstd.git/log
Yann Collet [Fri, 2 Jun 2017 21:01:21 +0000 (14:01 -0700)]
ensure zlibwrapper uses ZSTD_malloc() and ZSTD_free()
which is compatible with { NULL, NULL, NULL }
Yann Collet [Fri, 2 Jun 2017 20:47:11 +0000 (13:47 -0700)]
minor indent
Yann Collet [Fri, 2 Jun 2017 18:36:47 +0000 (11:36 -0700)]
added POOL_sizeof() for single-thread
Yann Collet [Fri, 2 Jun 2017 01:44:06 +0000 (18:44 -0700)]
added support for multithreading parameters
Yann Collet [Fri, 2 Jun 2017 00:56:14 +0000 (17:56 -0700)]
created ZSTDMT_sizeof_CCtx() and POOL_sizeof()
required by ZSTD_sizeofCCtx() while adding a ZSTDMT_CCtx*
Yann Collet [Thu, 1 Jun 2017 16:44:54 +0000 (09:44 -0700)]
protected impossible switch(){default:} with assert(0)
can be converted into assume(0) in some future
Yann Collet [Wed, 31 May 2017 17:03:20 +0000 (10:03 -0700)]
Merge branch 'advancedAPI2' of github.com:facebook/zstd into advancedAPI2
Yann Collet [Wed, 31 May 2017 16:59:22 +0000 (09:59 -0700)]
fixed visual warning
Yann Collet [Wed, 31 May 2017 08:17:44 +0000 (01:17 -0700)]
fixed visual warnings
Yann Collet [Wed, 31 May 2017 01:10:26 +0000 (18:10 -0700)]
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.
Yann Collet [Wed, 31 May 2017 00:45:37 +0000 (17:45 -0700)]
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.
Yann Collet [Wed, 31 May 2017 00:42:00 +0000 (17:42 -0700)]
expose ZSTD_compress_generic_simpleArgs()
which is a binding towards ZSTD_compress_generic()
using only integral types for arguments.
Yann Collet [Wed, 31 May 2017 00:11:39 +0000 (17:11 -0700)]
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.
Yann Collet [Tue, 30 May 2017 23:37:19 +0000 (16:37 -0700)]
removed mtctx->cstream
use the first cctx in pool when ZSTDMT is used in single-thread mode
now that cctx and cstream are the same object.
Yann Collet [Tue, 30 May 2017 23:18:57 +0000 (16:18 -0700)]
Merge branch 'dev' into advancedAPI2
Fixed conflic in zstd_decompress.c
Yann Collet [Tue, 30 May 2017 23:12:06 +0000 (16:12 -0700)]
added ZSTDMT_createCCtx_advanced()
make it possible to use custom allocators
Yann Collet [Tue, 30 May 2017 17:02:03 +0000 (10:02 -0700)]
Merge branch 'advancedAPI2' of github.com:facebook/zstd into advancedAPI2
Yann Collet [Sun, 28 May 2017 00:09:06 +0000 (17:09 -0700)]
fixed minor cast warning
Yann Collet [Sat, 27 May 2017 07:21:33 +0000 (00:21 -0700)]
mtctx->jobs allocate its own memory space
to make ZSTDMT_CCtx_s size predictable
so that it can be included in CCtx
Yann Collet [Sat, 27 May 2017 07:03:08 +0000 (00:03 -0700)]
static dctx is incompatible with legacy support
documented, and runtime tested
Yann Collet [Fri, 26 May 2017 16:48:12 +0000 (18:48 +0200)]
Merge pull request #712 from terrelln/dev
[linux-kernel] Fix formatting and Makefile
Nick Terrell [Fri, 26 May 2017 01:34:13 +0000 (18:34 -0700)]
[linux-kernel] Fix duplicate symbols when built-in to kernel
Yann Collet [Fri, 26 May 2017 01:29:08 +0000 (18:29 -0700)]
fixed a few code comments : ZSTD_getFrameParams => ZSTD_getFrameHeader
Yann Collet [Fri, 26 May 2017 01:05:49 +0000 (18:05 -0700)]
Added ZSTD_initStaticCDict()
Yann Collet [Fri, 26 May 2017 00:31:33 +0000 (02:31 +0200)]
Merge pull request #711 from ldv-alt/dev
Fix typo in libzstd.a-mt make rules
Dmitry V. Levin [Thu, 25 May 2017 23:43:05 +0000 (23:43 +0000)]
Fix typo in libzstd.a-mt make rules
The macro name is ZSTD_MULTITHREAD, not ZSTD_MULTHREAD.
Fixes: ca6fae78080d ("Add MT enabled targets for libzstd")
Yann Collet [Thu, 25 May 2017 22:44:06 +0000 (15:44 -0700)]
added ZSTD_initStaticDDict()
Yann Collet [Thu, 25 May 2017 22:07:37 +0000 (15:07 -0700)]
updated ZSTD_estimate?DictSize() to pass parameter byReference
resulting ?Dict object is smaller when created byReference.
Seems better than a documentation note.
Nick Terrell [Thu, 25 May 2017 20:56:46 +0000 (13:56 -0700)]
[linux-kernel] Fix clang-format edge case with goto labels
Yann Collet [Thu, 25 May 2017 00:41:41 +0000 (17:41 -0700)]
added ZSTD_initStaticDCtx()
Yann Collet [Wed, 24 May 2017 22:42:24 +0000 (15:42 -0700)]
merged DStream's inBuff and outBuff into a single buffer
Saves one malloc().
Also : makes it easier to implement static allocation
Yann Collet [Wed, 24 May 2017 22:10:17 +0000 (00:10 +0200)]
Merge pull request #710 from terrelln/dev
[linux-kernel] Minor formatting changes
Nick Terrell [Wed, 24 May 2017 20:52:36 +0000 (13:52 -0700)]
[linux-kernel] Fix some up clang-format edge cases
Nick Terrell [Wed, 24 May 2017 20:50:10 +0000 (13:50 -0700)]
[zstd] Fix up formatting edge cases for clang-format
Yann Collet [Wed, 24 May 2017 20:15:19 +0000 (13:15 -0700)]
fixed performance regression with ZSTD_decompress() on small files
memset() was a quick fix to initialization problems,
but initialize too much space (tables, buffers)
which show up in decompression speed of ZSTD_decompress()
since it needs to recreate DCtx at each invocation.
Fixed by only initialization relevant pointers and size fields.
Yann Collet [Wed, 24 May 2017 18:56:47 +0000 (20:56 +0200)]
Merge pull request #709 from codicodi/fix-cmake
CMake improvements
codicodi [Wed, 24 May 2017 08:48:10 +0000 (10:48 +0200)]
CMake improvements
Yann Collet [Tue, 23 May 2017 23:19:43 +0000 (16:19 -0700)]
Merged ZSTD_DCtx and ZSTD_DStream objects
They are now the same object.
It's recommended to keep both types in source code
as previous versions of library (<v1.3.0)
still need this differentiation.
Yann Collet [Tue, 23 May 2017 22:41:55 +0000 (15:41 -0700)]
move MEM_readMINMATCH() into zstd_opt.h
which is its only user.
Use case too narrow to belong to mem.h.
renamed to ZSTD_readMINMATCH()
Yann Collet [Tue, 23 May 2017 20:16:00 +0000 (13:16 -0700)]
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.
Yann Collet [Tue, 23 May 2017 18:18:24 +0000 (11:18 -0700)]
Buffered are now allocated inside workSpace
Yann Collet [Tue, 23 May 2017 01:21:51 +0000 (18:21 -0700)]
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.
Yann Collet [Tue, 23 May 2017 00:45:15 +0000 (17:45 -0700)]
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.
Yann Collet [Tue, 23 May 2017 00:06:04 +0000 (17:06 -0700)]
Implemented separation between requested and applied parameters
first version to pass cli tests with -DZSTD_NEWAPI
Yann Collet [Mon, 22 May 2017 22:10:59 +0000 (00:10 +0200)]
Merge pull request #708 from terrelln/lk
[linux-kernel] Update patches in response to comments
Yann Collet [Mon, 22 May 2017 20:05:45 +0000 (13:05 -0700)]
Implemented ZSTD_CCtx_refCDict()
Yann Collet [Mon, 22 May 2017 19:33:56 +0000 (12:33 -0700)]
Merge branch 'dev' into advancedAPI2
Yann Collet [Mon, 22 May 2017 19:25:09 +0000 (21:25 +0200)]
Merge pull request #705 from terrelln/dev
[libzstd] Allow users to define custom visibility
Yann Collet [Sat, 20 May 2017 02:46:15 +0000 (19:46 -0700)]
ZSTD_compress_generic() can handle dictionary compression
Nick Terrell [Sat, 20 May 2017 01:01:59 +0000 (18:01 -0700)]
[libzstd] Allow users to define custom visibility
Yann Collet [Fri, 19 May 2017 18:27:43 +0000 (11:27 -0700)]
fixing symbol.c test
I believe it would be better to rely on fuzzer tests compiled with dll
Yann Collet [Fri, 19 May 2017 18:04:41 +0000 (11:04 -0700)]
ZSTD_CCtx_setParameter() only works during initialization stage
and generate a stage_wrong error otherwise.
Yann Collet [Fri, 19 May 2017 17:56:11 +0000 (10:56 -0700)]
fixed declaration-after-statement warning
Yann Collet [Fri, 19 May 2017 17:51:30 +0000 (10:51 -0700)]
changed ZSTD_BLOCKSIZE_ABSOLUTEMAX into ZSTD_BLOCKSIZE_MAX
Also :
change ZSTD_getBlockSizeMax() into ZSTD_getBlockSize()
created ZSTD_BLOCKSIZELOG_MAX
Yann Collet [Fri, 19 May 2017 17:17:59 +0000 (10:17 -0700)]
ZSTD_compress_generic() supports multiple successive frames
also : clarified streaming API implementation
Yann Collet [Thu, 18 May 2017 01:36:15 +0000 (18:36 -0700)]
Added ZSTD_compress_generic()
Used in fileio.c (zstd cli).
Need to set macro ZSTD_NEWAPI to trigger it.
Nick Terrell [Wed, 17 May 2017 22:06:41 +0000 (15:06 -0700)]
[linux-kernel] Fix a weird clang-format corner case
Nick Terrell [Wed, 17 May 2017 21:56:37 +0000 (14:56 -0700)]
[linux-kernel] Update tests Makefile
Nick Terrell [Wed, 17 May 2017 21:52:12 +0000 (14:52 -0700)]
[linux-kernel] Update zstd.diff
Nick Terrell [Wed, 17 May 2017 21:51:41 +0000 (14:51 -0700)]
[linux-kernel] Move ZSTD_STATIC_ASSERT to zstd_internal.h
Nick Terrell [Wed, 17 May 2017 21:40:46 +0000 (14:40 -0700)]
[linux-kernel] clang-format lib/zstd/
Nick Terrell [Wed, 17 May 2017 21:39:57 +0000 (14:39 -0700)]
[linux-kernel] Rename MEM_* functions to ZSTD_*
Nick Terrell [Wed, 17 May 2017 19:27:58 +0000 (12:27 -0700)]
Add clang-format config
Nick Terrell [Wed, 17 May 2017 18:58:53 +0000 (11:58 -0700)]
[linux-kernel] Dual license with GPLv2
Yann Collet [Wed, 17 May 2017 01:10:11 +0000 (18:10 -0700)]
removed useless variable from CCtx
CStream's pledgedSrcSize is no longer necessary
srcSize control is realized within bufferless interface.
Yann Collet [Wed, 17 May 2017 00:33:08 +0000 (17:33 -0700)]
Merge branch 'dev' into advancedAPI2
Yann Collet [Wed, 17 May 2017 00:32:33 +0000 (17:32 -0700)]
minor coding style update
reduced some long lines
Yann Collet [Wed, 17 May 2017 00:26:43 +0000 (17:26 -0700)]
minor comment clarifications
Nick Terrell [Wed, 17 May 2017 00:21:22 +0000 (17:21 -0700)]
[linux-kernel] Update zstd.diff
Nick Terrell [Wed, 17 May 2017 00:16:00 +0000 (17:16 -0700)]
Remove cross-platform macros and dead code
Nick Terrell [Tue, 16 May 2017 23:55:52 +0000 (16:55 -0700)]
[linux-kernel] Fix whitespace edge case with script
Nick Terrell [Tue, 16 May 2017 23:55:03 +0000 (16:55 -0700)]
[linux-kernel] Update kernelize.sh script for edge cases
Nick Terrell [Tue, 16 May 2017 23:47:49 +0000 (16:47 -0700)]
[linux-kernel] Don't undef current (use curr)
Yann Collet [Tue, 16 May 2017 23:32:29 +0000 (16:32 -0700)]
Merge branch 'dev' into advancedAPI2
Yann Collet [Tue, 16 May 2017 23:32:10 +0000 (01:32 +0200)]
Merge pull request #702 from facebook/newPrototype
added prototype ZSTD_decompressBegin_usingDDict() (#700)
Yann Collet [Tue, 16 May 2017 23:28:24 +0000 (16:28 -0700)]
pedantic : added one error check
on a function which (today) never fails.
But who knows, maybe tomorrow ...
Yann Collet [Tue, 16 May 2017 23:18:10 +0000 (01:18 +0200)]
Merge pull request #701 from terrelln/lk-xxh
[linux-kernel] Separate xxhash into its own module
Nick Terrell [Tue, 16 May 2017 23:13:51 +0000 (16:13 -0700)]
[linux-kernel] Remove unused variables in test
Yann Collet [Tue, 16 May 2017 23:12:23 +0000 (16:12 -0700)]
added prototype ZSTD_versionString()
Nick Terrell [Tue, 16 May 2017 23:03:36 +0000 (16:03 -0700)]
[linux-kernel] Update header comments
Yann Collet [Tue, 16 May 2017 23:05:27 +0000 (16:05 -0700)]
added prototype ZSTD_decompressBegin_usingDDict (#700)
Nick Terrell [Tue, 16 May 2017 22:54:02 +0000 (15:54 -0700)]
Add zstd.diff
Nick Terrell [Tue, 16 May 2017 19:56:38 +0000 (12:56 -0700)]
[linux-kernel] Separate xxhash into its own module
Yann Collet [Tue, 16 May 2017 18:34:38 +0000 (11:34 -0700)]
removed gcc compilation flag -Wbad-function-cast
It makes it more difficult to directly cast the result of a function,
requiring to store the result in an intermediate variable.
It does not necessarily help readability,
and this restriction can be difficult to overcome in some constructions,
like some macros.
also : fixed minor Visual conversion warnings in datagencli.c
Yann Collet [Tue, 16 May 2017 01:15:08 +0000 (18:15 -0700)]
fixed vla warning on linux
Yann Collet [Tue, 16 May 2017 00:44:04 +0000 (17:44 -0700)]
fixed redundant declarations in legacy v0.5 and v0.7 decoders
triggered by new flag -Wredundant-decls
Yann Collet [Tue, 16 May 2017 00:15:46 +0000 (17:15 -0700)]
added several compilation flags
Yann Collet [Fri, 12 May 2017 23:29:19 +0000 (16:29 -0700)]
pushed enum values for strategy by one (ZSTD_fast==1)
this makes it possible to use `0` to mean:
"do not change strategy"
Yann Collet [Fri, 12 May 2017 22:59:48 +0000 (15:59 -0700)]
changed macro LOADCPARAMS by static function ZSTD_cLevelToCParams()
for improved compiler checks.
Also : ensure most parameters can receive value "0"
to mean "do not change".
Yann Collet [Fri, 12 May 2017 22:31:53 +0000 (15:31 -0700)]
added ZSTD_CCtx_setParameter()
Yann Collet [Fri, 12 May 2017 20:53:46 +0000 (13:53 -0700)]
better error code when compressing using NULL CDict
which is not allowed (but detected, and generates an error).
Yann Collet [Fri, 12 May 2017 20:46:49 +0000 (13:46 -0700)]
made ZSTD_compress_generic() definition accessible
note that the implementation is not done yet.
Yann Collet [Fri, 12 May 2017 19:36:11 +0000 (12:36 -0700)]
updated Advanced API proposal
only declarations in zstd.h
Yann Collet [Thu, 11 May 2017 17:45:01 +0000 (10:45 -0700)]
Merge pull request #696 from joscollin/wip-lib-legacy-fallthrough-warn
lib/legacy: warning: this statement may fall through
Yann Collet [Thu, 11 May 2017 17:44:27 +0000 (10:44 -0700)]
Merge pull request #695 from joscollin/wip-lib-compress-fallthrough-warn
lib/compress: warning: this statement may fall through
Yann Collet [Thu, 11 May 2017 17:43:45 +0000 (10:43 -0700)]
Merge pull request #690 from joscollin/wip-lib-common-fallthrough-warning
lib/common: warning: this statement may fall through
Jos Collin [Thu, 11 May 2017 08:57:34 +0000 (14:27 +0530)]
lib/legacy: warning: this statement may fall through
The following warning appears during build at sevaral places.
../lib/legacy/zstd_v04.c:819:40: warning: this statement may fall through [-Wimplicit-fallthrough=]
case 7: bitD->bitContainer += (size_t)(((const BYTE*)(bitD->start))[6]) << (sizeof(size_t)*8 - 16);
../lib/legacy/zstd_v05.c:821:40: warning: this statement may fall through [-Wimplicit-fallthrough=]
case 7: bitD->bitContainer += (size_t)(((const BYTE*)(bitD->start))[6]) << (sizeof(size_t)*8 - 16);
../lib/legacy/zstd_v06.c:913:40: warning: this statement may fall through [-Wimplicit-fallthrough=]
case 7: bitD->bitContainer += (size_t)(((const BYTE*)(srcBuffer))[6]) << (sizeof(bitD->bitContainer)*8 - 16);
../lib/legacy/zstd_v07.c:583:40: warning: this statement may fall through [-Wimplicit-fallthrough=]
case 7: bitD->bitContainer += (size_t)(((const BYTE*)(srcBuffer))[6]) <<
(sizeof(bitD->bitContainer)*8 - 16);
Signed-off-by: Jos Collin <jcollin@redhat.com>
Jos Collin [Thu, 11 May 2017 07:47:20 +0000 (13:17 +0530)]
lib/compress: warning: this statement may fall through
The following warning appears during build.
../lib/compress/huf_compress.c: In function ‘HUF_compress1X_usingCTable’:
../lib/compress/huf_compress.c:444:8: warning: this statement may fall through [-Wimplicit-fallthrough=]
if (sizeof((stream)->bitContainer)*8 < HUF_TABLELOG_MAX*4+7) HUF_FLUSHBITS(stream)
^
../lib/compress/huf_compress.c:465:18: note: in expansion of macro ‘HUF_FLUSHBITS_2’
HUF_FLUSHBITS_2(&bitC);
^~~~~~~~~~~~~~~
../lib/compress/huf_compress.c:466:9: note: here
case 2 : HUF_encodeSymbol(&bitC, ip[n+ 1], CTable);
../lib/compress/zstd_compress.c: In function ‘ZSTD_compressStream_generic’:
../lib/compress/zstd_compress.c:3366:34: warning: this statement may fall through [-Wimplicit-fallthrough=]
zcs->streamStage = zcss_flush; /* pass-through to flush stage */
~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
../lib/compress/zstd_compress.c:3369:9: note: here
case zcss_flush:
Signed-off-by: Jos Collin <jcollin@redhat.com>
Jos Collin [Tue, 9 May 2017 03:06:05 +0000 (08:36 +0530)]
lib/common: warning: this statement may fall through
The following warning appears during the build. Fixed the review comments too.
zstd/lib/common/bitstream.h: In function ‘BIT_initDStream’:
zstd/lib/common/bitstream.h:277:33: warning: this statement may fall through [-Wimplicit-fallthrough=]
case 7: bitD->bitContainer += (size_t)(((const BYTE*)(srcBuffer))[6]) <<
(sizeof(bitD->bitContainer)*8 - 16);
Signed-off-by: Jos Collin <jcollin@redhat.com>
Yann Collet [Thu, 11 May 2017 01:46:48 +0000 (18:46 -0700)]
Merge pull request #692 from terrelln/btopt
Rename ZSTD_btopt2 to ZSTD_btultra