]>
git.ipfire.org Git - thirdparty/zstd.git/log
Nick Terrell [Thu, 20 Jul 2017 20:33:55 +0000 (13:33 -0700)]
[linux] Update patches for v3
Yann Collet [Thu, 20 Jul 2017 08:13:14 +0000 (01:13 -0700)]
pool.c : blindfix for Visual warnings
Yann Collet [Wed, 19 Jul 2017 23:01:16 +0000 (16:01 -0700)]
added --memtest=# command to fuzzer
to jump directly to relevant test section
Yann Collet [Wed, 19 Jul 2017 20:33:21 +0000 (13:33 -0700)]
blind fix for Windows Multithreading module
adds a fake 0 return value for mutex/cond init
Yann Collet [Wed, 19 Jul 2017 08:05:40 +0000 (01:05 -0700)]
check pthread_*_init() success condition
Yann Collet [Tue, 18 Jul 2017 22:40:59 +0000 (15:40 -0700)]
Merge pull request #770 from terrelln/test-mode
[zstdcli] Fix -t in streaming mode
Yann Collet [Tue, 18 Jul 2017 21:58:26 +0000 (14:58 -0700)]
Merge pull request #769 from terrelln/real-block-split
[libzstd] Fix bug in Huffman encoding
Nick Terrell [Tue, 18 Jul 2017 21:45:49 +0000 (14:45 -0700)]
[zstdcli] Fix -t in streaming mode
Nick Terrell [Tue, 18 Jul 2017 18:21:19 +0000 (11:21 -0700)]
[libzstd] Fix bug in Huffman encoding
Summary:
Huffman encoding with a bad dictionary can encode worse than the
HUF_BLOCKBOUND(srcSize), since we don't filter out incompressible
input, and even if we did, the dictionaries Huffman table could be
ill suited to compressing actual data.
The fast optimization doesn't seem to improve compression speed,
even when I hard coded fast = 1, the speed didn't improve over hard coding
it to 0.
Benchmarks:
$ ./zstd.dev -b1e5
Benchmarking levels from 1 to 5
1#Synthetic 50% :
10000000 ->
3139163 (3.186), 524.8 MB/s ,1890.0 MB/s
2#Synthetic 50% :
10000000 ->
3115138 (3.210), 372.6 MB/s ,1830.2 MB/s
3#Synthetic 50% :
10000000 ->
3222672 (3.103), 223.3 MB/s ,1400.2 MB/s
4#Synthetic 50% :
10000000 ->
3276678 (3.052), 198.0 MB/s ,1280.1 MB/s
5#Synthetic 50% :
10000000 ->
3271570 (3.057), 107.8 MB/s ,1200.0 MB/s
$ ./zstd -b1e5
Benchmarking levels from 1 to 5
1#Synthetic 50% :
10000000 ->
3139163 (3.186), 524.8 MB/s ,1870.2 MB/s
2#Synthetic 50% :
10000000 ->
3115138 (3.210), 370.0 MB/s ,1810.3 MB/s
3#Synthetic 50% :
10000000 ->
3222672 (3.103), 223.3 MB/s ,1380.1 MB/s
4#Synthetic 50% :
10000000 ->
3276678 (3.052), 196.1 MB/s ,1270.0 MB/s
5#Synthetic 50% :
10000000 ->
3271570 (3.057), 106.8 MB/s ,1180.1 MB/s
$ ./zstd.dev -b1e5 ../silesia.tar
Benchmarking levels from 1 to 5
1#silesia.tar :
211988480 ->
73651685 (2.878), 429.7 MB/s ,1096.5 MB/s
2#silesia.tar :
211988480 ->
70158785 (3.022), 321.2 MB/s ,1029.1 MB/s
3#silesia.tar :
211988480 ->
66993813 (3.164), 243.7 MB/s , 981.4 MB/s
4#silesia.tar :
211988480 ->
66306481 (3.197), 226.7 MB/s , 972.4 MB/s
5#silesia.tar :
211988480 ->
64757852 (3.274), 150.3 MB/s , 963.6 MB/s
$ ./zstd -b1e5 ../silesia.tar
Benchmarking levels from 1 to 5
1#silesia.tar :
211988480 ->
73651685 (2.878), 429.7 MB/s ,1087.1 MB/s
2#silesia.tar :
211988480 ->
70158785 (3.022), 318.8 MB/s ,1029.1 MB/s
3#silesia.tar :
211988480 ->
66993813 (3.164), 246.5 MB/s , 981.4 MB/s
4#silesia.tar :
211988480 ->
66306481 (3.197), 229.2 MB/s , 972.4 MB/s
5#silesia.tar :
211988480 ->
64757852 (3.274), 149.3 MB/s , 963.6 MB/s
Test Plan:
I added a test case to the fuzzer which crashed with ASAN before the patch
and succeeded after.
Yann Collet [Tue, 18 Jul 2017 15:26:24 +0000 (08:26 -0700)]
Merge pull request #766 from terrelln/real-block-split
[libzstd] Pull optimal parser state out of seqStore_t
Yann Collet [Tue, 18 Jul 2017 02:25:55 +0000 (19:25 -0700)]
Merge pull request #765 from terrelln/real-block-split
[libzstd] Remove ZSTD_CCtx* argument of ZSTD_compressSequences()
Nick Terrell [Mon, 17 Jul 2017 22:29:11 +0000 (15:29 -0700)]
[libzstd] Pull optimal parser state out of seqStore_t
Yann Collet [Mon, 17 Jul 2017 21:46:01 +0000 (14:46 -0700)]
Merge pull request #764 from terrelln/real-block-split
[libzstd] Refactor ZSTD_compressSequences()
Nick Terrell [Mon, 17 Jul 2017 19:27:24 +0000 (12:27 -0700)]
[libzstd] Remove ZSTD_CCtx* argument of ZSTD_compressSequences()
Nick Terrell [Sat, 15 Jul 2017 02:11:58 +0000 (19:11 -0700)]
[libzstd] Refactor ZSTD_compressSequences()
Yann Collet [Fri, 14 Jul 2017 16:09:45 +0000 (09:09 -0700)]
Merge pull request #761 from paulcruz74/file-rename
renamed pool.c to poolTests.c
Yann Collet [Fri, 14 Jul 2017 16:09:22 +0000 (09:09 -0700)]
Merge pull request #762 from facebook/errorCodes
pinned down error code enum values
Yann Collet [Fri, 14 Jul 2017 01:58:30 +0000 (18:58 -0700)]
fixed clang's -Wdocumentation
Yann Collet [Fri, 14 Jul 2017 00:12:16 +0000 (17:12 -0700)]
pinned down error code enum values
Note : all error codes are changed by this new version,
but it's expected to be the last change for existing codes.
Codes are now grouped by category, and receive a manually attributed value.
The objective is to guarantee that
error code values will not change in the future
when introducing new codes.
Intentionnal empty spaces and ranges are defined
in order to keep room for potential new codes.
Yann Collet [Thu, 13 Jul 2017 22:49:19 +0000 (15:49 -0700)]
Merge branch 'dev' of github.com:facebook/zstd into dev
Yann Collet [Thu, 13 Jul 2017 22:34:44 +0000 (15:34 -0700)]
updated NEWS regarding #760
Nick Terrell [Thu, 13 Jul 2017 19:45:39 +0000 (12:45 -0700)]
[libzstd] Increase granularity of FSECTable repeat mode
Yann Collet [Thu, 13 Jul 2017 17:24:19 +0000 (10:24 -0700)]
Merge pull request #759 from terrelln/real-block-split
[libzstd] Pull CTables into sub-structure
Yann Collet [Thu, 13 Jul 2017 17:10:13 +0000 (10:10 -0700)]
policy change : ZSTDMT automatically caps nbThreads to ZSTDMT_NBTHREADS_MAX (#760)
Previously, ZSTDMT would refuse to create the compressor.
Also : increased ZSTDMT_NBTHREADS_MAX to 256,
updated doc,
and added relevant test
Yann Collet [Thu, 13 Jul 2017 09:22:58 +0000 (02:22 -0700)]
switched ZSTDMT_compress_advanced() last argument to overlapLog
overlapRLog (== 9 - overlapLog) was a bit "strange"
as all other public entry points use overlapLog
Yann Collet [Thu, 13 Jul 2017 09:09:07 +0000 (02:09 -0700)]
clarified comment on ZSTD_p_contentSizeFlag
Nick Terrell [Thu, 13 Jul 2017 02:08:24 +0000 (19:08 -0700)]
[libzstd] Pull CTables into sub-structure
Yann Collet [Thu, 13 Jul 2017 01:32:37 +0000 (18:32 -0700)]
Merge pull request #756 from facebook/memOpt
Memory optimisations for ZSTDMT
Yann Collet [Wed, 12 Jul 2017 21:38:36 +0000 (14:38 -0700)]
Merge branch 'dev' of github.com:facebook/zstd into dev
Yann Collet [Wed, 12 Jul 2017 21:23:34 +0000 (14:23 -0700)]
slightly increased buffer pool, to cover normal "full load" scenarios
2 buffers per active worker
+ 1 buffer for input loading
+ 1 buffer for "next input" when submitting current one
+ 1 buffer stuck in queue
Yann Collet [Wed, 12 Jul 2017 00:18:26 +0000 (17:18 -0700)]
fix : ZSTDMT_compress_advanced() correctly generates checksum
when params.fParams.checksumFlag==1.
This use case used to be impossible when only ZSTD_compress() was available
Yann Collet [Tue, 11 Jul 2017 22:56:40 +0000 (15:56 -0700)]
release input buffers from inside worker thread
buffers are released sooner, which makes them available faster for next job.
=> decreases total nb of buffers necessary
Yann Collet [Tue, 11 Jul 2017 22:17:25 +0000 (15:17 -0700)]
buffer pool : all buffers have same size
to reduce memory fragmentation.
They can be used for in or out, interchangeably.
Yann Collet [Tue, 11 Jul 2017 21:59:10 +0000 (14:59 -0700)]
zstdmt : intermediate outBuffer allocated from within worker
reduces total amount of memory needed,
since jobs in queue do not have an outBuffer pre-reserved now
Yann Collet [Tue, 11 Jul 2017 21:14:07 +0000 (14:14 -0700)]
buffer pool can be invoked from multiple threads
Yann Collet [Tue, 11 Jul 2017 19:11:44 +0000 (12:11 -0700)]
Merge pull request #755 from jacquesg/solaris
Solaris fix
Jacques Germishuys [Tue, 11 Jul 2017 17:25:14 +0000 (19:25 +0200)]
fix missing symbol 'nanosleep' for Solaris
Yann Collet [Tue, 11 Jul 2017 15:54:29 +0000 (08:54 -0700)]
zstdmt: removed margin for improved memory usage
Yann Collet [Tue, 11 Jul 2017 00:16:41 +0000 (17:16 -0700)]
improved ZSTDMT_compress() memory usage
does not need the input buffer for streaming operations
also : reduced a few tests time length
Yann Collet [Mon, 10 Jul 2017 23:30:55 +0000 (16:30 -0700)]
optimized memory usage for ZSTDMT_compress()
Previously, each job would reserve a CCtx right before being posted.
The CCtx would be "part of the job description",
and only released when the job is completed (aka flushed).
For ZSTDMT_compress(), which creates all jobs first and only join at the end,
that meant one CCtx per job.
The nb of jobs used to be == nb of threads,
but since latest modification,
which reduces the size of jobs in order to spread the load of difficult areas,
it also increases the nb of jobs for large sources / small compression level.
This resulted in many more CCtx being created.
In this new version, CCtx are reserved within the worker thread.
It guaranteea there cannot be more CCtx reserved than workers (<= nb threads).
To do that, it required to make the CCtx Pool multi-threading-safe :
it can now be called from multiple threads in parallel.
Yann Collet [Mon, 10 Jul 2017 21:21:40 +0000 (14:21 -0700)]
fix : custom allocator correctly propagated to child contexts
Yann Collet [Mon, 10 Jul 2017 21:09:16 +0000 (14:09 -0700)]
extended fuzzer MT memory tests
Yann Collet [Mon, 10 Jul 2017 21:02:33 +0000 (14:02 -0700)]
fix : propagate custom allocator to ZSTDMT though ZSTD_CCtx_setParameter()
also : compile fuzzer with MT enabled
Yann Collet [Mon, 10 Jul 2017 20:48:41 +0000 (13:48 -0700)]
added --memtest to fuzzer
Yann Collet [Mon, 10 Jul 2017 19:29:57 +0000 (12:29 -0700)]
added ZSTD_sizeof_CCtx() test
Paul Cruz [Mon, 10 Jul 2017 18:32:30 +0000 (11:32 -0700)]
renamed pool.c to poolTests.c
Yann Collet [Sat, 8 Jul 2017 11:55:09 +0000 (04:55 -0700)]
bumped version nb to v1.3.1
Yann Collet [Sat, 8 Jul 2017 00:13:12 +0000 (17:13 -0700)]
fixed several conversion warnings
Yann Collet [Fri, 7 Jul 2017 23:16:14 +0000 (16:16 -0700)]
removed zbufftest from list of `all` tests
Yann Collet [Fri, 7 Jul 2017 23:14:17 +0000 (16:14 -0700)]
fixed minor Visual compilation limitation
Yann Collet [Fri, 7 Jul 2017 23:09:47 +0000 (16:09 -0700)]
fixed minor cast warning
Yann Collet [Fri, 7 Jul 2017 22:55:41 +0000 (15:55 -0700)]
target gpptest uses CXX environment variable
Yann Collet [Fri, 7 Jul 2017 22:53:20 +0000 (15:53 -0700)]
Merge branch 'dev' of github.com:facebook/zstd into dev
Yann Collet [Fri, 7 Jul 2017 22:51:24 +0000 (15:51 -0700)]
new field frameHeader.headerSize
Yann Collet [Fri, 7 Jul 2017 22:32:12 +0000 (15:32 -0700)]
ZSTD_getFrameHeader : control of windowSize limits is delegated to caller
Extracting frame header is a separate operation.
It's now possible to get frame header, whatever the window size set in it.
Yann Collet [Fri, 7 Jul 2017 22:21:35 +0000 (15:21 -0700)]
new field : ZSTD_frameHeader.frameType
Makes frame type (zstd,skippable) detection more straighforward.
ZSTD_getFrameHeader set frameContentSize=ZSTD_CONTENTSIZE_UNKNOWN to mean "field not present"
Yann Collet [Fri, 7 Jul 2017 21:19:01 +0000 (14:19 -0700)]
extended frameHeader.windowSize to unsigned long long
Yann Collet [Thu, 6 Jul 2017 19:06:43 +0000 (12:06 -0700)]
Merge pull request #751 from ivuk/fix-typo
Fix typos in README.md
Igor Vuk [Thu, 6 Jul 2017 18:43:14 +0000 (20:43 +0200)]
Fix typos in README.md
Yann Collet [Thu, 6 Jul 2017 09:48:00 +0000 (02:48 -0700)]
fixed fullbench, part 2
Yann Collet [Thu, 6 Jul 2017 09:22:57 +0000 (02:22 -0700)]
fixed fullbench
Yann Collet [Thu, 6 Jul 2017 08:42:46 +0000 (01:42 -0700)]
fixed #718, reported by @GregSlazinski, solution suggested by @mcmilk
Yann Collet [Thu, 6 Jul 2017 01:10:07 +0000 (18:10 -0700)]
minor code refactoring
Yann Collet [Thu, 6 Jul 2017 00:34:15 +0000 (17:34 -0700)]
cli : use new advanced API by default
Yann Collet [Thu, 6 Jul 2017 00:20:52 +0000 (17:20 -0700)]
clarified status of zstdmt_compress.h API
Yann Collet [Wed, 5 Jul 2017 02:33:16 +0000 (19:33 -0700)]
fixed wrong assert() condition
A single job created by ZSTDMT_compress() can be < 256KB
if data to compress is < 256 KB
(in which case it is delegated to single thread mode)
Yann Collet [Tue, 4 Jul 2017 19:39:26 +0000 (12:39 -0700)]
more precise estimation of amount to flush at end of stream (single thread mode)
also : can use DEBUGLEVEL variable in /tests
Yann Collet [Tue, 4 Jul 2017 17:36:41 +0000 (10:36 -0700)]
fixed : 0-copy in NULL is UB
Yann Collet [Tue, 4 Jul 2017 04:26:38 +0000 (21:26 -0700)]
Merge pull request #743 from facebook/fullbench
compress_generic() automatic optimization opportunities
Yann Collet [Tue, 4 Jul 2017 01:15:13 +0000 (18:15 -0700)]
Merge pull request #747 from facebook/noExit
No exit() on decoding errors
Yann Collet [Mon, 3 Jul 2017 23:23:36 +0000 (16:23 -0700)]
refactor ZSTDMT_compress()
Yann Collet [Mon, 3 Jul 2017 22:52:19 +0000 (15:52 -0700)]
fixed comments
Yann Collet [Mon, 3 Jul 2017 22:21:24 +0000 (15:21 -0700)]
fixed wrong function name in comment
Yann Collet [Mon, 3 Jul 2017 22:15:20 +0000 (15:15 -0700)]
Merge pull request #745 from terrelln/libfuzzer
[fuzz] Add libFuzzer targets
Yann Collet [Mon, 3 Jul 2017 22:14:55 +0000 (15:14 -0700)]
minor code refactoring
Yann Collet [Mon, 3 Jul 2017 20:47:46 +0000 (13:47 -0700)]
fixed gz error reporting
Yann Collet [Mon, 3 Jul 2017 20:45:09 +0000 (13:45 -0700)]
gzip : only display inflateEnd error when there is no error before
Yann Collet [Mon, 3 Jul 2017 20:31:27 +0000 (13:31 -0700)]
Merge pull request #746 from terrelln/dev
[libzstd] Fix memcpy() on potential NULL source
Yann Collet [Mon, 3 Jul 2017 20:24:50 +0000 (13:24 -0700)]
gzip decoding does no longer exit() on invalid input
Nick Terrell [Mon, 3 Jul 2017 19:40:12 +0000 (12:40 -0700)]
[fuzz] Move from fuzz/ to tests/fuzz/
Nick Terrell [Mon, 3 Jul 2017 19:31:55 +0000 (12:31 -0700)]
[libzstd] Fix memcpy() on potential NULL source
* `ZSTD_decompressStream_generic()` `ip` may be `NULL` for one of the calls
to `memcpy()`
* Assert the source is not `NULL` for calls to `memcpy()` where I believe
the source should not be `NULL`.
Yann Collet [Mon, 3 Jul 2017 18:27:29 +0000 (11:27 -0700)]
decoding malformed lz4 frames does no longer exit()
Yann Collet [Mon, 3 Jul 2017 17:27:16 +0000 (10:27 -0700)]
fileio : decoding malformed lzma frame does no longer exit()
makes it possible to continue decoding file list
Yann Collet [Sat, 1 Jul 2017 16:09:34 +0000 (09:09 -0700)]
fixed legacy version init bug
cyan4973 [Sat, 1 Jul 2017 15:03:59 +0000 (08:03 -0700)]
blindfix : fullbench's one-time leak, detected by valgrind
cyan4973 [Sat, 1 Jul 2017 14:05:11 +0000 (07:05 -0700)]
added --show-leak-kind=all to valgrind tests
cyan4973 [Sat, 1 Jul 2017 14:01:08 +0000 (07:01 -0700)]
Merge branch 'dev' into fullbench
cyan4973 [Sat, 1 Jul 2017 13:59:24 +0000 (06:59 -0700)]
fix : ZSTDMT_compressStream_generic() can accept NULL input
also : converge implementations towards new version of ZSTDMT_compressStream_generic()
Yann Collet [Sat, 1 Jul 2017 12:58:33 +0000 (05:58 -0700)]
Merge pull request #744 from terrelln/dev
[pzstd] Remove appveyor tests
Nick Terrell [Thu, 29 Jun 2017 23:53:52 +0000 (16:53 -0700)]
[fuzz] Add libFuzzer targets
* The regression driver serves both as a regression test, and as a binary for afl-fuzz.
* Next, we want to check in a seed corpus for each target. Then we can run the regression
test binary on them on Travis or Circle CI.
Nick Terrell [Fri, 30 Jun 2017 23:31:11 +0000 (16:31 -0700)]
[pzstd] Remove appveyor tests
The appveyor tests sometimes hang, and pzstd is now deprecated in favor of
zstdmt, so delete the tests.
Nick Terrell [Fri, 30 Jun 2017 23:29:37 +0000 (16:29 -0700)]
[man] Specify that strategies start at 1
Yann Collet [Fri, 30 Jun 2017 23:01:02 +0000 (16:01 -0700)]
fixed : dictionary compression with new advanced API in Multi-threading mode
Yann Collet [Fri, 30 Jun 2017 22:44:57 +0000 (15:44 -0700)]
Optimized ZSTDMT single-pass mode speed on large sources
by ensuring job sizes remain "not too large"
Yann Collet [Fri, 30 Jun 2017 21:51:01 +0000 (14:51 -0700)]
implemented shortcut for zstd_compress_generic() in MT mode
added ZSTDMT_compress_advanced() API
Yann Collet [Fri, 30 Jun 2017 21:50:23 +0000 (14:50 -0700)]
Merge pull request #742 from stellamplau/stack-space
Reduce stack usage of HUF_readDTableX4 and HUF_readDTableX2
Stella Lau [Fri, 30 Jun 2017 19:56:24 +0000 (12:56 -0700)]
Fix typo
Stella Lau [Fri, 30 Jun 2017 19:53:56 +0000 (12:53 -0700)]
Add comment to HUF_DECOMPRESS_WORKSPACE_SIZE
Stella Lau [Fri, 30 Jun 2017 16:52:20 +0000 (09:52 -0700)]
Clarify typedef of rankVal_t and rankValCol_t
Stella Lau [Fri, 30 Jun 2017 16:38:11 +0000 (09:38 -0700)]
Rename ALIGN and ALIGN_MASK to HUF_ALIGN and HUF_ALIGN_MASK