Commit Graph

5381 Commits

Author SHA1 Message Date
Codecat
044cd81ce6
Fix wrong conditions 2018-07-14 12:34:03 +02:00
Codecat
1a61bdb9c0
Update zstd.lua 2018-07-14 12:27:42 +02:00
Codecat
23d77c531e
Added premake4/GENie script to contrib folder 2018-07-11 18:02:18 +02:00
Yann Collet
14a92e90fe
Merge pull request #1226 from facebook/noPrefetch
add build macro NO_PREFETCH
2018-07-06 17:56:35 -07:00
Yann Collet
bbd78df59b add build macro NO_PREFETCH
prevent usage of prefetch intrinsic commands
which are not supported by c2rust
(see https://github.com/immunant/c2rust/issues/13)
2018-07-06 17:06:04 -07:00
Yann Collet
1bf0784975
Merge pull request #1206 from GeorgeLu97/FullBenchParam
Fullbench Param
2018-07-02 13:33:53 -07:00
Yann Collet
689bfecd48
Merge pull request #1188 from GeorgeLu97/BenchModule
Bench module
2018-07-02 13:33:27 -07:00
Yann Collet
592e3bd998
Merge pull request #1223 from jon-turney/dev
meson: fix build
2018-07-02 09:14:37 -07:00
Jon Turney
87579d51ee
meson: fix build 2018-07-02 15:06:46 +01:00
Yann Collet
636eaf965e
Merge pull request #1222 from bket/openbsd
2 separate issues found when running zstd's tests on OpenBSD
2018-06-30 11:47:41 -07:00
Björn Ketelaars
527dbf89ec xz/lzma warning causes test to fail
OpenBSD's port building infrastructure is able to build in a privilege
separated mode. It uses a privilege drop model. Regression tests fail in
this mode as xz/lzma is unable to set file group and errors out with:

xz: tmp.xz: Cannot set the file group: Operation not permitted
gmake[1]: *** [Makefile:307: zstd-playTests] Error 2

Actually it is not a xz/lzma error but a warning causing zstd's
regression test to fail. Proposed fix is to have xz/lzma not set the
exit status to 2 even if a condition worth a warning was detected (-Q
flag).
2018-06-30 13:54:34 +02:00
Björn Ketelaars
276988f794 OpenBSD is unable to write to /dev/zero
https://github.com/facebook/zstd/pull/1124 fixes an issue with GNU/Hurd
being unable to write to /dev/zero. Implemented fix is writing to
/dev/random instead.

On OpenBSD a regular user is unable to write to /dev/random because of
permissions set on this device. Result is failing a regression test.

Proposed solution should work for all platforms.
2018-06-30 13:54:34 +02:00
Yann Collet
b5207aadfa make build tests more unforgiving
`-Werror` will ensure they fail if there is the slightest warning.

fix a minor warning specific to `zstd_decompress` variant.
2018-06-29 17:10:56 -07:00
Yann Collet
328ec7e34c fix test-zstd can be run with parallel compilation
fix #1221
2018-06-29 16:52:21 -07:00
Yann Collet
7cecc44de4
Merge pull request #1220 from felixhandte/list-stdin-check
Allow Invoking `zstd --list` When `stdin` is not a `tty`
2018-06-29 14:08:45 -07:00
W. Felix Handte
e22d024e89 Make One Travis CI Run Run Tests With Non-TTY stdin 2018-06-29 16:31:59 -04:00
W. Felix Handte
8e7bdc18d6 Fix Tests of --list Behavior with stdin 2018-06-29 16:31:22 -04:00
W. Felix Handte
712a9fd972 Allow Invoking zstd --list When stdin is not a tty
Also now returns an error when no inputs are given.

New proposed behavior:

```
felix@odin:~/prog/zstd (list-stdin-check)$ ./zstd -l; echo $?
No files given
1
felix@odin:~/prog/zstd (list-stdin-check)$ ./zstd -l Makefile.zst; echo $?
Frames  Skips  Compressed  Uncompressed  Ratio  Check  Filename
     1      0     3.08 KB      10.92 KB  3.544  XXH64  Makefile.zst
0
felix@odin:~/prog/zstd (list-stdin-check)$ ./zstd -l <Makefile.zst; echo $?
zstd: --list does not support reading from standard input
No files given
1
felix@odin:~/prog/zstd (list-stdin-check)$ ./zstd -l Makefile.zst <Makefile.zst; echo $?
Frames  Skips  Compressed  Uncompressed  Ratio  Check  Filename
     1      0     3.08 KB      10.92 KB  3.544  XXH64  Makefile.zst
0
felix@odin:~/prog/zstd (list-stdin-check)$
```
2018-06-29 15:33:44 -04:00
Yann Collet
a2c3a4cd0e
Merge pull request #1214 from jennifermliu/dev
Make --fast=0 fail
2018-06-27 18:53:39 -07:00
Yann Collet
0402fa9186
Merge pull request #1218 from facebook/man
minor man page update
2018-06-27 18:53:12 -07:00
Yann Collet
1fd621ff6d minor man page update
regarding advanced parameter `tlen`
which was recently changed.
`0` in association with `ZSTD_fast` now means "normal fast mode".
2018-06-27 18:49:02 -07:00
Yann Collet
a300206ba4
Merge pull request #1216 from felixhandte/pool-test-time-t-fix
poolTests.c: Fix Interval Var Type
2018-06-27 16:45:38 -07:00
Jennifer Liu
1ab57a7ce1 Redirect failed test result to INTOVOID and update comment about parsing fast command 2018-06-27 16:27:45 -07:00
W. Felix Handte
71d27aaafb Consolidate Fast-Running Travis Jobs 2018-06-27 19:25:39 -04:00
W. Felix Handte
a02ecffb7a Also Run test-pool Target in Travis 2018-06-27 19:24:11 -04:00
W. Felix Handte
c10561c752 poolTests.c: Fix Interval Var Type 2018-06-27 19:15:38 -04:00
Yann Collet
a55ffbb31b removed unused imaged 2018-06-27 16:03:46 -07:00
Yann Collet
c0007893b4 added graph for cdict speed v1.3.5 improvements 2018-06-27 15:58:34 -07:00
Jennifer Liu
aef8486fee Make fast=0 fail 2018-06-27 14:27:27 -07:00
Yann Collet
13138e0fdd
Merge pull request #1213 from facebook/arm64
re-enable arm64 tests
2018-06-27 14:13:16 -07:00
Yann Collet
9c277f137c attempt to re-enable arm64 tests 2018-06-27 13:19:14 -07:00
Yann Collet
121aa2c388
Merge pull request #1211 from facebook/staticAssert
updated DEBUG_STATIC_ASSERT()
2018-06-27 12:19:17 -07:00
Yann Collet
4746c30001
Merge pull request #1212 from facebook/decSpeed
Fix decoding speed
2018-06-27 12:11:45 -07:00
Yann Collet
4489daec09 slightly adjusted default-distribution threshold
depending on strategy.
fast favors faster compression and decompression speeds.
2018-06-26 20:10:45 -07:00
Yann Collet
ff773bfcde zeroise freq table with memset()
improves decoding speed by ~5% in github_users sample set
2018-06-26 17:24:41 -07:00
Yann Collet
5ec2d38870
Merge pull request #1208 from facebook/msys2
minor fixes for MSYS2 compilation
2018-06-26 14:47:29 -07:00
Yann Collet
7b9bbf77c9 switched to a sizeof() version
avoid -Werror=unused-variable issue
2018-06-26 14:08:35 -07:00
Yann Collet
25f3d54c40
Merge pull request #1207 from oleid/cmake_multithread_logic
Correct multithread logic, fixing 'unsupported parameter' error
2018-06-26 12:13:16 -07:00
Yann Collet
f98ec46979 updated DEBUG_STATIC_ASSERT()
following suggestion from #1209
2018-06-26 12:04:59 -07:00
cyan4973
f741fb8fcd minor fixes for MSYS2 compilation 2018-06-26 01:22:45 -07:00
oleid
4e196b2ac3
Correct multithread logic, fixing 'unsupported parameter' error
The original conditions only worked, when both, static and shared variants where built, resulting in an inconsistency between programs and library. The program was built with MT support enabled, the library not. That lead to error 11 'unsupported parameter' when compressing anything with the command line tool.

When changing the AND condition to `ZSTD_MULTITHREAD_SUPPORT AND (ZSTD_BUILD_SHARED OR ZSTD_BUILD_SHARED)`, cmake stopps complaining one of the targets wasn't built. This commit works for any case.
2018-06-26 08:36:41 +02:00
George Lu
ceb4b9e670 New fullbench args
-l# gives some level
--zstd= style parameters also supported
2018-06-25 18:43:55 -07:00
Nick Terrell
b426bcc097
[zstdmt] Fix jobsize bugs (#1205)
[zstdmt] Fix jobsize bugs

* `ZSTDMT_serialState_reset()` should use `targetSectionSize`, not `jobSize` when sizing the seqstore.
  Add an assert that checks that we sized the seqstore using the right job size.
* `ZSTDMT_compressionJob()` should check if `rawSeqStore.seq == NULL`.
* `ZSTDMT_initCStream_internal()` should not adjust `mtctx->params.jobSize` (clamping to MIN/MAX is okay).
2018-06-25 15:21:08 -07:00
George Lu
50d612f4f0 Interleave compression/decompression
Fix Bugs
2018-06-25 15:01:03 -07:00
Yann Collet
3b53bfe4f3
Merge pull request #1200 from felixhandte/zstd-attach-dict-pref
Add CCtx Param Controlling Dict Attachment Behavior
2018-06-25 12:42:31 -07:00
George Lu
d6121ad0e1 Opaque State
And minor fixups (comments/alignment/checks/fix memory leak)
2018-06-25 08:07:43 -07:00
Yann Collet
59bb5f7d58
Merge pull request #1204 from facebook/noForwardProgress
Error code on no forward progress
2018-06-22 20:25:29 -07:00
Yann Collet
31769ce702 error on no forward progress
streaming decoders, such as ZSTD_decompressStream() or ZSTD_decompress_generic(),
may end up making no forward progress,
(aka no byte read from input __and__ no byte written to output),
due to unusual parameters conditions,
such as providing an output buffer already full.

In such case, the caller may be caught in an infinite loop,
calling the streaming decompression function again and again,
without making any progress.

This version detects such situation, and generates an error instead :
ZSTD_error_dstSize_tooSmall when output buffer is full,
ZSTD_error_srcSize_wrong when input buffer is empty.

The detection tolerates a number of attempts before triggering an error,
controlled by ZSTD_NO_FORWARD_PROGRESS_MAX macro constant,
which is set to 16 by default, and can be re-defined at compilation time.
This behavior tolerates potentially existing implementations
where such cases happen sporadically, like once or twice,
which is not dangerous (only infinite loops are),
without generating an error, hence without breaking these implementations.
2018-06-22 17:58:21 -07:00
Yann Collet
3934e010a2
Merge pull request #1197 from facebook/poolResize
Thread Pool resize
2018-06-22 14:20:07 -07:00
Yann Collet
fbd5dfc1b1 changed POOL_resize() return type to int
return is now just en error code.
This guarantee that `ctx` remains valid after POOL_resize().
Gets rid of internal POOL_free() operation.
2018-06-22 12:14:59 -07:00