]> git.ipfire.org Git - thirdparty/zstd.git/log
thirdparty/zstd.git
7 years agoDYNAMIC_BMI2 enabled for clang 1032/head
Yann Collet [Mon, 5 Mar 2018 00:05:59 +0000 (16:05 -0800)] 
DYNAMIC_BMI2 enabled for clang

clang only claims compatibility with gcc 4.2.
Consequently, recent patch which reserved DYNAMIC_BMI2 for gcc >= 4.8
also disabled it for clang.

fix : __clang__ is now enough to enable DYNAMIC_BMI2
(associated with other existing conditions : x64/x64, !bmi2)

7 years agoMerge pull request #1031 from facebook/inline48
Yann Collet [Fri, 2 Mar 2018 01:52:15 +0000 (17:52 -0800)] 
Merge pull request #1031 from facebook/inline48

force_inline HUF_decodeSymbol*()

7 years agolimit DYNAMIC_BMI2 to gcc >= 4.8 1031/head
Yann Collet [Thu, 1 Mar 2018 23:02:18 +0000 (15:02 -0800)] 
limit DYNAMIC_BMI2 to gcc >= 4.8

attribute bmi2 not supported by gcc 4.4

7 years agoforce inlining of HUF_decodeSymbol*() functions
Yann Collet [Thu, 1 Mar 2018 19:28:42 +0000 (11:28 -0800)] 
force inlining of HUF_decodeSymbol*() functions

which was not done properly by gcc 4.8
resulting in major performance difference.

ex :
zstd -b1 silesia.tar
before : dec 680 MB/s
after  : dec 710 MB/s  (without bmi2)
after  : dec 770 MB/s  (with DYNAMIC_BMI2)

7 years agoupdate doc/README.md on provided tools to test 3rd party implementations
Yann Collet [Wed, 28 Feb 2018 01:37:05 +0000 (17:37 -0800)] 
update doc/README.md on provided tools to test 3rd party implementations

7 years agoMerge pull request #1026 from terrelln/lrm-window
Yann Collet [Wed, 28 Feb 2018 01:09:10 +0000 (17:09 -0800)] 
Merge pull request #1026 from terrelln/lrm-window

LDM manages its own window round buffer

7 years agoLDM manages its own window round buffer 1026/head
Nick Terrell [Sat, 24 Feb 2018 02:17:44 +0000 (18:17 -0800)] 
LDM manages its own window round buffer

7 years agoMerge pull request #1025 from facebook/huf
Yann Collet [Tue, 27 Feb 2018 17:57:01 +0000 (09:57 -0800)] 
Merge pull request #1025 from facebook/huf

Huf

7 years agofixed wrong size test 1025/head
Yann Collet [Tue, 27 Feb 2018 02:27:51 +0000 (18:27 -0800)] 
fixed wrong size test

7 years agoMerge pull request #1024 from terrelln/window-split
Yann Collet [Tue, 27 Feb 2018 01:18:33 +0000 (17:18 -0800)] 
Merge pull request #1024 from terrelln/window-split

Split the window state into substructure

7 years agoadded error code workSpace_tooSmall
Yann Collet [Mon, 26 Feb 2018 23:11:50 +0000 (15:11 -0800)] 
added error code workSpace_tooSmall

7 years agominor cleaning of huff0
Yann Collet [Mon, 26 Feb 2018 22:52:23 +0000 (14:52 -0800)] 
minor cleaning of huff0

Update code documentation, and properly names a few "magic constants".
Also, HUF_compress_internal() gets a cleaner way
to determine size of tables inside workspace.

7 years agoReduce ZSTD_CHAINLOG_MAX to 29 in 32-bit mode 1024/head
Nick Terrell [Mon, 26 Feb 2018 21:30:24 +0000 (13:30 -0800)] 
Reduce ZSTD_CHAINLOG_MAX to 29 in 32-bit mode

7 years agoSplit the window state into substructure
Nick Terrell [Sat, 24 Feb 2018 00:48:18 +0000 (16:48 -0800)] 
Split the window state into substructure

7 years agoMerge pull request #1021 from terrelln/lrm-split
Yann Collet [Sat, 24 Feb 2018 01:36:51 +0000 (17:36 -0800)] 
Merge pull request #1021 from terrelln/lrm-split

Split block compresser out of long range matcher

7 years agominor nit from Mac XCode
Yann Collet [Thu, 22 Feb 2018 23:44:26 +0000 (15:44 -0800)] 
minor nit from Mac XCode

7 years agoRemove long range matcher immediate repcode check 1021/head
Nick Terrell [Thu, 22 Feb 2018 03:30:05 +0000 (19:30 -0800)] 
Remove long range matcher immediate repcode check

The compression ratio gets about 0.01% worse on the files I tested, but the
code is much simpler.

7 years agoSplit block compresser out of long range matcher
Nick Terrell [Wed, 21 Feb 2018 03:34:43 +0000 (19:34 -0800)] 
Split block compresser out of long range matcher

* `ZSTD_ldm_generateSequences()` generates the LDM sequences and
  stores them in a table. It should work with any chunk size, but
  is currently only called one block at a time.
* `ZSTD_ldm_blockCompress()` emits the pre-defined sequences, and
  instead of encoding the literals directly, it passes them to a
  secondary block compressor. The code to handle chunk sizes greater
  than the block size is currently commented out, since it is unused.
  The next PR will uncomment exercise this code.
* During optimal parsing, ensure LDM `minMatchLength` is at least
  `targetLength`. Also don't emit repcode matches in the LDM block
  compressor. Enabling the LDM with the optimal parser now actually improves
  the compression ratio.
* The compression ratio is very similar to before. It is very slightly
  different, because the repcode handling is slightly different. If I remove
  immediate repcode checking in both branches the compressed size is exactly
  the same.
* The speed looks to be the same or better than before.

Up Next (in a separate PR)
--------------------------

Allow sequence generation to happen prior to compression, and produce more
than a block worth of sequences. Expose some API for zstdmt to consume.
This will test out some currently untested code in
`ZSTD_ldm_blockCompress()`.

7 years agoMerge pull request #1022 from facebook/bmi2IntoC
Yann Collet [Thu, 22 Feb 2018 22:30:43 +0000 (14:30 -0800)] 
Merge pull request #1022 from facebook/bmi2IntoC

Implemented BMI2 functions directly within huf_decompress.c

7 years agoImplemented BMI2 functions directly within huf_decompress.c 1022/head
Yann Collet [Thu, 22 Feb 2018 07:52:45 +0000 (23:52 -0800)] 
Implemented BMI2 functions directly within huf_decompress.c

This makes it easier to edit for maintenance and evolutions
(I plan to experiment modifications in huffman decompression functions).

The methology followed seems broadly applicable to other BMI2 modules.

Performance was tracked rigorously at each step,
there is no noticeable loss (nor win) of performance compared to `#include` version.

Note however that 4X decoder variants tend to be extremely sensitive to code alignment.
This source code resulted in pretty good performance for gcc 7.2 and 7.3,
but future changes (even in other parts of the code) might trigger the issue again.

7 years agoMerge pull request #1020 from facebook/betterBench
Yann Collet [Wed, 21 Feb 2018 22:51:39 +0000 (14:51 -0800)] 
Merge pull request #1020 from facebook/betterBench

updated fullbench measurement methodology

7 years agofullbench includes assert.h 1020/head
Yann Collet [Wed, 21 Feb 2018 19:42:23 +0000 (11:42 -0800)] 
fullbench includes assert.h

as it is missing for Windows

7 years agofixed huf_compress workspace size
Yann Collet [Wed, 21 Feb 2018 19:34:49 +0000 (11:34 -0800)] 
fixed huf_compress workspace size

7 years agoupdate fullbench measurement methodology
Yann Collet [Wed, 21 Feb 2018 15:30:26 +0000 (07:30 -0800)] 
update fullbench measurement methodology

to use less calls to time(), like bench.c.

also upgraded accuracy to nanosecond.

7 years agoMerge pull request #1019 from facebook/betterBench
Yann Collet [Wed, 21 Feb 2018 13:47:08 +0000 (05:47 -0800)] 
Merge pull request #1019 from facebook/betterBench

improve benchmark measurement for small inputs

7 years agofixed minor conversion warning 1019/head
Yann Collet [Wed, 21 Feb 2018 00:52:28 +0000 (16:52 -0800)] 
fixed minor conversion warning

7 years agoMerge pull request #1017 from terrelln/c-bmi2
Yann Collet [Tue, 20 Feb 2018 23:34:59 +0000 (15:34 -0800)] 
Merge pull request #1017 from terrelln/c-bmi2

[compress] Support BMI2

7 years agouse TIMELOOP_NANOSEC
Yann Collet [Tue, 20 Feb 2018 23:33:56 +0000 (15:33 -0800)] 
use TIMELOOP_NANOSEC

as suggested by @terrelln

7 years agoimprove benchmark measurement for small inputs
Yann Collet [Tue, 20 Feb 2018 22:48:09 +0000 (14:48 -0800)] 
improve benchmark measurement for small inputs

by invoking time() once per batch, instead of once per compression / decompression.
Batch is dynamically resized so that each round lasts approximately 1 second.

Also : increases time accuracy to nanosecond

7 years ago[BMI2] Add comments to the bmi2 variable in the contexts 1017/head
Nick Terrell [Tue, 20 Feb 2018 22:12:11 +0000 (14:12 -0800)] 
[BMI2] Add comments to the bmi2 variable in the contexts

7 years agoadded clarification comments in zstd_errors.h
Yann Collet [Tue, 20 Feb 2018 20:54:49 +0000 (12:54 -0800)] 
added clarification comments in zstd_errors.h

answering some points in #1018

7 years agoMerge pull request #1011 from terrelln/bmi2
Yann Collet [Thu, 15 Feb 2018 19:40:34 +0000 (11:40 -0800)] 
Merge pull request #1011 from terrelln/bmi2

[decompress] Support BMI2

7 years ago[compress] Support BMI2
Nick Terrell [Thu, 15 Feb 2018 03:20:32 +0000 (19:20 -0800)] 
[compress] Support BMI2

7 years ago[decompress] Support BMI2 1011/head
Nick Terrell [Sat, 3 Feb 2018 02:03:09 +0000 (18:03 -0800)] 
[decompress] Support BMI2

7 years agofixed --single-thread
Yann Collet [Tue, 13 Feb 2018 22:56:35 +0000 (14:56 -0800)] 
fixed --single-thread

was incorrectly set to -T0 (use as many cores as possible) previously

7 years agoMerge pull request #1014 from facebook/fasterDec
Yann Collet [Tue, 13 Feb 2018 20:05:54 +0000 (12:05 -0800)] 
Merge pull request #1014 from facebook/fasterDec

Faster decoding speed

7 years agopretify last unit test output 1014/head
Yann Collet [Tue, 13 Feb 2018 18:09:01 +0000 (10:09 -0800)] 
pretify last unit test output

7 years agoadded code comment on how to generate default tables
Yann Collet [Tue, 13 Feb 2018 18:02:25 +0000 (10:02 -0800)] 
added code comment on how to generate default tables

as suggested by @terrelln

7 years agoadded SEQSYMBOL_TABLE_SIZE()
Yann Collet [Tue, 13 Feb 2018 00:52:15 +0000 (16:52 -0800)] 
added SEQSYMBOL_TABLE_SIZE()

as suggested by @terrelln's comment

7 years agofixed logo path
Yann Collet [Sun, 11 Feb 2018 05:05:48 +0000 (21:05 -0800)] 
fixed logo path

7 years agoMerge branch 'dev' into fasterDec
Yann Collet [Sat, 10 Feb 2018 22:24:44 +0000 (14:24 -0800)] 
Merge branch 'dev' into fasterDec

7 years agoMerge pull request #1010 from facebook/flexibleLevel
Yann Collet [Sat, 10 Feb 2018 22:19:54 +0000 (14:19 -0800)] 
Merge pull request #1010 from facebook/flexibleLevel

Updatable compression parameters

7 years agoMerge branch 'dev' into flexibleLevel 1010/head
Yann Collet [Sat, 10 Feb 2018 19:54:49 +0000 (11:54 -0800)] 
Merge branch 'dev' into flexibleLevel

7 years agoMerge pull request #1013 from facebook/fasterDec32
Yann Collet [Sat, 10 Feb 2018 00:13:55 +0000 (16:13 -0800)] 
Merge pull request #1013 from facebook/fasterDec32

Disable Long Offset mode in 32-bits

7 years agospecify new command --single-thread
Yann Collet [Fri, 9 Feb 2018 23:53:27 +0000 (15:53 -0800)] 
specify new command --single-thread

7 years agofixed minor nit as per @terrelln's comments
Yann Collet [Fri, 9 Feb 2018 17:46:08 +0000 (09:46 -0800)] 
fixed minor nit as per @terrelln's comments

7 years agoMerge branch 'dev' into flexibleLevel
Yann Collet [Fri, 9 Feb 2018 17:15:05 +0000 (09:15 -0800)] 
Merge branch 'dev' into flexibleLevel

7 years agore-enabled ZSTD_decompressSequencesLong()
Yann Collet [Fri, 9 Feb 2018 17:14:25 +0000 (09:14 -0800)] 
re-enabled ZSTD_decompressSequencesLong()

7 years agopre-calculated default decoding tables
Yann Collet [Fri, 9 Feb 2018 14:01:02 +0000 (06:01 -0800)] 
pre-calculated default decoding tables

7 years agofixed mono-symbol distribution
Yann Collet [Fri, 9 Feb 2018 13:12:13 +0000 (05:12 -0800)] 
fixed mono-symbol distribution

7 years agofixed default fse distributions
Yann Collet [Fri, 9 Feb 2018 12:50:58 +0000 (04:50 -0800)] 
fixed default fse distributions

but would be better to pre-calculate tables, for speed

7 years agoaddBits and baseline into FSE decoding table
Yann Collet [Fri, 9 Feb 2018 12:25:15 +0000 (04:25 -0800)] 
addBits and baseline into FSE decoding table

note : unfinished
- need new default tables
- need modify long mode

7 years agoMerge branch 'dev' into fasterDec
Yann Collet [Fri, 9 Feb 2018 10:41:02 +0000 (02:41 -0800)] 
Merge branch 'dev' into fasterDec

7 years agofixed streaming_memory_usage example
Yann Collet [Thu, 8 Feb 2018 07:13:19 +0000 (23:13 -0800)] 
fixed streaming_memory_usage example

also:
ensure zstd.h is read from ../lib (instead of /usr/include)

7 years agoMerged ZSTD_preserveUnsortedMark() into ZSTD_reduceIndex() 1013/head
Yann Collet [Wed, 7 Feb 2018 22:22:35 +0000 (14:22 -0800)] 
Merged ZSTD_preserveUnsortedMark() into ZSTD_reduceIndex()

as it's faster, due to one memory scan instead of two
(confirmed by microbenchmark).

Note : as ZSTD_reduceIndex() is rarely invoked,
it does not translate into a visible gain.
Consider it an exercise in auto-vectorization and micro-benchmarking.

7 years agominor : modified ZSTD_preserveUnsortedMark() to be more vectorization friendly
Yann Collet [Mon, 5 Feb 2018 19:46:02 +0000 (11:46 -0800)] 
minor : modified ZSTD_preserveUnsortedMark() to be more vectorization friendly

7 years agofaster decoding in 32-bits mode for long offsets (tentative)
Yann Collet [Sun, 4 Feb 2018 07:54:10 +0000 (23:54 -0800)] 
faster decoding in 32-bits mode for long offsets (tentative)

On my laptop:
Before:
./zstd32 -b --zstd=wlog=27 silesia.tar enwik8 -S
 3#silesia.tar       : 211984896 ->  66683478 (3.179),  97.6 MB/s , 400.7 MB/s
 3#enwik8            : 100000000 ->  35643153 (2.806),  76.5 MB/s , 303.2 MB/s

After:
./zstd32 -b --zstd=wlog=27 silesia.tar enwik8 -S
 3#silesia.tar       : 211984896 ->  66683478 (3.179),  97.4 MB/s , 435.0 MB/s
 3#enwik8            : 100000000 ->  35643153 (2.806),  76.2 MB/s , 338.1 MB/s

Mileage vary, depending on file, and cpu type.
But a generic rule is : x86 benefits less from "long-offset mode" than x64,
maybe due to register pressure.
On "entropy", long-mode is _never_ a win for x86.
On my laptop though, it may, depending on file and compression level
(enwik8 benefits more from "long-mode" than silesia).

7 years agoensure compression parameters are updated when only compression level is changed
Yann Collet [Sat, 3 Feb 2018 00:31:20 +0000 (16:31 -0800)] 
ensure compression parameters are updated when only compression level is changed

7 years agozstdmt: applies new parameters on the fly
Yann Collet [Fri, 2 Feb 2018 23:58:13 +0000 (15:58 -0800)] 
zstdmt: applies new parameters on the fly

when invoked from ZSTD_compress_generic()

7 years agofileio: create dedicated function to generate zstd frames
Yann Collet [Fri, 2 Feb 2018 22:24:56 +0000 (14:24 -0800)] 
fileio: create dedicated function to generate zstd frames

like other formats

7 years agoMerge pull request #1006 from systemcrash/patch-2
Yann Collet [Fri, 2 Feb 2018 18:04:55 +0000 (10:04 -0800)] 
Merge pull request #1006 from systemcrash/patch-2

Update README.md

7 years agoMerge pull request #1005 from systemcrash/dev
Yann Collet [Fri, 2 Feb 2018 18:04:40 +0000 (10:04 -0800)] 
Merge pull request #1005 from systemcrash/dev

Update zstd.1

7 years agofixed minor conversion warning
Yann Collet [Fri, 2 Feb 2018 04:16:00 +0000 (20:16 -0800)] 
fixed minor conversion warning

7 years agoChanged nbThreads for nbWorkers
Yann Collet [Fri, 2 Feb 2018 03:29:30 +0000 (19:29 -0800)] 
Changed nbThreads for nbWorkers

This makes it easier to explain that nbWorkers=0 --> single-threaded mode,
while nbWorkers=1 --> asynchronous mode (one mode thread on top of the "main" caller thread).
No need for an additional asynchronous mode flag.
nbWorkers>=2 works the same as nbThreads>=2 previously.

7 years agoclarified comments on LDM parameters
Yann Collet [Fri, 2 Feb 2018 01:07:27 +0000 (17:07 -0800)] 
clarified comments on LDM parameters

7 years agozstdmt: added ability to change compression parameters during compression
Yann Collet [Fri, 2 Feb 2018 00:13:31 +0000 (16:13 -0800)] 
zstdmt: added ability to change compression parameters during compression

7 years agoremoved bitstream.h dependency
Yann Collet [Fri, 2 Feb 2018 00:13:04 +0000 (16:13 -0800)] 
removed bitstream.h dependency

7 years agoMerge pull request #1009 from terrelln/fail-early
Yann Collet [Thu, 1 Feb 2018 22:43:32 +0000 (14:43 -0800)] 
Merge pull request #1009 from terrelln/fail-early

Test for incorrect pledgeSrcSize earlier

7 years agoTest for incorrect pledgeSrcSize earlier 1009/head
Nick Terrell [Thu, 1 Feb 2018 20:04:05 +0000 (12:04 -0800)] 
Test for incorrect pledgeSrcSize earlier

7 years agoMerge pull request #1008 from terrelln/hlog3
Yann Collet [Wed, 31 Jan 2018 20:49:07 +0000 (12:49 -0800)] 
Merge pull request #1008 from terrelln/hlog3

Fix hashLog3 size when copying cdict tables

7 years ago[fuzzer] Check ZSTD_initStaticCDict() for every level 1008/head
Nick Terrell [Wed, 31 Jan 2018 19:12:54 +0000 (11:12 -0800)] 
[fuzzer] Check ZSTD_initStaticCDict() for every level

7 years agoFix hashLog3 size when copying cdict tables
Nick Terrell [Tue, 30 Jan 2018 21:30:30 +0000 (13:30 -0800)] 
Fix hashLog3 size when copying cdict tables

7 years agoMerge pull request #1000 from facebook/progressiveFlush
Yann Collet [Wed, 31 Jan 2018 06:49:47 +0000 (22:49 -0800)] 
Merge pull request #1000 from facebook/progressiveFlush

Progressive flush

7 years agoupdated zstd api manual 1000/head
Yann Collet [Tue, 30 Jan 2018 23:05:12 +0000 (15:05 -0800)] 
updated zstd api manual

7 years agofixed function declaration ZSTD_getBlockSize()
Yann Collet [Tue, 30 Jan 2018 23:03:39 +0000 (15:03 -0800)] 
fixed function declaration ZSTD_getBlockSize()

7 years agozstdmt: changed naming convention
Yann Collet [Tue, 30 Jan 2018 22:43:36 +0000 (14:43 -0800)] 
zstdmt: changed naming convention

to avoid confusion with blocks.

also:
- jobs are cut into chunks of 512KB now, to reduce nb of mutex calls.
- fix function declaration ZSTD_getBlockSizeMax()
- fix outdated comment

7 years agoUpdate README.md 1006/head
systemcrash [Mon, 29 Jan 2018 17:42:20 +0000 (18:42 +0100)] 
Update README.md

spelling

7 years agoUpdate zstd.1 1005/head
systemcrash [Mon, 29 Jan 2018 17:38:02 +0000 (18:38 +0100)] 
Update zstd.1

7 years agobumped version number to v1.3.4
Yann Collet [Sun, 28 Jan 2018 06:23:26 +0000 (22:23 -0800)] 
bumped version number to v1.3.4

also added a paragraph on using compression level with training mode
as this is a recurrent question (see for example #1004)

7 years agofixed minor conversion warning for C++ compilation mode
Yann Collet [Sat, 27 Jan 2018 02:18:42 +0000 (18:18 -0800)] 
fixed minor conversion warning for C++ compilation mode

7 years agojob mutex creation is checked
Yann Collet [Sat, 27 Jan 2018 02:09:25 +0000 (18:09 -0800)] 
job mutex creation is checked

7 years agozstdmt: there is now one mutex/cond per job
Yann Collet [Sat, 27 Jan 2018 01:48:33 +0000 (17:48 -0800)] 
zstdmt: there is now one mutex/cond per job

7 years agozstdmt: minor code refactor for clarity
Yann Collet [Sat, 27 Jan 2018 01:08:58 +0000 (17:08 -0800)] 
zstdmt: minor code refactor for clarity

7 years agozstdmt: job table correctly cleaned after synchronous ZSTDMT_compress()
Yann Collet [Fri, 26 Jan 2018 22:35:54 +0000 (14:35 -0800)] 
zstdmt: job table correctly cleaned after synchronous ZSTDMT_compress()

7 years agozstdmt : refactor a few member names
Yann Collet [Fri, 26 Jan 2018 21:00:14 +0000 (13:00 -0800)] 
zstdmt : refactor a few member names

for clarity

7 years agozstdmt : flush() only lock to read shared job members
Yann Collet [Fri, 26 Jan 2018 20:15:43 +0000 (12:15 -0800)] 
zstdmt : flush() only lock to read shared job members

Other job members are accessed directly.
This avoids a full job copy, which would access everything,
including a few members that are supposed to be used by worker only,
uselessly requiring additional locks to avoid race conditions.

7 years agominor : ZSTDMT_writeLastEmptyBlock() is a void function
Yann Collet [Fri, 26 Jan 2018 19:06:34 +0000 (11:06 -0800)] 
minor : ZSTDMT_writeLastEmptyBlock() is a void function

because it cannot fail

7 years agozstdmt : fixed memory leak
Yann Collet [Fri, 26 Jan 2018 18:44:09 +0000 (10:44 -0800)] 
zstdmt : fixed memory leak

writeLastEmptyBlock() must release srcBuffer
as mtctx assumes it's done by job worker.

minor : changed 2 job member names (src->srcBuffer, srcStart->prefixStart) for clarity

7 years agozstdmt : refactor job members
Yann Collet [Fri, 26 Jan 2018 18:20:38 +0000 (10:20 -0800)] 
zstdmt : refactor job members

grouped by sharing properties

7 years agofixed minor declaration-after-statement warning
Yann Collet [Fri, 26 Jan 2018 01:45:18 +0000 (17:45 -0800)] 
fixed minor declaration-after-statement warning

7 years agozstdmt: removed job->jobCompleted
Yann Collet [Fri, 26 Jan 2018 01:35:49 +0000 (17:35 -0800)] 
zstdmt: removed job->jobCompleted

replaced by equivalent signal job->consumer == job->srcSize.

created additional functions
ZSTD_writeLastEmptyBlock()
and
ZSTDMT_writeLastEmptyBlock()
required when it's necessary to finish a frame with a last empty job, to create an "end of frame" marker.

It avoids creating a job with srcSize==0.

7 years agozstdmt:: renamed mutex and cond to underline they are context-global
Yann Collet [Thu, 25 Jan 2018 22:52:34 +0000 (14:52 -0800)] 
zstdmt:: renamed mutex and cond to underline they are context-global

7 years agoMerge pull request #1001 from ne-sted/fix-defaults-align
Yann Collet [Wed, 24 Jan 2018 17:34:36 +0000 (09:34 -0800)] 
Merge pull request #1001 from ne-sted/fix-defaults-align

cli: fix align of defaults

7 years agocli: fix align of defaults 1001/head
ne-sted [Wed, 24 Jan 2018 12:59:44 +0000 (14:59 +0200)] 
cli: fix align of defaults

7 years agozstdmt : fixed complex sequencing bug
Yann Collet [Wed, 24 Jan 2018 02:00:51 +0000 (18:00 -0800)] 
zstdmt : fixed complex sequencing bug

zstdmt would shortcut to single-thread blocking mode
in some rare cases where data is sent to be compressed but is not yet ready.

7 years agozstdmt : correctly set end of frame
Yann Collet [Tue, 23 Jan 2018 23:52:40 +0000 (15:52 -0800)] 
zstdmt : correctly set end of frame

7 years agozstdmt : fix end condition (ZSTD_e_end)
Yann Collet [Tue, 23 Jan 2018 23:19:11 +0000 (15:19 -0800)] 
zstdmt : fix end condition (ZSTD_e_end)

When ZSTD_e_end directive is provided,
the question is not only "are internal buffers completely flushed",
it is also "is current frame completed".

In some rare cases,
it was possible for internal buffers to be completely flushed,
triggering a @return == 0,
but frame was not completed as it needed a last null-size block to mark the end,
resulting in an unfinished frame.

7 years agozstdmt: fixed minor race condition
Yann Collet [Tue, 23 Jan 2018 22:03:07 +0000 (14:03 -0800)] 
zstdmt: fixed minor race condition

no real consequence, but pollute tsan tests :

job->dstBuff is being modified inside worker,
while main thread might read it accidentally
because it copies whole job.
But since it doesn't used dstBuff, there is no real consequence.

Other potential solution : only copy useful data, instead of whole job

7 years agozstdmt : fixed ending frame with 0-size block
Yann Collet [Tue, 23 Jan 2018 21:12:40 +0000 (13:12 -0800)] 
zstdmt : fixed ending frame with 0-size block

7 years agoMerge pull request #998 from facebook/zcat
Yann Collet [Tue, 23 Jan 2018 20:01:25 +0000 (12:01 -0800)] 
Merge pull request #998 from facebook/zcat

add `zcat` symlink support, suggested by @wtarreau