Yann Collet
d6394cc4c3
fixed test-zstd-nolegacy
2017-08-20 10:15:44 -07:00
Yann Collet
32fb407c9d
updated a bunch of headers
...
for the new license
2017-08-18 16:52:05 -07:00
Yann Collet
8049556928
Merge pull request #778 from terrelln/bad-huff
...
[libzstd] Fix bug in Huffman decompresser
2017-08-07 14:05:58 -07:00
Nick Terrell
abe12b3399
[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.
2017-08-07 12:37:48 -07:00
Stella Lau
e1abc2a367
Switch the sleep function to UTIL_sleepMilli
2017-08-07 11:49:13 -07:00
Stella Lau
1e366f9dea
Add test for deadlock
2017-08-02 11:27:50 -07:00
Stella Lau
5adceeed01
Allow queueSize=0 in pool.c and update poolTests
2017-07-31 10:10:16 -07:00
Yann Collet
38ba7002f2
fixed minor warning on unused variable in shell function
2017-07-20 18:39:04 -07:00
Yann Collet
5e6c5203f3
fixed fuzzer test for non OS-X platforms
2017-07-20 15:11:56 -07:00
Yann Collet
1ca1288689
added --memtest=# command to fuzzer
...
to jump directly to relevant test section
2017-07-19 16:01:16 -07:00
Yann Collet
44b0838253
Merge pull request #770 from terrelln/test-mode
...
[zstdcli] Fix -t in streaming mode
2017-07-18 15:40:59 -07:00
Nick Terrell
d0b27483ae
[zstdcli] Fix -t in streaming mode
2017-07-18 14:45:49 -07:00
Nick Terrell
cc1522351f
[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.
2017-07-18 13:20:40 -07:00
Yann Collet
fa3aa04ccd
Merge pull request #761 from paulcruz74/file-rename
...
renamed pool.c to poolTests.c
2017-07-14 09:09:45 -07:00
Yann Collet
3a60efd3a9
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
2017-07-13 10:17:23 -07:00
Yann Collet
052a95f77c
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
2017-07-11 17:18:26 -07:00
Yann Collet
ef0ff7fe7f
zstdmt: removed margin for improved memory usage
2017-07-11 08:54:29 -07:00
Yann Collet
4616fad18b
improved ZSTDMT_compress() memory usage
...
does not need the input buffer for streaming operations
also : reduced a few tests time length
2017-07-10 17:16:41 -07:00
Yann Collet
670b1fc547
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.
2017-07-10 16:30:55 -07:00
Yann Collet
3510efb02d
fix : custom allocator correctly propagated to child contexts
2017-07-10 14:21:40 -07:00
Yann Collet
ee3423d709
extended fuzzer MT memory tests
2017-07-10 14:09:16 -07:00
Yann Collet
88da8f1816
fix : propagate custom allocator to ZSTDMT though ZSTD_CCtx_setParameter()
...
also : compile fuzzer with MT enabled
2017-07-10 14:02:33 -07:00
Yann Collet
f9524cf366
added --memtest to fuzzer
2017-07-10 13:48:41 -07:00
Yann Collet
e32fb0c1fe
added ZSTD_sizeof_CCtx() test
2017-07-10 12:29:57 -07:00
Paul Cruz
89190ef07d
renamed pool.c to poolTests.c
2017-07-10 11:32:30 -07:00
Yann Collet
ed0243a63c
removed zbufftest from list of all
tests
2017-07-07 16:16:14 -07:00
Yann Collet
990449b89d
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"
2017-07-07 15:21:35 -07:00
Yann Collet
7758ed8458
fixed fullbench, part 2
2017-07-06 02:48:00 -07:00
Yann Collet
9b2c1acfc0
fixed fullbench
2017-07-06 02:22:57 -07:00
Yann Collet
27e883371d
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)
2017-07-04 19:33:16 -07:00
Yann Collet
2cb9774f5e
more precise estimation of amount to flush at end of stream (single thread mode)
...
also : can use DEBUGLEVEL variable in /tests
2017-07-04 12:39:26 -07:00
Yann Collet
5051dd39ca
Merge pull request #743 from facebook/fullbench
...
compress_generic() automatic optimization opportunities
2017-07-03 21:26:38 -07:00
Yann Collet
95c4a6e2c8
Merge pull request #745 from terrelln/libfuzzer
...
[fuzz] Add libFuzzer targets
2017-07-03 15:15:20 -07:00
Nick Terrell
bea0f0cfa0
[fuzz] Move from fuzz/ to tests/fuzz/
2017-07-03 12:40:12 -07:00
cyan4973
4b26306cb8
blindfix : fullbench's one-time leak, detected by valgrind
2017-07-01 08:03:59 -07:00
cyan4973
c07e43c2b5
added --show-leak-kind=all to valgrind tests
2017-07-01 07:05:11 -07:00
cyan4973
b5bb7c6d95
fixed Visual compilation of fullbench-dll
2017-06-29 19:59:37 -07:00
Yann Collet
e7e5a8cef7
made fullbench compatible with multi-threading
...
fullbench 61/62 measure speed of ZSTD_compress_generic with 2 threads
2017-06-29 18:56:24 -07:00
Yann Collet
afb0aca739
zstreamtest : big tests are only enabled in 64-bits mode
...
to avoid requesting too much memory in 32-bits mode during MT tests
2017-06-29 18:19:09 -07:00
Yann Collet
2e84bec9ac
updated fullbench to also measure ZSTD_compress_generic()
...
will make it possible to visualize
optimization opportunity for ZSTD_e_end
2017-06-29 13:03:10 -07:00
Yann Collet
7303ed5d74
minor : specify compression level in tags
2017-06-29 11:30:31 -07:00
Yann Collet
590937df20
Merge pull request #739 from facebook/refPrefix
...
ZSTD_refPrefix
2017-06-29 04:36:03 -07:00
Yann Collet
811deaea6f
Merge pull request #736 from terrelln/cover-default-api
...
[zdict] Make COVER the default algorithm
2017-06-28 20:25:36 -07:00
Yann Collet
ad5f29918e
Merge pull request #737 from facebook/advancedAPI2
...
simplified API for *initStatic*()
2017-06-28 20:25:22 -07:00
Yann Collet
62f7efc04a
added a test to ensure ZSTD_refPrefix() doesn't impact the following compression job
2017-06-28 16:25:13 -07:00
Paul Cruz
7ac4724bd2
removed fnum from DISPLAY statements
2017-06-28 13:00:49 -07:00
Paul Cruz
e667d33b0b
fixed generation of buggy test, corrected DISPLAY statements for errors
2017-06-28 12:19:37 -07:00
Yann Collet
33a6639039
fixed ZSTD_refPrefix with Multithread-enabled CCtx
2017-06-28 11:09:43 -07:00
Yann Collet
1fd2df9c2c
fixed zstreamtest
...
modifying compression parameters is not allowed after ZSTD_CCtx_loadDictionary()
but it is still allowed after ZSTD_refPrefix()
2017-06-28 09:57:59 -07:00
Yann Collet
2e4274262d
controlled dictMode
2017-06-27 17:09:12 -07:00
Yann Collet
b7372933b8
implemented ZSTD_refPrefix()
2017-06-27 15:49:12 -07:00
Yann Collet
fecc721fd9
added parameter ZSTD_p_refDictContent
2017-06-27 11:46:39 -07:00
Yann Collet
09a5bbe22e
Merge pull request #735 from terrelln/xz-default
...
[zstdcli] Support xz by default when liblzma is available
2017-06-27 09:42:02 -07:00
Nick Terrell
5b7fd7c422
[zdict] Make COVER the default algorithm
2017-06-26 21:09:22 -07:00
Yann Collet
20eeb243d1
Merge pull request #729 from paulcruz74/corpus
...
Corpus
2017-06-26 17:47:28 -07:00
Yann Collet
dde10b23fe
refactored ZSTD_estimateDStreamSize()
...
now uses windowSize as argument.
Also : created ZSTD_estimateDStreamSize_fromFrame()
2017-06-26 17:44:26 -07:00
Yann Collet
09ae03a570
ZSTD_estimateCDictSize_advanced()
...
ZSTD_estimateCDictSize() now uses same arguments as ZSTD_createCDict()
ZSTD_estimateCDictSize_advanced() uses same arguments as ZSTD_createCDict_advanced()
2017-06-26 16:47:32 -07:00
Yann Collet
0c9a915a28
ZSTD_estimateCStreamSize_advanced()
2017-06-26 16:02:25 -07:00
Yann Collet
31af8290d1
ZSTD_estimateCCtx_advanced()
...
ZSTD_estimateCCtx() is now a "simple" function,
taking int compressionLevel as single argument.
ZSTD_estimateCCtx_advanced() takes a CParams argument,
which is both more complete and more complex to generate.
2017-06-26 15:52:39 -07:00
Nick Terrell
6aeb50ea0d
[zstdcli] Add unlzma and unxz symlinks
2017-06-26 11:24:36 -07:00
Paul Cruz
298fe9f23b
added cli tests to test-all
2017-06-23 17:10:41 -07:00
Paul Cruz
3a295a91f8
added additional condition so large offsets into the dictionary are not generated past windowSize
2017-06-23 15:54:51 -07:00
Paul Cruz
2085375816
fixed bug detected by the API test
2017-06-23 13:44:24 -07:00
Paul Cruz
8cd134559d
type warnings
2017-06-23 12:00:48 -07:00
Paul Cruz
4219acc60a
fixed bus error bug
2017-06-23 11:22:29 -07:00
Yann Collet
ef269c1b68
Merge pull request #725 from facebook/advancedAPI2
...
New Advanced API
2017-06-23 09:50:47 -07:00
Yann Collet
cca1ed14db
Merge branch 'advancedAPI2' of github.com:facebook/zstd into advancedAPI2
2017-06-23 00:13:03 -07:00
Yann Collet
32f546c763
zstreamtest : disabled multi-threading tests with --newapi --no-big-tests
...
--no-big-tests is typically used in combination with qemu-user-static
qemu-user-static allocated 4 GB of RAM upfront.
On 2 GB VM, this can degenerate into a crash.
It's not a problem as long as memory is not used.
But with multi-threading enabled, memory fragmentation kicks in,
so the amoung of RAM effectively touched increases,
and can pass beyond the 2 GB limit of the VM.
In single-threaded mode, there is no such issue :
memory requirement is smaller, and remains well-located,
so very little fragmentation is expected.
This modification should make `qemu-arm-static zstreamtests --newapi --no-big-tests`
work fine on Travis CI.
2017-06-23 00:09:02 -07:00
Paul Cruz
2e8cc6f12a
added sizeof for clarity
2017-06-22 15:52:33 -07:00
Paul Cruz
6d7f442120
changed makefile test
2017-06-22 15:44:01 -07:00
Paul Cruz
b325a2e4db
changed assignment
2017-06-22 15:36:28 -07:00
Paul Cruz
2935239544
added description for dictionary cli tests
2017-06-22 15:23:59 -07:00
Paul Cruz
97a8f89bec
made changes to cli test so it runs properly
2017-06-22 15:13:41 -07:00
Paul Cruz
829eb29033
added cli test for decodecorpus inside tests/Makefile. Also changed calculation of offset
2017-06-22 14:43:44 -07:00
Paul Cruz
028fb9d01b
added cli test case in Makefile
2017-06-22 13:53:39 -07:00
Paul Cruz
98751f69e7
should be updating seed whenever multiple files are generated
2017-06-22 10:23:36 -07:00
Paul Cruz
84cfa07d2d
changed format of command to --use-dict=#
2017-06-22 10:04:14 -07:00
Yann Collet
f99c2c1a22
reduced --no-big-tests even more
...
to pass tests on qemu-aarch64
2017-06-21 23:35:58 -07:00
Paul Cruz
04094f37e9
fixed offset in this case os that it always goes past src start
2017-06-21 18:47:40 -07:00
Yann Collet
49f8459d11
fixed minor cast warning
2017-06-21 18:43:39 -07:00
Paul Cruz
0950b3159a
more meaningful names for count variables
2017-06-21 18:30:27 -07:00
Paul Cruz
0b6eedeace
malloc samples instead of static allocation
2017-06-21 18:24:19 -07:00
Yann Collet
4d3bdcf130
reduced CLevelMax for --no-big-tests
2017-06-21 18:20:02 -07:00
Paul Cruz
52a13abf3f
removed comment regarding windowSize requirement
2017-06-21 18:13:52 -07:00
Paul Cruz
32e36c2d9a
removed requirement that offset be less than windowSize
2017-06-21 18:00:47 -07:00
Yann Collet
bfc2f00080
--no-big-tests for zstreamtest
...
Apply --no-big-tests for tsan tests
2017-06-21 17:57:14 -07:00
Paul Cruz
eeff2d0e3c
added const x2
2017-06-21 17:48:37 -07:00
Paul Cruz
04253e21bb
added const
2017-06-21 17:48:01 -07:00
Paul Cruz
2ceaec1aad
got rid of unnecessary casting to void*
2017-06-21 17:46:37 -07:00
Paul Cruz
ccae9ec807
added comment addressing use of bits in frame header descriptor
2017-06-21 17:43:21 -07:00
Yann Collet
dce789281b
fixed : decompression of skippable frames in streaming mode
2017-06-21 15:53:42 -07:00
Yann Collet
c16748b137
added test cases for new command --list
2017-06-21 12:09:53 -07:00
Yann Collet
7bd1a2900e
added ZSTD_dictMode_e to control dictionary loading mode
2017-06-21 11:50:33 -07:00
Paul Cruz
db3606e249
added test for files with no frame content size
2017-06-20 17:43:36 -07:00
Paul Cruz
acf0df678c
fixed strange spacing
2017-06-20 15:41:43 -07:00
Paul Cruz
69bc4fab25
free the context object once done with decompression
2017-06-20 15:37:14 -07:00
Paul Cruz
ceb4f65620
allocate statically so we don't have to deal with freeing
2017-06-20 15:31:54 -07:00
Paul Cruz
a73c2a444a
added tests with null files, changed condition to check that the file is more than 0 bytes
2017-06-20 14:33:08 -07:00
Paul Cruz
58c19b4202
spacing matters for test scripts
2017-06-20 14:14:53 -07:00
Yann Collet
ff8f83bd47
fixed fuzzer test
2017-06-20 12:17:32 -07:00
Paul Cruz
b07d0af2ba
added additional tests for error detection
2017-06-20 11:54:44 -07:00
Paul Cruz
43ffcdde40
const dictOffset
2017-06-20 11:27:39 -07:00
Paul Cruz
1e0d125e76
const value
2017-06-20 11:15:26 -07:00
Paul Cruz
0034129270
made changes to accommodate single file use case
2017-06-20 11:07:38 -07:00
Paul Cruz
6a99de2dd8
change test to list info on .zst files
2017-06-20 10:45:06 -07:00
Paul Cruz
36e14b1963
added description to advanced usage, changed to use-dict
2017-06-20 10:34:34 -07:00
Paul Cruz
15102069a1
removed testing code from generation code
2017-06-20 10:25:16 -07:00
Paul Cruz
ff5589c091
added comments for clarity
2017-06-20 10:17:38 -07:00
Paul Cruz
551fb7ca05
changed error condition
2017-06-20 10:14:03 -07:00
Paul Cruz
b8237c6c66
refactoring for readability
2017-06-20 10:12:13 -07:00
Paul Cruz
6f17de2132
changed computation for readability
2017-06-20 09:50:28 -07:00
Paul Cruz
4a4f9ba262
const value that doesn't change
2017-06-19 17:46:21 -07:00
Paul Cruz
3a6856edca
changed scope to avoid errors
2017-06-19 17:43:16 -07:00
Paul Cruz
7d2b5613b4
adhere to min dict size
2017-06-19 17:37:14 -07:00
Paul Cruz
ea2af1ffc4
changed dictionary to stay reasonable size during test
2017-06-19 17:34:50 -07:00
Paul Cruz
fdbb07283a
added test to runTestMode
2017-06-19 17:29:15 -07:00
Paul Cruz
bdec7b8ce7
fixed for loop declaration, fixed test case
2017-06-19 17:18:43 -07:00
Paul Cruz
23098b53e8
wrote a test for dictionary corpus
2017-06-19 17:13:00 -07:00
Paul Cruz
7a26390989
changing for loop declaration
2017-06-19 16:39:57 -07:00
Paul Cruz
147ef05f12
for loop declaration not allowed
2017-06-19 16:38:51 -07:00
Paul Cruz
791352ad0e
scope change
2017-06-19 16:32:38 -07:00
Paul Cruz
365e265a8e
changed scope so that warning disappears
2017-06-19 16:28:40 -07:00
Paul Cruz
f4f928595b
changed scope to get rid of mixed code/variables warning
2017-06-19 16:27:05 -07:00
Paul Cruz
7ea025cc7d
added in struct to keep functions more orderly
2017-06-19 16:23:00 -07:00
Paul Cruz
b91b810c64
made some small changes to dictInfo struct and initDictInfo
2017-06-19 16:05:05 -07:00
Paul Cruz
1ee4f6b36c
cleaning up code
2017-06-19 15:55:01 -07:00
Paul Cruz
2a52d72712
added comment to anotate decompressed error code
2017-06-19 14:21:35 -07:00
Paul Cruz
73ebb646d8
small stylistic changes
2017-06-19 14:20:35 -07:00
Paul Cruz
34f4e5cab2
changed if statement styling
2017-06-19 14:07:56 -07:00
Paul Cruz
1fc1a35dc4
added calls to free to match calls to malloc, made some stylistic changes, added init function for new struct
2017-06-19 14:02:27 -07:00
Paul Cruz
8f4fa43fe8
got files to decompress
2017-06-19 13:21:50 -07:00
Yann Collet
688952062b
minor declaration statement warning fix
2017-06-19 11:53:42 -07:00
Yann Collet
d7a3bffba9
new api : setting compression parameters is refused if a dictionary is already loaded
2017-06-19 11:53:01 -07:00
Paul Cruz
da4ddc1f76
fixed decompression so that it uses compressed version
2017-06-19 11:40:45 -07:00
Paul Cruz
33467add60
made changes so that HUF_writeCTable no longer fails
2017-06-19 11:27:50 -07:00
Yann Collet
ed1d039127
newapi fuzzer tests : random flush orders in main loop
2017-06-19 11:07:33 -07:00
Paul Cruz
09ac51b56b
small style changes
2017-06-19 09:24:38 -07:00
Yann Collet
f5deae8a67
new api fuzzer tests : frame parameters are randonly set
2017-06-18 23:41:38 -07:00
Yann Collet
ea3630a889
new api fuzzer set : dictionary is randomly set
2017-06-18 23:31:55 -07:00
Yann Collet
8dee0ec99e
new api fuzzer tests : compression parameters are randomly set
2017-06-18 23:25:15 -07:00
Yann Collet
bd05b19713
removed macro CLAMP from decodecorpus
...
never used,
and would duplicate with CLAMP from zstd_compress.c
2017-06-16 18:16:27 -07:00
Yann Collet
01743a36e7
fuzzer tests for new API
2017-06-16 17:56:41 -07:00
Paul Cruz
2f30433cd7
fixing general style
2017-06-15 18:06:32 -07:00
Paul Cruz
ddd1ab710c
added tests in playTest.sh
2017-06-15 16:53:03 -07:00
Paul Cruz
623b8fce85
add print statements for debugging and change malloc with updated size
2017-06-15 11:37:24 -07:00
Paul Cruz
52934fbfc8
added print statements for debugging, fixed first segfault
2017-06-15 09:47:29 -07:00
Paul Cruz
03a208e27c
changed samples to geometric distribution so that it is huffman compressible
2017-06-14 18:06:16 -07:00
Paul Cruz
d93207a79f
changed dictionary from using fixed amount of bytes for the header / entropy tables
2017-06-14 17:23:56 -07:00
Paul Cruz
664ed05ff6
changed randomly generated samples to randomly selected from the dictionary content
2017-06-14 16:42:51 -07:00
Paul Cruz
3b0e24c06b
added error message to catch case where size not given
2017-06-14 12:04:22 -07:00
Paul Cruz
aa95bc0a5f
code refactoring and adding some print statements for debugging
2017-06-14 10:54:47 -07:00
Paul Cruz
07cfc975bb
debugging error with finalizeDictionary() not writing dictionary properly
2017-06-13 17:27:02 -07:00
Paul Cruz
8dd621f788
changed makefile to include zdict functions, wrote out dictionary to path
2017-06-13 14:19:35 -07:00
Paul Cruz
f35f252e36
added code to generate dictionary using finalizeDictionary
2017-06-13 11:54:43 -07:00
Paul Cruz
37e1b1488b
removed previous double free crash, used new crash function
2017-06-09 13:57:18 -07:00
Paul Cruz
be9b0ae627
added error function for different compilation modes
2017-06-09 13:41:34 -07:00
Paul Cruz
11c3987baf
added code to extend the offset when a dictionary is detected
2017-06-09 09:48:56 -07:00
Paul Cruz
125ed59968
made sure dictionary ID was being written in the frame header of each file
2017-06-08 17:27:15 -07:00
Paul Cruz
233ee5334e
set the lower bits of frame header descriptor if dictionary is needed
2017-06-08 17:11:33 -07:00
Paul Cruz
c2d909e396
added code for generating dictionary/test files randomly. Still need to make sure dictionary ID matches
2017-06-08 17:06:30 -07:00
Yann Collet
8c910d2097
updated ZSTDMT streaming API
...
ZSTDMT streaming API is now similar
and has same capabilites as single-thread streaming API.
It makes it easier to blend them together.
2017-06-03 01:15:02 -07:00
Yann Collet
cdf7e82222
Added ZSTD_initStaticCDict()
2017-05-25 18:05:49 -07:00
Yann Collet
57827f906f
added ZSTD_initStaticDDict()
2017-05-25 15:44:06 -07:00
Yann Collet
25989e361c
updated ZSTD_estimate?DictSize() to pass parameter byReference
...
resulting ?Dict object is smaller when created byReference.
Seems better than a documentation note.
2017-05-25 15:07:37 -07:00
Yann Collet
0fdc71c3dc
added ZSTD_initStaticDCtx()
2017-05-24 17:41:41 -07:00
Yann Collet
c7fe262dc9
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.
2017-05-23 13:20:41 -07:00
Yann Collet
60a557e7fd
fixing symbol.c test
...
I believe it would be better to rely on fuzzer tests compiled with dll
2017-05-19 11:27:43 -07:00
Yann Collet
fa3671eac7
changed ZSTD_BLOCKSIZE_ABSOLUTEMAX into ZSTD_BLOCKSIZE_MAX
...
Also :
change ZSTD_getBlockSizeMax() into ZSTD_getBlockSize()
created ZSTD_BLOCKSIZELOG_MAX
2017-05-19 10:51:30 -07:00
Yann Collet
009d604e00
ZSTD_compress_generic() supports multiple successive frames
...
also : clarified streaming API implementation
2017-05-19 10:17:59 -07:00
Yann Collet
0bdb575c31
Merge branch 'dev' into advancedAPI2
2017-05-16 16:32:29 -07:00
Yann Collet
2d4d31c18a
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
2017-05-16 11:34:38 -07:00
Yann Collet
83d0c764dc
added several compilation flags
2017-05-15 17:15:46 -07:00
Yann Collet
a5ffe3d370
pushed enum values for strategy by one (ZSTD_fast==1)
...
this makes it possible to use `0` to mean:
"do not change strategy"
2017-05-12 16:29:19 -07:00
Nick Terrell
5f2c7213c7
Merge remote-tracking branch 'upstream/dev' into btopt
...
* upstream/dev: (305 commits)
added test for ZSTD_estimateCStreamSize()
changed variable name, for clarity
fixed ZSTD_estimateCStreamSize()
shortened ZSTD_createCStream_Advanced()
fixed symbols test
added ZSTD_estimateDStreamSize()
changed name frameParams into frameHeader
regroup memory usage function declarations
separated ZSTD_estimateCStreamSize() from ZSTD_estimateCCtxSize()
bumped version number
added ZSTD_estimateCDictSize() and ZSTD_estimateDDictSize()
Updated ZSTD_freeCCtx()
updated ZSTD_estimateCCtxSize()
Updated ZSTD_sizeof_CCtx()
merged CCtx and CStream as a single same object
cli : -d and -t do not stop after a failed decompression
added dev branch CircleCI badge
added dev branch Appveyor badge
keep dev branch status only
creates a binary archive without the `programs` directory
...
2017-05-10 16:49:58 -07:00
Yann Collet
30ab64e21d
added test for ZSTD_estimateCStreamSize()
2017-05-10 11:30:19 -07:00
Yann Collet
461a9cc7c6
fixed symbols test
2017-05-09 16:53:09 -07:00
Yann Collet
f16f4497ca
added ZSTD_estimateDStreamSize()
2017-05-09 16:18:17 -07:00
Yann Collet
542c9dfcf8
changed name frameParams into frameHeader
...
ZSTD_frameParams => ZSTD_frameHeader
ZSTD_getFrameParams() -> ZSTD_getFrameHeader()
The new naming is more distinctive from ZSTD_frameParameters,
which is used during compression.
ZSTD_frameHeader is clearer in its intention to described frame header content.
It also implies we are decoding a ZSTD frame, hence we are at decoding stage.
2017-05-09 15:46:07 -07:00
Yann Collet
fa8dadb294
separated ZSTD_estimateCStreamSize() from ZSTD_estimateCCtxSize()
...
for clarity
2017-05-08 18:24:16 -07:00
Yann Collet
a1d6704d7f
added ZSTD_estimateCDictSize() and ZSTD_estimateDDictSize()
...
it complements ZSTD_estimateCCtxSize()
for the special case of ZSTD_initCStream_usingDict()
2017-05-08 17:51:49 -07:00
Yann Collet
fc5145955a
updated ZSTD_estimateCCtxSize()
...
added a parameter streaming,
to estimate memory allocation size
when the CCtx is used for streaming (CStream).
Note : this function is not able to estimate
memory cost of a potential internal CDict
which can only happen when starting with ZSTD_initCStream_usingDict()
2017-05-08 17:07:59 -07:00
Yann Collet
0be6fd3429
merged CCtx and CStream as a single same object
...
To be changed : ZSTD_sizeof_CCtx(), ZSTD_estimateCCtxSize()
2017-05-08 16:08:01 -07:00
Yann Collet
01a1abfdb5
cli : -d and -t do not stop after a failed decompression
...
The problematic srcfile will be named on console/log,
but decompression/test will continue onto next file in the list.
2017-05-05 19:15:24 -07:00
Nick Terrell
f376d47c11
[CLI] Switch dictionary builder on CLI to cover
2017-05-02 11:18:27 -07:00
Yann Collet
a51cab6e68
Merge pull request #678 from facebook/apiChange
...
Breaking API Change around CDict
2017-04-28 10:02:45 -07:00
Yann Collet
36e79a1a1f
tests : -g is part of DEBUGFLAGS
2017-04-27 17:29:40 -07:00
Yann Collet
c6915429f2
shortened Appveyor release tests
...
fuzzer supports time suffix `s` for "seconds"
2017-04-27 16:24:53 -07:00
Yann Collet
a92cbb7004
Added a secondary test, checking dictID presence after setting noDictIdFLag=1
2017-04-27 15:08:56 -07:00
Yann Collet
7d283cdfa2
added test for ZSTD_initCStream_usingCDict_advanced()
2017-04-27 14:48:34 -07:00
Yann Collet
2f73427d35
added test for ZSTD_compress_usingCDict_advanced()
2017-04-27 14:39:39 -07:00
Yann Collet
7321345fd2
fixed another VS2008 init error
2017-04-27 14:19:34 -07:00
Yann Collet
f4bd857d81
created ZSTD_compress_usingCDict_advanced()
2017-04-27 11:31:55 -07:00
Yann Collet
31533bacce
Changed ZSTD_createCDict_advanced()
...
It now only uses compressionParameters as argument.
It produces many changes throughout user code,
though hopefully they tend to be simple :
just provide the cParams part from existing ZSTD_parameters.
Some programs might depend on ZSTD_createCDict_advanced() to pass frame parameters.
This change will force them to revisit this strategy and fix it,
since frame parameters are effectively silently ignored in current version.
2017-04-27 00:29:04 -07:00
Sean Purcell
4de8632957
Add LZ4 compress/decompress support to CLI
2017-04-24 16:48:25 -07:00
Yann Collet
230d7acc7d
cli : add support for --threads=# command
...
updated documentation
add relevant test case
2017-04-21 11:38:13 -07:00
Yann Collet
c17e020c9a
disable assert when compiling paramgrill
...
paramgrill is a benchmark calibration function.
Speed accuracy is critical, it cannot be altered by assert.
2017-04-20 12:50:02 -07:00
Yann Collet
2c5514c759
fixed ZSTDMT_initCStream_advanced()
...
Must use the new ZSTD_compressBegin_usingCDict_advanced()
to enforce correct frame parameters
2017-04-18 22:52:41 -07:00
Yann Collet
0bb381dad8
added test for ZSTD_initCStream_advanced()
...
when params.fParams.contentSizeFlags = 1
and pledgedSrcSize = 0
then srcSize should be considered 0 (empty), and not "unknown"
2017-04-18 15:08:52 -07:00
Yann Collet
4f818182b8
clarified frame parameters for ZSTD_compress*_usingCDict()
...
created ZSTD_compressBegin_usingCDict_internal(),
which gives direct control to frame Parameters.
ZSTD_resetCStream_internal() now points into it.
2017-04-17 18:29:06 -07:00
Yann Collet
9c4c970399
Merge branch 'dev' into compressionFlow
2017-04-17 16:33:09 -07:00
Sean Purcell
d845dab69c
Fix input size too small to trigger zstdmt
2017-04-17 12:10:58 -07:00
Sean Purcell
c424ec2eae
Add multithreading tests to playTests.sh
2017-04-17 11:41:46 -07:00
Yann Collet
2afb075382
Merge branch 'dev' into compressionFlow
2017-04-14 15:08:31 -07:00
Yann Collet
f913cbed33
fixed : memory leak in fuzzer test
2017-04-13 22:46:51 -07:00
Yann Collet
20d5e03893
content size is controlled at bufferless level
...
so it's active for all entry points
Also : added relevant test (wrong content size) in fuzzer
2017-04-11 18:34:02 -07:00
Sean Purcell
d37e1df2ab
Fix message
2017-04-11 17:33:26 -07:00
Sean Purcell
eb70d219fd
Add test of file > 4GB to playTests
2017-04-11 17:15:13 -07:00
Yann Collet
4ee6b15dac
force contentSizeFlag=0 when using ZSTD_initCStream_usingCDict()
...
because by definition srcSize is not known when using this prototype.
added relevant test
Note : this use was already working, because at a later stage
(both ZSTD_compressBegin_usingCDict() and ZSTD_copyCCtx())
pledgedSrcSize=0 is translated into "unknown", no matter the frame parameter.
This is not correct, but of little importance,
as the medium term plan is to no longer set fParams within CDict
2017-04-11 11:59:44 -07:00
Yann Collet
4b987ad8ce
Introduce ZSTD_initCStream_internal()
...
This is now the regroup point for ZSTD_initCStream*() functions
ZSTD_initCStream_advanced() now properly checks for parameters validity.
Also : added <assert.h> usage inside zstd_compress.c
Needs ZSTD_DEBUG=1 macro to be triggered.
Will be triggered by default from `tests` directory
2017-04-10 17:50:44 -07:00
Yann Collet
1fa3b75369
Merge pull request #648 from facebook/zstdmt
...
improved zstreamtest --mt to trap bug #644
2017-04-07 06:09:52 -07:00
Sean Purcell
1652172b2d
Add refuse to overwrite test and fix format
2017-04-06 17:06:30 -07:00
Sean Purcell
9da11c6aae
Add test for overwriting read-only
2017-04-06 12:58:49 -07:00
Yann Collet
ce80098f14
improved zstreamtest --mt to trap bug #644
2017-04-05 16:34:09 -07:00
Yann Collet
9631e603ae
paramgrill : results from optimizer use cli format
...
Best found configuration is displayed
using documented cli advanced parameter syntax.
2017-04-04 16:54:33 -07:00
Yann Collet
89b32f3db0
fix paramgrill -O#
...
ensure proposed config does not require more memory than necessary
2017-04-04 16:41:11 -07:00
Yann Collet
2724f25567
fixed paramgrill -O#
...
find optimal settings for a minimum speed
2017-04-04 16:31:17 -07:00
Yann Collet
c2007388a5
fixed bench.c : optional advanced parameters applied
...
before creating cdict
2017-04-04 15:35:06 -07:00
Nick Terrell
39a6cc5172
Make ZSTD_compress_usingCDict() respect contentSizeFlag
2017-04-03 21:09:55 -07:00
Nick Terrell
62ecad3819
Fix ZSTD_initCStream_usingCDict() to use dictionary
2017-04-03 21:05:59 -07:00
Yann Collet
30c7698970
optimize ZSTDMT_compress() memory usage
...
does no longer allocate temporary buffers
when there is enough room in dstBuffer to decompress directly there.
(previous method would skip that for 1st chunk only).
Also : fix ZSTD_compressBound() for small srcSize
2017-03-31 18:27:03 -07:00
Yann Collet
6476c51b86
Merge pull request #637 from facebook/zstdmt
...
Zstdmt
2017-03-30 14:18:37 -07:00
Nick Terrell
5152fb2cb2
Convert all tabs to spaces
2017-03-29 18:51:58 -07:00
Yann Collet
1e1e26f2ac
fixed #634 : ZSTDMT_compressCCtx() doesn't provide frame content size in header
2017-03-29 17:09:59 -07:00
Yann Collet
0ef6803707
added ZSTD_getFrameContentSize() to ZSTDMT unit test in fuzzer
...
Now tests fail, because ZSTDMT_compress() doesn't fill frame content size correctly.
2017-03-29 16:58:57 -07:00
Yann Collet
41fefd573a
Improved speed tests
...
Better compatibility with Mac OS-X
Force attribution to a selected core # (Linux)
2017-03-26 23:52:19 -07:00
Yann Collet
4c41d37fcc
changed test for new syntax
...
--dictID= and --maxdict=
2017-03-24 18:36:56 -07:00
Yann Collet
f332ece468
dictBuilder fails to create dictionary on certain input
...
Properly expressed with an error code (see zstd_errors.h)
and a cli return code != 0
2017-03-23 16:24:02 -07:00
Sean Purcell
680e4e0953
Ignore symbolic links unless --force specified
2017-03-23 11:52:09 -07:00
Sean Purcell
042ba122ae
Change g_displayLevel to int and fix DISPLAYUPDATE flush
2017-03-23 11:21:59 -07:00
Sean Purcell
1b418bd3da
Merge remote-tracking branch 'origin/dev' into appveyor
2017-03-21 10:59:54 -07:00
Sean Purcell
5a2b857029
Update appveyor.yml to have short and long tests
2017-03-20 17:04:44 -07:00
Sean Purcell
c771977489
Fix decodecorpus clang compile errors
2017-03-20 16:02:24 -07:00
Sean Purcell
2f6c7e6a53
Fix windows compiler warnings for decodecorpus
2017-03-20 13:45:12 -07:00
Yann Collet
170861da70
Merge pull request #610 from iburinoc/slowfuzzer
...
Strongly limit compression level when source is large for tests running on QEMU
2017-03-20 13:36:01 -07:00
Sean Purcell
0b0b10ec83
Add --no-big-tests flag for qemu fuzz-tests
2017-03-20 11:32:24 -07:00
Sean Purcell
7ebf2de02d
Add ability to strongly limit fuzzer test size with flag
2017-03-20 11:25:00 -07:00
Yann Collet
35c147ab6a
Merge pull request #605 from iburinoc/term
...
Fix zstd not erroring on compressing to terminal without forceStdout
2017-03-17 14:02:48 -07:00
Sean Purcell
9a38dfa794
Only run IS_CONSOLE tests with a TTY
2017-03-17 12:32:18 -07:00
Sean Purcell
d973071e90
Add tests for compressed data on console
2017-03-16 16:25:19 -07:00
Sean Purcell
f5e50519e0
Prevent fuzz testers from combining large dicts with high clevel
2017-03-15 15:04:54 -07:00
Yann Collet
3773bd318f
Merge pull request #601 from terrelln/nxz
...
Add xz and lzma support.
2017-03-13 22:00:03 -07:00
Nick Terrell
aa8bcf360f
Add xz and lzma support.
...
Finish feature started by @inikep.
* Add xz and lzma compression and decompression support to target `xzstd`.
* Fix bug in gzip decompression that silently accepted truncated files.
* Add gzip frame composition tests.
* Add xz/lzma compatibility tests.
* Add xz/lzma frame composition tests.
2017-03-13 18:45:41 -07:00
Sean Purcell
120df494e9
Update builds to not support legacy v01-v03
2017-03-13 14:44:08 -07:00
Sean Purcell
7c8f5d5bc7
Make test times overwritable
2017-03-09 16:05:23 -08:00
Sean Purcell
daec40db24
Update .travis.yml and Makefile for medium tests
2017-03-09 16:05:22 -08:00
Nick Terrell
eeb31eed39
s/ZSTD_btopt2/ZSTD_btultra/g
2017-03-09 11:44:25 -08:00
Yann Collet
8b1d004031
added -Wformat-security flag, as recommended by @pixelb
2017-03-05 21:17:32 -08:00
Yann Collet
27526c7201
make : added target shortest
...
shortest only run fast part of playTests.sh .
cc @iburinoc
2017-03-01 17:02:49 -08:00
Yann Collet
c1c040eae1
added gzip tests
...
also : made sure zstd --format=gzip -V
would fail if gzip compatibility is not supported
2017-03-01 16:49:20 -08:00
Yann Collet
51598510c0
Merge pull request #580 from facebook/speedStream
...
Improve streaming decompression speed
2017-03-01 10:59:51 -08:00
Yann Collet
a33ae64204
fixed decoding skippable frames
2017-02-28 01:15:28 -08:00
Yann Collet
c0b1731bce
added test for decompression with NULL dict and NULL DDict
...
previous version of ZSTD_decompressMultiFrame() would fail that test
2017-02-28 01:02:46 -08:00
Przemyslaw Skibinski
8b3560e196
update gzip tests
2017-02-28 09:41:23 +01:00
Yann Collet
1d7f30f9d4
Merge branch 'decompressStream' into dev
2017-02-27 20:55:22 -08:00
Yann Collet
a81c2e7e44
Merge pull request #573 from facebook/ddict
...
Improved DDict memory usage
2017-02-27 20:54:42 -08:00
Yann Collet
952d06fa9c
fullbench : -i0 displays list of functions to bench
2017-02-27 17:58:02 -08:00
Yann Collet
67d86a74a5
added test case : --rm on stdin
...
must remain silent (instead of failing)
2017-02-27 16:09:20 -08:00
Yann Collet
ea7589ce07
Merge pull request #571 from inikep/dev11
...
gzip tests
2017-02-27 13:54:33 -08:00
Przemyslaw Skibinski
5d848527e6
use "./gzip" for gzip tests
2017-02-27 22:02:03 +01:00
Przemyslaw Skibinski
b43d75154d
update gzip tests
2017-02-27 09:07:35 +01:00
Przemyslaw Skibinski
1479c98661
Merge remote-tracking branch 'refs/remotes/facebook/dev' into dev11
2017-02-27 08:56:43 +01:00
Sean Purcell
2302bfa4bf
Merge branch 'dev' into testcorpus
2017-02-26 22:27:31 -08:00
Yann Collet
bd7fa21deb
added ZSTD_refDDict()
...
Now DDict does no longer depends on DCtx duplication
2017-02-26 14:43:07 -08:00
Yann Collet
8dff956dbf
Added DDict unit test in fuzzer
...
also : slightly modified loadEntropy :
know src must points at start of dictionary
2017-02-25 10:11:15 -08:00
Yann Collet
682ae8a10e
Merge pull request #567 from inikep/dev11
...
faster Travis tests
2017-02-25 06:57:31 -08:00
Sean Purcell
22468b0cc3
Fix some more ARM compile errors
...
https://travis-ci.org/facebook/zstd/jobs/204807461
Can't get them to reproduce the compile errors locally,
tested fix by forcing that test to run on Travis.
2017-02-24 10:55:42 -08:00
Przemyslaw Skibinski
a66b764d79
added tests for gzip
2017-02-24 16:09:17 +01:00
Przemyslaw Skibinski
8740d6bcf5
fix uninitialized value warning
2017-02-24 09:24:55 +01:00
Yann Collet
df9f9296e3
attempt to fix pthreat linking error
...
replacing -lpthread by -pthread
2017-02-24 00:16:05 -08:00
Yann Collet
831b4890ce
minor tests/Makefile refactoring
...
and update of zstd_manual,html
2017-02-23 23:09:10 -08:00
Sean Purcell
d590291d86
Fix -Wsign-compare issues in decodecorpus.c
...
https://travis-ci.org/facebook/zstd/jobs/204423280
2017-02-23 16:11:08 -08:00
Yann Collet
7e224ea03e
Merge pull request #562 from iburinoc/testcorpus
...
Create a tool that generates random, valid, Zstd frames for decoder testing
2017-02-23 15:19:36 -08:00
Sean Purcell
3cd8d50c34
Update CLI and link from educational decoder
2017-02-23 13:06:50 -08:00
Sean Purcell
485ca8c352
Update tests/README.md
2017-02-23 10:27:00 -08:00
Sean Purcell
f119b62055
Create a tool that generates random, valid, Zstd frames for decoder testing
...
Note: Does not handle dictionaries currently
2017-02-22 16:08:34 -08:00
Sean Purcell
9050e1925e
Change name to to findFrameCompressedSize and add skippable support
2017-02-22 12:12:34 -08:00
Przemyslaw Skibinski
337ec875b6
minor tweaks
2017-02-22 10:31:30 +01:00
Przemyslaw Skibinski
3d836bfd18
travis.yml: fix versionsTest target
2017-02-22 09:36:42 +01:00
Przemyslaw Skibinski
346ce32ade
legacy.c: fix memory leaks
2017-02-21 20:10:21 +01:00
Przemyslaw Skibinski
684858e7b7
fix memory leaks
2017-02-21 18:17:24 +01:00
Yann Collet
f2da1b1f22
Merge pull request #550 from iburinoc/matchoverlenwrite
...
execSequence copies up to 2*WILDCOPY_OVERLENGTH extra
2017-02-16 18:14:47 -08:00
Yann Collet
ff176d3208
Merge pull request #548 from inikep/gz_compress
...
Circle CI tests
2017-02-16 14:57:59 -08:00
Sean Purcell
0ed3901b05
Update overlength match test case
2017-02-16 13:36:57 -08:00
Sean Purcell
887eaa9e21
Fix wildcopy overwriting data still in window
2017-02-15 16:43:45 -08:00
Przemyslaw Skibinski
9b5a1e9d97
added circle.yml
2017-02-14 20:06:41 +01:00
Nick Terrell
74b81ada25
Don't run test-pool with QEMU
...
> make test -n
...
./pool
> make test -n QEMU_SYS=valgrind
...
./legacy
# ./pool not run
2017-02-14 10:08:18 -08:00
Sean Purcell
5069b6c2c3
Merge branch 'dev' into multiframe
2017-02-10 10:08:55 -08:00
Yann Collet
a28c34cb7a
Merge pull request #538 from iburinoc/errorstring
...
Fix ZSTD_getErrorString and add tests
2017-02-10 03:59:56 -08:00
Sean Purcell
84b37cc1f1
Fix failing unit test
2017-02-09 12:27:39 -08:00
Sean Purcell
478d7174e5
Merge branch 'dev' into multiframe
2017-02-09 11:54:22 -08:00
Sean Purcell
2db7249265
Make pledgedSrcSize meaning clear for other functions
...
- Added tests
- Moved new size functions to static link only
2017-02-09 11:49:58 -08:00
Przemyslaw Skibinski
80c1e04c33
Merge branch 'dev' into dev11
2017-02-09 09:42:16 +01:00
Sean Purcell
e0b3265e87
Fix ZSTD_getErrorString and add tests
2017-02-08 17:28:49 -08:00
Sean Purcell
f07ddf88e8
Test multiframe legacy decoding with simple and streaming APIs
2017-02-08 15:13:20 -08:00
Sean Purcell
ba2ad9f25c
ZSTD_decompress now handles multiple frames
2017-02-08 14:50:10 -08:00
Sean Purcell
4e709712e1
Decompressed size functions now handle multiframes and distinguish cases
...
- Add ZSTD_findDecompressedSize
- Traverses multiple frames to find total output size
- Add ZSTD_getFrameContentSize
- Gets the decompressed size of a single frame by reading header
- Deprecate ZSTD_getDecompressedSize
2017-02-08 14:50:10 -08:00
Nick Terrell
b5e46b1255
Remove test-longmatch from test target and only run it once
2017-02-08 12:00:21 -08:00
Przemyslaw Skibinski
4b4f8c2d71
turn off test-pool for qemu-ppc64-static
2017-02-08 13:58:04 +01:00
Yann Collet
48bed91606
Merge pull request #527 from facebook/zstdmt
...
zstdmt refinements
2017-01-31 16:36:46 -08:00
Yann Collet
92c98a5b21
zstreamtest uses random section sizes for fuzzing
2017-01-30 12:50:31 -08:00
Yann Collet
cd23dd24af
zstreamtest uses random overlapLog for fuzzing
2017-01-30 12:46:35 -08:00
Yann Collet
64bf8ffce6
report @terrelln patch to ST fuzzer tests
2017-01-27 17:25:07 -08:00
Nick Terrell
d98bf49224
Fix segfault in zstreamtest MT
...
It was reading beyond the end of the input buffer because no errors were
detected. Once that was fixed, it wasn't making forward progress because
no errors were detected and it was waiting for input.
2017-01-27 15:42:36 -08:00
Yann Collet
717c65d690
Merge pull request #519 from inikep/dev11
...
Dev11
2017-01-26 14:23:44 -08:00
Yann Collet
8dafb1acf5
CLI : automatically set overlap size to max (windowSize) for max compression level
2017-01-25 17:01:13 -08:00
Yann Collet
06e7697f96
added test of new parameter ZSTD_p_forceWindow
2017-01-25 16:39:03 -08:00
Yann Collet
bb0027405a
fixed zstdmt corruption issue when enabling overlapped sections
...
see Asana board for detailed explanation on why and how to fix it
2017-01-25 16:25:38 -08:00
Przemyslaw Skibinski
3bb010a667
.travis.yml: optimized order of short tests
2017-01-25 11:19:35 +01:00
Yann Collet
bd6bc22612
playtest.sh : changed sdiff into $DIFF
2017-01-22 15:54:14 -08:00
Yann Collet
317604e0ad
fixed : compilation of zstreamtest in dll mode
2017-01-20 17:18:41 -08:00
Yann Collet
d7e3cb58c5
Resolved merge conflict dev+zstdmt
2017-01-20 16:44:50 -08:00
Yann Collet
19d670ba9d
Added ZSTDMT_initCStream_advanced() variant
...
Correctly compress with custom params and dictionary
Added relevant fuzzer test in zstreamtest
Also :
new macro ZSTDMT_SECTION_LOGSIZE_MIN, which sets a minimum size for a full job
(note : a flush() command can still generate a partial job anytime)
2017-01-19 15:32:07 -08:00
Yann Collet
0f984d94c4
changed MT enabling macro to ZSTD_MULTITHREAD
2017-01-19 14:05:07 -08:00
Yann Collet
f22adae984
fixed minor warning (unused variable) in fuzzer
2017-01-19 13:46:30 -08:00
Yann Collet
736788f8e8
added streaming fuzzer tests for MT API
...
Also : fixed corner case, where nb of jobs completed becomes > jobQueueSize
which is possible when many flushes are issued
while there is not enough dst buffer to flush completed ones.
2017-01-19 12:15:29 -08:00
Przemyslaw Skibinski
8a0bc30a2d
Merge remote-tracking branch 'refs/remotes/facebook/dev' into dev11
2017-01-17 13:02:29 +01:00
Przemyslaw Skibinski
d72f4b6b7a
added "Makefile is validated"
2017-01-17 12:40:06 +01:00
Yann Collet
33fce03045
added test checking dictID when using ZSTD_initCStream_usingCDict()
...
It shows that dictID is not properly added into frame header
2017-01-16 19:46:22 -08:00
Sean Purcell
c44c4d5223
Fix missing 'OK' logging on fuzzer testcase
2017-01-12 09:38:33 -08:00
Sean Purcell
834ab50fa3
Fixed decompress_usingDict not propagating corrupted dictionary error
2017-01-11 17:31:34 -08:00
Nick Terrell
a8b4fe0481
Add COVER dictionary builder to fuzzer unit tests
2017-01-02 18:45:19 -08:00
Nick Terrell
3a1fefcf00
Simplify COVER parameters
2017-01-02 17:51:38 -08:00
Nick Terrell
cbb3ce376b
Add cover cli to playtests
2017-01-02 14:43:11 -08:00
Nick Terrell
5ca0fd2045
Shorten thread pool tests
2016-12-31 22:39:32 -05:00
Nick Terrell
d132433534
Switch thread pool test to threading.h
2016-12-31 19:10:13 -05:00
Nick Terrell
9c499648e3
Add thread pool tests
2016-12-29 23:41:03 -08:00
Yann Collet
c07d2e3a31
Merge pull request #499 from inikep/dev11
...
improved *BSD and Solaris compatibility
2016-12-23 21:32:03 +01:00
Nick Terrell
78a0072d5a
Fix failing test due to deprecation warning
2016-12-22 17:36:16 -08:00
Przemyslaw Skibinski
5f5a902453
"make test" is now compatible with Solaris
2016-12-22 18:05:07 +01:00
Yann Collet
795d95309f
Merge pull request #493 from inikep/fullbench
...
Fullbench extDict variant
2016-12-21 15:12:06 +01:00
Nick Terrell
9d08597364
Add test for invalid offset rep codes
2016-12-20 11:13:45 -08:00
Przemyslaw Skibinski
4beb51f17c
tests of ZSTD_compressContinue_extDict
2016-12-20 10:17:21 +01:00
Yann Collet
d564faa3c6
fix : ZSTD_initCStream_srcSize() correctly set srcSize in frame header
2016-12-18 21:39:15 +01:00
Yann Collet
31ff2a23be
fix Travis long test list;
...
added zbufftest-dll
2016-12-17 19:10:10 +01:00
Yann Collet
d46ecb58a5
added dll compilation tests
2016-12-17 16:28:12 +01:00
Nick Terrell
61e62c014f
Test that all API symbols are exported
2016-12-16 13:29:23 -08:00
Yann Collet
7d5e344ce5
Merge pull request #480 from inikep/dev11
...
advanced mode where each parameter can be selected on the command line
2016-12-15 22:27:50 +01:00
Przemyslaw Skibinski
f9a56668a6
improved playTests.sh (3
2016-12-14 18:43:06 +01:00
Przemyslaw Skibinski
24a4236111
improved playTests.sh (2)
2016-12-14 18:07:31 +01:00
Przemyslaw Skibinski
ab5ed6fa7f
improved playTests.sh
2016-12-14 17:10:38 +01:00
Przemyslaw Skibinski
9b4fa0ddf7
playTests.sh: added Advanced compression parameters
2016-12-14 16:50:00 +01:00
Yann Collet
e795c8a5f6
Added ZSTD_initCStream_srcSize().
...
Added relevant test cases in zstreamtest
2016-12-13 17:00:14 +01:00
Dimitry Andric
12df6da83b
Fix running test suite on FreeBSD
...
* Remove last bashism from tests/playTests.sh
* Use gmd5sum from the sysutils/coreutils port
2016-12-12 19:22:47 +01:00
Yann Collet
c261f71f6a
minor variation of rescale fix
2016-12-12 00:25:07 +01:00
Nick Terrell
b547d212a1
Fix longmatch test build errors.
2016-12-10 23:17:36 -08:00
Nick Terrell
5cc85cf183
Switch uint64_t to U64
2016-12-10 19:31:55 -08:00
Nick Terrell
0acae734f1
Add exposing test case
2016-12-10 19:12:13 -08:00
Yann Collet
94d1a93d28
changed environment variable comparison to sh compatible
2016-12-06 12:02:56 -08:00
Yann Collet
f586bdfe23
fixed fuzzer test
2016-12-06 06:11:46 +01:00
Yann Collet
825dffbc43
moved zbuff source files into lib/deprecated
2016-12-05 19:28:19 -08:00
Yann Collet
e7a41a5955
added : dictID retrieval functions.
...
added : unit tests for dictID retrieval functions
2016-12-05 16:21:06 -08:00
Przemyslaw Skibinski
7c6bbc3298
updated FIO_passThrough
2016-12-05 18:31:14 +01:00
Przemyslaw Skibinski
6b508b1770
updated test-gzstd
2016-12-05 18:02:40 +01:00
Yann Collet
9ffbeea875
API : changed : streaming decompression : implicit reset on starting new frames
2016-12-02 18:37:38 -08:00
Yann Collet
743b33f57e
fix zstdcat
2016-12-02 15:18:57 -08:00
Przemyslaw Skibinski
0efaf7e7b1
added test-gzstd
2016-11-30 15:20:24 +01:00
Yann Collet
4f5350f610
long matches support overflow
2016-11-29 13:12:24 -08:00
Przemyslaw Skibinski
cc3887085f
updated build\README.md
2016-11-21 13:58:58 +01:00
Przemyslaw Skibinski
8bb86e330b
create DLL with Windows
2016-11-21 12:51:01 +01:00
Yann Collet
0d761dbe95
Merge pull request #453 from inikep/dev11
...
fullbench-dll
2016-11-16 15:45:30 -08:00
Yann Collet
52afb3993e
zbuff API now generates deprecation warnings
2016-11-16 08:50:54 -08:00
Przemyslaw Skibinski
811b34d962
fix Visual Studio warnings
2016-11-15 19:02:39 +01:00
Przemyslaw Skibinski
179555c1d1
working fullbench-dll
2016-11-15 18:05:46 +01:00
Przemyslaw Skibinski
eb977a42ef
"file" moved to tests/Makefile
2016-11-14 17:26:58 +01:00
Przemyslaw Skibinski
e579ab5faa
introduced QEMU_SYS
2016-11-14 12:57:05 +01:00
Przemyslaw Skibinski
9adf7bfd8a
fixed MinGW compilation (2)
2016-11-03 15:38:13 +01:00
Yann Collet
861cd06ded
fix test-zstd-nolegacy
2016-11-03 01:11:56 -07:00
Yann Collet
4c0b44f8ce
minor display improvement in fuzzer when nb of tests is very large
2016-11-01 11:13:22 -07:00
Yann Collet
589f011761
changed ZBUFF_* by ZSTD_*Stream() within fullbench,
...
in anticipation of future deprecation of ZBUFF_*.
2016-10-28 15:17:38 -07:00
Yann Collet
b9550d6d43
fixed benchmark mode typo .
...
added benchmark mode tests
2016-10-28 14:43:24 -07:00
Przemyslaw Skibinski
81c334b024
test-zstd-speed.py: default timeout changed to 1800 seconds
2016-10-28 20:40:21 +02:00
Przemyslaw Skibinski
53e7f5c2e4
test-zstd-speed.py: converted to python3 and added "--timeout"
2016-10-28 19:24:16 +02:00
Yann Collet
335ad5d4d4
added ZSTD_initDStream_usingDDict() .
...
slightly optimized ZSTD_initDStream() when no dictionary .
fixed ZSTD_sizeof_CStream() .
2016-10-25 17:47:02 -07:00
Yann Collet
9516234e67
first sketch for ZSTD_initCStream_usingCDict()
2016-10-25 16:19:52 -07:00
Przemyslaw Skibinski
5c5f01f3da
added ZSTD_btopt2 strategy
2016-10-25 12:25:07 +02:00
Yann Collet
d7b120ab5c
added long commands --memory= and --memlimit-decompress=
2016-10-14 14:22:32 -07:00
Yann Collet
1122349ac2
added long comment --memlimit=
2016-10-14 14:07:11 -07:00
Yann Collet
d4cda27b63
new command -M#, to limit memory usage during decompression ( #403 )
2016-10-14 13:32:20 -07:00
Yann Collet
a17fd7312a
changed error_public.h into zstd_errors.h
2016-10-11 16:41:09 -07:00
Nick Terrell
3e82f2b61a
Remove references to GPLv2 license
...
License headers added to Makefiles were taken from `zstd/Makefile`.
2016-10-11 15:28:40 -07:00
Yann Collet
cf409a7e2a
fixed : init*_advanced() followed by reset() with different pledgedSrcSiz
2016-09-26 16:41:05 +02:00
Yann Collet
2f2639438a
zstreamtest can fuzztest pledgedSrcSize
2016-09-26 14:06:08 +02:00
Yann Collet
58d5dfea54
zstreamtest uses ZSTD_reset?Stream
2016-09-25 01:34:03 +02:00
Yann Collet
97b378a6f8
Streaming : dictionary compression on multiple files / segments can correctly provide srcSize into header (when provided) using pledgedSrcSize.
2016-09-21 17:20:19 +02:00
Yann Collet
714464f05d
fixed : cli : forgotten mandatory argument
2016-09-21 16:05:03 +02:00
Yann Collet
27b5ac666e
Implemented "command must be followed by argument" protection
...
suggested by @terrelln (#375 )
2016-09-21 14:31:22 +02:00
inikep
3e70cf8036
Merge remote-tracking branch 'refs/remotes/facebook/dev' into dev
2016-09-15 20:41:40 +02:00
inikep
dd8905b351
test-zstd-speed.py: better description of options
2016-09-15 20:41:37 +02:00
inikep
ed0ea8d271
test-zstd-speed.py: added "-D dictName"
2016-09-15 20:31:29 +02:00
inikep
d28afac4f8
test-zstd-speed.py: added support for directories
2016-09-15 19:56:04 +02:00
Yann Collet
55f276949c
removed option unsupported by travis
2016-09-15 17:23:15 +02:00
Yann Collet
3e47dbcc8c
fixed memory leak
2016-09-15 17:00:02 +02:00
Yann Collet
3ecbe6a37c
fileio uses ZSTD_resetDStream()
2016-09-14 17:26:59 +02:00
Yann Collet
64deef3bee
Fixed srcSize=1
2016-09-14 00:16:07 +02:00
Yann Collet
0be21d790a
fixed fullbench
2016-09-13 17:33:47 +02:00
inikep
0dad121a1a
test-zstd-speed.py: compiler version and MD5 in logs
2016-09-12 14:17:47 +02:00
Yann Collet
b3060f7a9e
changed streaming decoder behavior : now, when all compressed frame is consumed, it means decompression is completed, with regenerated data fully flushed.
2016-09-09 16:44:16 +02:00
Yann Collet
12083a45d4
more context-reuse tests
2016-09-06 15:01:51 +02:00
Yann Collet
a7737f6a60
improved compression on small files when using same parameters
2016-09-06 09:44:59 +02:00
Yann Collet
33a0465a51
fixed a few links
2016-09-02 22:11:49 -07:00
Yann Collet
2b26ad1947
removed timeb.h ( #319 )
2016-09-02 15:34:41 -07:00
Yann Collet
5153a084f3
zbufftest only depends on standard C time.h
2016-09-01 18:11:12 -07:00
Yann Collet
ef9999f0b9
zstreamtest depends only on standard C time.h
2016-09-01 16:44:48 -07:00
Yann Collet
b2490e975a
changed test to avoid issue #316 (reported by John the Scott)
2016-09-01 15:46:09 -07:00
Yann Collet
c843142ad0
zstd -d writes to stdout when input is stdin
2016-09-01 15:05:57 -07:00
Yann Collet
4ded9e591c
added boilerplate
2016-08-30 11:06:28 -07:00
Yann Collet
09c3c8e885
Merge pull request #307 from inikep/dev08
...
updated README.md
2016-08-29 16:32:33 -07:00
inikep
6416b0d705
updated README.md
2016-08-29 13:04:26 +02:00
Yann Collet
dea67a66ab
backward compatibility versions tests start from v0.4.0
2016-08-28 16:56:17 -07:00
Yann Collet
9097f7b156
fixed versionsTest
2016-08-28 16:25:56 -07:00
Yann Collet
4b7b9fca32
better clean
2016-08-28 10:14:27 -07:00
Yann Collet
9a021c1aae
fixed some minor clang warnings
2016-08-26 09:05:06 +02:00
Yann Collet
bb93d77ab8
reinforced fix for huge files
2016-08-25 22:22:50 +02:00
Yann Collet
bb8558164e
fixed welcome message
2016-08-25 19:11:11 +02:00
Yann Collet
94376acfb0
fixed test on CentOS7
2016-08-25 19:09:21 +02:00
Yann Collet
baf7ecbdfd
Merge pull request #302 from inikep/Documentation
...
improved documentation
2016-08-25 17:00:33 +02:00
Yann Collet
24a738c668
removed TRAVIS_OS_NAME
2016-08-25 15:15:06 +02:00
inikep
637d33566d
minor README.md corrections
2016-08-25 10:42:49 +02:00
inikep
ab2f7708c1
created programs\README.md
2016-08-25 10:07:20 +02:00
inikep
7f18c6e5ef
improved tests/README.md
2016-08-25 08:47:18 +02:00
inikep
a3a47ec4d0
Merge remote-tracking branch 'refs/remotes/Cyan4973/dev' into Other
2016-08-24 21:25:49 +02:00
inikep
7bcdbcf51d
Merge remote-tracking branch 'refs/remotes/Cyan4973/dev' into Other
2016-08-24 17:09:19 +02:00
Yann Collet
17e482efdd
added ZSTD_setDStreamParameter()
2016-08-23 16:58:10 +02:00
inikep
b62e696992
fixed typo in test-zstd-speed.py
2016-08-23 13:54:37 +02:00
Yann Collet
70e3b31306
fixed playtests on os-x
2016-08-23 01:18:06 +02:00
Yann Collet
cb3276329a
added sizeof CStream and DStream
2016-08-23 00:31:59 +02:00
Yann Collet
da3fbcb302
Added ZDICT_getDictID()
2016-08-19 14:23:58 +02:00
inikep
b6514d2496
improved .gitignore
2016-08-18 16:53:29 +02:00
inikep
b7d3449d5d
playTests.sh working with tests/
2016-08-18 15:13:41 +02:00
inikep
6ca9b853a1
cmake project: fixed include directories
2016-08-18 14:42:28 +02:00
inikep
63e335704e
updated scripts +x permissions
2016-08-18 14:04:57 +02:00
inikep
2d5eb2beb9
updated .travis.yml and appveyor.yml for tests/
2016-08-18 13:53:26 +02:00
inikep
a1c8115df5
improved tests\Makefile
2016-08-18 13:35:36 +02:00
inikep
2868d565e4
test-related files moved to tests/
2016-08-18 13:18:11 +02:00
inikep
2aeb9325f1
test-zstd-speed.py: added tests for clang and md5 sum of executables
...
added script versioning
2016-08-10 14:14:01 +02:00
Yann Collet
666398e7ed
added : xxhash namespace enforced from xxhash.h.
...
added : xxhash namespace test.
removed : -DXXH_NAMESPACE
2016-08-10 08:16:51 +02:00
Yann Collet
0486bb78c6
fixed : make clean
2016-08-10 07:21:52 +02:00
Yann Collet
8f29e8e0e4
updated NEWS
2016-07-31 02:43:17 +02:00
Yann Collet
8cebfd1d26
fix attempt on test-zstd-speed
2016-07-31 01:59:23 +02:00
inikep
c4b5106f7f
test-zstd-speed.py: force to compile zstd32
2016-07-29 16:11:37 +02:00
inikep
2214e469ee
test-zstd-speed.py: added automated speed test for 32-bit executable
2016-07-26 13:05:01 +02:00
inikep
164ce99763
test-zstd-speed.py: fixed checking of ratio limit
2016-07-25 10:35:53 +02:00
Yann Collet
b752298d1d
fixed 32-bits compilation
2016-07-22 14:37:09 +02:00
Yann Collet
ae68f8ddb3
minor
2016-07-22 14:37:09 +02:00
inikep
a4847eb861
test-zstd-speed.py: generate warning on noticeable compression ratio losses
...
added --ratioLimit option
2016-07-19 17:59:53 +02:00
inikep
8c53ad53b1
test-zstd-speed.py: added --verbose option
2016-07-19 15:49:14 +02:00
inikep
6e5beea715
test-zstd-speed.py: ignore "coverity_scan" and "gh-pages" branches
2016-07-19 13:09:00 +02:00
inikep
82babfc0c6
test-zstd-speed.py: reordering of functions
2016-06-22 20:06:42 +02:00
inikep
116128ce41
test-zstd-speed.py: improved exception handling
2016-06-22 18:12:57 +02:00
inikep
47020670b6
test-zstd-speed.py: added --message in start and finish e-mail
...
- support for ~ in filenames
- result files ending with .txt
2016-06-22 17:11:01 +02:00