Commit Graph

5455 Commits

Author SHA1 Message Date
Yann Collet
e3c42c739b clean ZSTD_compress() initialization
The (pretty old) code inside ZSTD_compress()
was making some pretty bold assumptions
on what's inside a CCtx and how to init it.

This is pretty fragile by design.
CCtx content evolve.
Knowledge of how to handle that should be concentrate in one place.

A side effect of this strategy
is that ZSTD_compress() wouldn't check for BMI2 capability,
and is therefore missing out some potential speed opportunity.

This patch makes ZSTD_compress() use
the same initialization and release functions
as the normal creator / destructor ones.

Measured on my laptop, with a custom version of bench
manually modified to use ZSTD_compress() (instead of the advanced API) :
This patch :
 1#silesia.tar       : 211984896 ->  73651053 (2.878), 312.2 MB/s , 723.8 MB/s
 2#silesia.tar       : 211984896 ->  70163650 (3.021), 226.2 MB/s , 649.8 MB/s
 3#silesia.tar       : 211984896 ->  66996749 (3.164), 169.4 MB/s , 636.7 MB/s
 4#silesia.tar       : 211984896 ->  65998319 (3.212), 136.7 MB/s , 619.2 MB/s
dev branch :
 1#silesia.tar       : 211984896 ->  73651053 (2.878), 291.7 MB/s , 727.5 MB/s
 2#silesia.tar       : 211984896 ->  70163650 (3.021), 216.2 MB/s , 655.7 MB/s
 3#silesia.tar       : 211984896 ->  66996749 (3.164), 162.2 MB/s , 633.1 MB/s
 4#silesia.tar       : 211984896 ->  65998319 (3.212), 130.6 MB/s , 618.6 MB/s
2018-06-07 14:05:25 -07:00
Yann Collet
3cdb342bd5 disable aarch64 test on travis CI
there's a bug on travis' ld
> collect2: error: ld terminated with signal 11 [Segmentation fault], core dumped

I cannot reproduce it.
Note that travis' ld version is 2.24
while the one in my Linux VM is 2.26.1.
ld is part of binutils, so it's pretty hard to change.

I would expect the bug to no longer be triggered after some random code change.
To be re-enabled later.
2018-06-07 12:18:47 -07:00
Yann Collet
36922b1369 added ld -v to aarch64fuzz
to better understand the travis CI linking bug
2018-06-06 18:15:57 -07:00
Yann Collet
b27c7389e3
Merge pull request #1164 from GeorgeLu97/CustomMacros
Partial Compilation Macros
2018-06-06 16:47:42 -07:00
Yann Collet
24319975b6 bumped version number to v1.3.5 2018-06-06 15:51:55 -07:00
George Lu
21ec9e9c30 Rename tests 2018-06-06 15:16:37 -07:00
Yann Collet
f1ea383f45 context can be sized down even with constant parameters
when parameters are "equivalent",
the context is re-used in continue mode,
hence needed workspace size is not recalculated.
This incidentally also evades the size-down check and action.

This patch intercepts the "continue mode"
so that the size-down check and action is actually triggered.
2018-06-06 15:04:12 -07:00
Yann Collet
e5e17d009f changed member name to workSpaceOversizedDuration 2018-06-06 15:00:27 -07:00
Yann Collet
7f178ef9c0
Merge pull request #1167 from facebook/seekable_gcc5
contrib/seekable_format on gcc5+
2018-06-06 14:41:21 -07:00
Yann Collet
97c60cdf36 fixed seekable_format type mismatch
and some minor "unused variable" warnings.
Also : zstd_seekable.h is actually depending on zstd.h for ZSTDLIB_API
2018-06-06 13:10:29 -07:00
Yann Collet
830fd4468f better make -j all behavior
avoid concurrent compilation of libzstd
2018-06-06 12:47:16 -07:00
Yann Collet
79e83d1c16 refactor travis CI test
to add a `make all` target with gcc-6.
Note : should fail at this stage, due to contrib/seekable_format
2018-06-06 12:20:19 -07:00
Yann Collet
30ee23e905 ensure seekable_format/examples generated libzstd.a
when it's not already present in the expected directory
2018-06-06 12:09:58 -07:00
George Lu
eab626292c More Tests 2018-06-06 11:33:39 -07:00
George Lu
7892f48080 Remove test from Circle 2018-06-05 15:21:31 -07:00
George Lu
8e6267503b Move stuff around
test execution -> travis
logic -> partialTests.sh
2018-06-05 15:20:34 -07:00
Yann Collet
f7392f3dc9 added test case 2018-06-05 14:53:28 -07:00
George Lu
0fd450af7b Remove optimizations 2018-06-05 14:41:41 -07:00
George Lu
51f20e9982 circle test 2018-06-05 14:10:29 -07:00
George Lu
11d5bfdaa9 Revert "Partial compilation test?"
This reverts commit b2496ab606.
2018-06-05 13:55:36 -07:00
George Lu
b2496ab606 Partial compilation test? 2018-06-05 13:24:00 -07:00
Yann Collet
3d523c741b added workSpaceTooLarge and workSpaceWasteful
also :
slightly increased speed of test fuzzer.16
2018-06-05 11:42:48 -07:00
Yann Collet
bdb673666f
Merge pull request #1162 from facebook/corruptionFix
Fixed a corruption bug
2018-06-05 06:50:29 -07:00
George Lu
b3ef314830 Fix Typos 2018-06-04 17:19:06 -07:00
Yann Collet
357c648c3f changed a few variable names
to unify naming convention
2018-06-04 17:10:50 -07:00
Yann Collet
54f05641e3
Merge pull request #1161 from GeorgeLu97/paramgrillformat
Added zstdcli-style format for compression parameters in paramgrill
2018-06-04 14:56:23 -07:00
George Lu
609d72b0ca Added Deprecated Dependencies 2018-06-04 14:33:21 -07:00
George Lu
3f054dceb4 forgot \n, ; 2018-06-04 13:38:37 -07:00
George Lu
9437021d2f Remove old file declaration 2018-06-04 13:32:41 -07:00
George Lu
ddf143ba6a Update usage_advanced 2018-06-04 10:16:05 -07:00
George Lu
6a617d70ed Documentation 2018-06-04 09:56:37 -07:00
George Lu
65de25a463 Created Macros 2018-06-04 09:56:29 -07:00
Yann Collet
2108decb41 Fixed a nasty corruption bug
recently introduce into the new dictionary mode.
The bug could be reproduced with this command :
./zstreamtest -v --opaqueapi --no-big-tests -s4092 -t639

error was in function ZSTD_count_2segments() :
the beginning of the 2nd segment corresponds to prefixStart
and not the beginning of the current block (istart == src).
This would result in comparing the wrong byte.
2018-06-01 18:54:34 -07:00
George Lu
5e586aa025 -O# with no file fails 2018-06-01 18:02:56 -07:00
George Lu
e355f0a580 Added Level Option 2018-06-01 14:27:53 -07:00
Yann Collet
d3615c28db
Merge pull request #1159 from GeorgeLu97/suffixlist
Unknown Suffix Error
2018-06-01 14:00:10 -07:00
George Lu
ae6d1fd3fa Add Error Print 2018-06-01 13:54:08 -07:00
Yann Collet
2b5b2ea7df
Merge pull request #1160 from GeorgeLu97/formatzstd
Added --format=zstd
2018-06-01 12:46:03 -07:00
George Lu
110ec9079d Remove echo 2018-06-01 12:45:02 -07:00
George Lu
c9b4d20f02 Added new --zstd= format 2018-06-01 12:39:39 -07:00
George Lu
41249bf34b Modified Tests
Changed format as per suggestion and added second test
2018-06-01 10:54:51 -07:00
George Lu
53ea32cabe Suffix list test 2018-06-01 10:43:06 -07:00
Yann Collet
143fc9ff6c
Merge pull request #1157 from facebook/decompressedSize
minor : improved zstd.h API code comment
2018-06-01 10:28:17 -07:00
George Lu
cfc3451dcc Added Test Case 2018-06-01 09:52:25 -07:00
George Lu
8984cc93d6 update display 2018-05-31 18:04:05 -07:00
George Lu
547096d672 update man 2018-05-31 18:03:52 -07:00
George Lu
c9b1068298 removed strcats 2018-05-31 17:47:29 -07:00
George Lu
cec205c842 copy paste 2018-05-31 17:39:36 -07:00
Yann Collet
7c33b48221
Merge pull request #1151 from felixhandte/zstd-dfast-in-place-dict-goto
ZSTD_dfast: Support Searching the Dictionary Context In-Place (Alternate `goto` Implementation)
2018-05-31 17:37:09 -07:00
George Lu
5ff30fe2e5 Unknown Suffix Error
Changed so only compiled formats are printed in list of supported extensions
2018-05-31 16:13:36 -07:00