]>
git.ipfire.org Git - thirdparty/zstd.git/log
Nick Terrell [Fri, 28 Jul 2017 18:54:28 +0000 (11:54 -0700)]
[libzstd] Fix bug in Huffman decompresser
The zstd format specification doesn't enforce that Huffman compressed
literals (including the table) have to be smaller than the uncompressed
literals. The compressor will never Huffman compress literals if the
compressed size is larger than the uncompressed size. The decompresser
doesn't accept Huffman compressed literals with 4 streams whose compressed
size is at least as large as the uncompressed size.
* Make the decompresser accept Huffman compressed literals whose size
increases.
* Add a test case that exposes the bug. The compressed file has to be
statically generated, since the compressor won't normally produce files
that expose the bug.
Yann Collet [Thu, 27 Jul 2017 17:00:10 +0000 (10:00 -0700)]
Merge pull request #753 from paulcruz74/adapt-approach-3
adaptive compression v1
Paul Cruz [Thu, 27 Jul 2017 00:02:47 +0000 (17:02 -0700)]
remove unused variable, add documentation for context fields
Paul Cruz [Wed, 26 Jul 2017 23:40:05 +0000 (16:40 -0700)]
fix leaky abstraction regarding measuring completion
Paul Cruz [Wed, 26 Jul 2017 22:52:15 +0000 (15:52 -0700)]
added definitions for conversion constants, moved forced compression check to top of adaptCompressionLevel, used ZSTD_BLOCKSIZE_MAX
Paul Cruz [Wed, 26 Jul 2017 21:29:59 +0000 (14:29 -0700)]
set the window log value before performing compression
Paul Cruz [Wed, 26 Jul 2017 17:34:48 +0000 (10:34 -0700)]
moved reset of completion to right after wait
Paul Cruz [Wed, 26 Jul 2017 17:20:29 +0000 (10:20 -0700)]
change to >= convergence counter
Paul Cruz [Wed, 26 Jul 2017 17:05:10 +0000 (10:05 -0700)]
decrease completion requirements for change, move create thread wait, merge cases where compression thread should wait
Paul Cruz [Wed, 26 Jul 2017 00:47:02 +0000 (17:47 -0700)]
building on readme, added another help tip in the menu
Paul Cruz [Tue, 25 Jul 2017 23:55:16 +0000 (16:55 -0700)]
adding more to readme
Paul Cruz [Tue, 25 Jul 2017 23:03:43 +0000 (16:03 -0700)]
updated progress bar with better representation of time, added const
Paul Cruz [Tue, 25 Jul 2017 22:26:26 +0000 (15:26 -0700)]
changing time units to seconds
Paul Cruz [Tue, 25 Jul 2017 21:53:40 +0000 (14:53 -0700)]
updated const values, added more comments
Yann Collet [Tue, 25 Jul 2017 21:39:32 +0000 (14:39 -0700)]
Merge pull request #776 from terrelln/dev
[libzstd] Fix CHECK_V_F() macro
Paul Cruz [Tue, 25 Jul 2017 21:31:48 +0000 (14:31 -0700)]
removed old debug statements no longer being used
Paul Cruz [Tue, 25 Jul 2017 21:26:55 +0000 (14:26 -0700)]
progress bar -- don't print num jobs, time elapsed shown in seconds
Paul Cruz [Tue, 25 Jul 2017 21:08:39 +0000 (14:08 -0700)]
moved debug statements to a compiler flag
Nick Terrell [Tue, 25 Jul 2017 19:52:01 +0000 (12:52 -0700)]
[libzstd] Fix CHECK_V_F macros
Paul Cruz [Tue, 25 Jul 2017 18:16:27 +0000 (11:16 -0700)]
started using decrease cooldown so that compression level would not decrease several times in a row
Paul Cruz [Tue, 25 Jul 2017 17:32:14 +0000 (10:32 -0700)]
created independent function for controlling how completion relates to compression level change
Paul Cruz [Tue, 25 Jul 2017 17:01:10 +0000 (10:01 -0700)]
added mechanism for getting rid of spikes
Paul Cruz [Mon, 24 Jul 2017 23:26:20 +0000 (16:26 -0700)]
added help statement for -p, switched it to hide progress bar now that progress bar is default
Paul Cruz [Mon, 24 Jul 2017 23:19:07 +0000 (16:19 -0700)]
add quiet option, make progress bar default
Paul Cruz [Mon, 24 Jul 2017 22:14:58 +0000 (15:14 -0700)]
compression thread should take measurements independently based on whether or not the create/write thread will actually bottleneck performance
Paul Cruz [Mon, 24 Jul 2017 22:06:11 +0000 (15:06 -0700)]
adding more debug
Paul Cruz [Mon, 24 Jul 2017 21:40:23 +0000 (14:40 -0700)]
updating debug statements again
Paul Cruz [Mon, 24 Jul 2017 20:47:39 +0000 (13:47 -0700)]
changing position of endline for debug
Paul Cruz [Mon, 24 Jul 2017 18:01:36 +0000 (11:01 -0700)]
updated comments and debug statements
Paul Cruz [Sun, 23 Jul 2017 21:09:16 +0000 (14:09 -0700)]
reduced competition for completion mutex by separating mutex use based on which values is updated
Paul Cruz [Sun, 23 Jul 2017 17:18:54 +0000 (10:18 -0700)]
change how completion is measured in compression thread
Paul Cruz [Sat, 22 Jul 2017 01:02:55 +0000 (18:02 -0700)]
removed useless measurements
Paul Cruz [Sat, 22 Jul 2017 00:49:39 +0000 (17:49 -0700)]
switched over to model where reading only waits on compression thread
Paul Cruz [Fri, 21 Jul 2017 23:05:01 +0000 (16:05 -0700)]
taking the maximum of the completion level reads in order to determine which one was waiting more
Paul Cruz [Fri, 21 Jul 2017 21:06:24 +0000 (14:06 -0700)]
updating debug statements
Paul Cruz [Fri, 21 Jul 2017 20:38:24 +0000 (13:38 -0700)]
measure multiple completion levels during each wait
Paul Cruz [Fri, 21 Jul 2017 16:30:24 +0000 (09:30 -0700)]
added bounding to compression level change
Paul Cruz [Fri, 21 Jul 2017 16:26:35 +0000 (09:26 -0700)]
added priority decision making for adapt compression level
Paul Cruz [Fri, 21 Jul 2017 01:45:33 +0000 (18:45 -0700)]
semi working version that stabilizes
Yann Collet [Fri, 21 Jul 2017 01:39:04 +0000 (18:39 -0700)]
fixed minor warning on unused variable in shell function
Paul Cruz [Thu, 20 Jul 2017 23:38:02 +0000 (16:38 -0700)]
fixed bug where writeSize could be zero
Paul Cruz [Thu, 20 Jul 2017 23:19:16 +0000 (16:19 -0700)]
reworked adaptCompressionLevel to only account for completion information
Yann Collet [Thu, 20 Jul 2017 22:57:55 +0000 (15:57 -0700)]
Visual blind fix 2
Yann Collet [Thu, 20 Jul 2017 22:12:21 +0000 (15:12 -0700)]
Merge branch 'dev' of github.com:facebook/zstd into dev
Yann Collet [Thu, 20 Jul 2017 22:11:56 +0000 (15:11 -0700)]
fixed fuzzer test for non OS-X platforms
Yann Collet [Thu, 20 Jul 2017 21:47:26 +0000 (14:47 -0700)]
Merge pull request #773 from terrelln/lk-v3
[linux] Update patches for v3
Nick Terrell [Thu, 20 Jul 2017 20:33:55 +0000 (13:33 -0700)]
[linux] Update patches for v3
Paul Cruz [Thu, 20 Jul 2017 17:53:51 +0000 (10:53 -0700)]
changed how completion is actually sampled
Yann Collet [Thu, 20 Jul 2017 08:13:14 +0000 (01:13 -0700)]
pool.c : blindfix for Visual warnings
Paul Cruz [Wed, 19 Jul 2017 23:36:33 +0000 (16:36 -0700)]
make adaptCompressionLevel oscillate less
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
Paul Cruz [Wed, 19 Jul 2017 23:00:54 +0000 (16:00 -0700)]
call ZSTD_compressBegin() once
Paul Cruz [Wed, 19 Jul 2017 21:54:15 +0000 (14:54 -0700)]
fixing error when file size is multiple of job size (in which case, the srcSize of the last job is 0)
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
Paul Cruz [Wed, 19 Jul 2017 20:30:07 +0000 (13:30 -0700)]
added some debug statements, adjusted end condition
Paul Cruz [Wed, 19 Jul 2017 18:51:50 +0000 (11:51 -0700)]
removed previous version of completion for compression
Paul Cruz [Wed, 19 Jul 2017 18:47:17 +0000 (11:47 -0700)]
set up new calculations compression completion progress
Paul Cruz [Wed, 19 Jul 2017 18:23:40 +0000 (11:23 -0700)]
split compression into smaller blocks
Paul Cruz [Wed, 19 Jul 2017 17:23:46 +0000 (10:23 -0700)]
moved compression adapt to avoid warning
Paul Cruz [Wed, 19 Jul 2017 17:14:00 +0000 (10:14 -0700)]
change compression level only right before actually performing compression. When waiting, only update waiting statistics.
Paul Cruz [Wed, 19 Jul 2017 17:10:47 +0000 (10:10 -0700)]
added mechanism for measuring how much of a job has been created
Paul Cruz [Wed, 19 Jul 2017 16:59:17 +0000 (09:59 -0700)]
split up read process into smaller chunks
Paul Cruz [Wed, 19 Jul 2017 16:43:17 +0000 (09:43 -0700)]
added additional print for help menu
Yann Collet [Wed, 19 Jul 2017 08:05:40 +0000 (01:05 -0700)]
check pthread_*_init() success condition
Paul Cruz [Wed, 19 Jul 2017 00:32:36 +0000 (17:32 -0700)]
changed createCCtx() to split into initialization and creation
Paul Cruz [Tue, 18 Jul 2017 22:55:58 +0000 (15:55 -0700)]
added mutex for stats struct
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
Paul Cruz [Tue, 18 Jul 2017 22:23:11 +0000 (15:23 -0700)]
added progress check for filewriting, put important shared data behind mutex when being read from/written to
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
Paul Cruz [Tue, 18 Jul 2017 20:31:02 +0000 (13:31 -0700)]
setting up basic readme
Paul Cruz [Tue, 18 Jul 2017 20:30:29 +0000 (13:30 -0700)]
rename completion variable, split up fwrite operations in order to track progress
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.
Paul Cruz [Tue, 18 Jul 2017 19:58:50 +0000 (12:58 -0700)]
changed test cases to use -s setting on the diffs
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()
Paul Cruz [Tue, 18 Jul 2017 00:59:50 +0000 (17:59 -0700)]
change parameters for compression level adapt
Paul Cruz [Mon, 17 Jul 2017 22:34:58 +0000 (15:34 -0700)]
added signal to other threads whenever error occurs
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()
Paul Cruz [Mon, 17 Jul 2017 21:39:10 +0000 (14:39 -0700)]
swap buffers instead of copying memory over
Paul Cruz [Mon, 17 Jul 2017 21:01:13 +0000 (14:01 -0700)]
open file outside of adaptCCtx, pass to the output thread
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()
Paul Cruz [Mon, 17 Jul 2017 18:19:23 +0000 (11:19 -0700)]
removed freeCCtx() calls from createCCtx() so that it is not called twice during errors
Paul Cruz [Mon, 17 Jul 2017 17:12:44 +0000 (10:12 -0700)]
added error detection for pthread initialization, added compression completion measurement, fixed const values
Paul Cruz [Fri, 14 Jul 2017 23:29:29 +0000 (16:29 -0700)]
updated tests to use different seeds when executing different tests
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.
Paul Cruz [Thu, 13 Jul 2017 23:38:20 +0000 (16:38 -0700)]
removed goto statements for the most part
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
Paul Cruz [Thu, 13 Jul 2017 21:57:24 +0000 (14:57 -0700)]
added tests for forced compression level
Paul Cruz [Thu, 13 Jul 2017 21:46:54 +0000 (14:46 -0700)]
added additional tests for performance, allowed force compression level for testing purposes
Paul Cruz [Thu, 13 Jul 2017 20:50:23 +0000 (13:50 -0700)]
added some tests for correctness, time, and compression ratio
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