]> git.ipfire.org Git - thirdparty/zstd.git/log
thirdparty/zstd.git
7 years agoUpdate BUCK files 902/head
Nick Terrell [Wed, 25 Oct 2017 19:47:57 +0000 (12:47 -0700)] 
Update BUCK files

* Correct XXH namespace (Fixes #901)
* Multithreading always enabled
* GZIP/LZ4/LZMA always enabled
* Legacy support always fully enabled

7 years agofixed zbufftest
Yann Collet [Thu, 19 Oct 2017 21:05:23 +0000 (14:05 -0700)] 
fixed zbufftest

preserve "pledgedSrcSize=0" means "unknown" in init_advanced()

7 years agoMerge pull request #896 from facebook/simplifyio
Yann Collet [Thu, 19 Oct 2017 20:59:59 +0000 (13:59 -0700)] 
Merge pull request #896 from facebook/simplifyio

fileio and bench : ZSTD_NEWAPI as the only code path

7 years agofixed missing zstdmt_compress.h dependency 896/head
Yann Collet [Thu, 19 Oct 2017 19:09:34 +0000 (12:09 -0700)] 
fixed missing zstdmt_compress.h dependency

we lose a warning message :
when a job size is chosen < minimum job size for multithreading,
it is automatically resized to minimum size.

If this information is really useful, it should be present in zstd.h now.

7 years agobench: fixed Visual warning regarding struct initialization
Yann Collet [Thu, 19 Oct 2017 18:56:14 +0000 (11:56 -0700)] 
bench: fixed Visual warning regarding struct initialization

also :
removed dependency on zstdmt_compress.h
removed several unused macros
fileio : small code refactoring to reduce some variable scope

7 years agoIO and bench : ZSTD_NEWAPI is the only remaining code path
Yann Collet [Thu, 19 Oct 2017 00:01:53 +0000 (17:01 -0700)] 
IO and bench : ZSTD_NEWAPI is the only remaining code path

removed the other 2 code paths (single thread, and ZSTDMT ones)
keeping only the new advanced API, for easier code coverage.

It shall also fix identified issue with Visual Studio
which doesn't have ZSTD_NEWAPI defined.

7 years agoMerge pull request #895 from facebook/fileSize_unknown
Yann Collet [Wed, 18 Oct 2017 23:50:17 +0000 (16:50 -0700)] 
Merge pull request #895 from facebook/fileSize_unknown

Distinguish 0-size from size-unavailable

7 years agofixed wrong test to display compression status 895/head
Yann Collet [Wed, 18 Oct 2017 18:41:52 +0000 (11:41 -0700)] 
fixed wrong test to display compression status

7 years agofixed zlib wrapper
Yann Collet [Wed, 18 Oct 2017 18:18:27 +0000 (11:18 -0700)] 
fixed zlib wrapper

it was invoking ZSTD_initCStream_advanced() with pledgedSrcSize==0 and contentSizeFlag=1
which means "empty"
while the intention was to mean "unknown".

The contentSizeFlag==1 is new, it is a consequence of setting this value to 1 by default.

The solution selected here is to pass ZSTD_CONTENTSIZE_UNKNOWN to mean "unknown".
So contentSizeFlag remains set (it wasn't in previous versions).

7 years agoMerge pull request #891 from facebook/contentSize
Yann Collet [Wed, 18 Oct 2017 00:24:51 +0000 (17:24 -0700)] 
Merge pull request #891 from facebook/contentSize

Content size

7 years agoMerge pull request #890 from terrelln/dev
Yann Collet [Tue, 17 Oct 2017 23:34:53 +0000 (16:34 -0700)] 
Merge pull request #890 from terrelln/dev

Don't allow default tables to repeat

7 years agoadded a check to ensure 0-size is present in frame header
Yann Collet [Tue, 17 Oct 2017 23:23:20 +0000 (16:23 -0700)] 
added a check to ensure 0-size is present in frame header

7 years agoUTIL_getFileSize() returns UTIL_FILESIZE_UNKNOWN on failure
Yann Collet [Tue, 17 Oct 2017 23:14:25 +0000 (16:14 -0700)] 
UTIL_getFileSize() returns UTIL_FILESIZE_UNKNOWN on failure

UTIL_getFileSize() used to return zero on failure.
This made it impossible to distinguish a failure from a genuine empty file.
Both cases where coalesced.

Adding UTIL_FILESIZE_UNKNOWN constant has many consequences on user code,
since in many places, the `0` was assumed to mean "error".
This is no longer the case, and the error code must be actively checked.

7 years agoMerge pull request #892 from terrelln/seq-test
Yann Collet [Tue, 17 Oct 2017 21:11:38 +0000 (14:11 -0700)] 
Merge pull request #892 from terrelln/seq-test

[test] Exercise all codes in dictionary tables

7 years agofixed : Visual build compressing stdin with multi-threading enabled fails 891/head
Yann Collet [Tue, 17 Oct 2017 21:07:43 +0000 (14:07 -0700)] 
fixed : Visual build compressing stdin with multi-threading enabled fails

It was multiple reasons stacked :
- Visual use a different code path, because ZSTD_NEWAPI is not defined
- fileio.c sends `0` as `pledgedSrcSize` to mean `ZSTD_CONTENTSIZE_UNKNOWN`  (fixed)
- ZSTDMT_resetCCtx() interpreted `0` as "empty" instead of "unknown" (fixed)

7 years agoMerge pull request #894 from felixhandte/add-check-target
Yann Collet [Tue, 17 Oct 2017 20:51:27 +0000 (13:51 -0700)] 
Merge pull request #894 from felixhandte/add-check-target

Add `check` Target to Makefile

7 years agoAdd `check` Target to Makefile 894/head
W. Felix Handte [Tue, 17 Oct 2017 20:02:39 +0000 (16:02 -0400)] 
Add `check` Target to Makefile

7 years ago[test] Exercise all codes in dictionary tables 892/head
Nick Terrell [Tue, 17 Oct 2017 00:18:43 +0000 (17:18 -0700)] 
[test] Exercise all codes in dictionary tables

7 years agoedited ZSTD_initCStream_advanced() comment
Yann Collet [Mon, 16 Oct 2017 21:06:22 +0000 (14:06 -0700)] 
edited ZSTD_initCStream_advanced() comment

7 years agoplaytest : minor cosmetic changes
Yann Collet [Mon, 16 Oct 2017 21:01:42 +0000 (14:01 -0700)] 
playtest : minor cosmetic changes

7 years agoDon't allow default tables to repeat 890/head
Nick Terrell [Fri, 13 Oct 2017 20:23:57 +0000 (13:23 -0700)] 
Don't allow default tables to repeat

It isn't useful in any case to repeat default tables.
Saves a few bytes on Silesia, since we don't trigger the dictionary
heuristic.

Before: 211988480 => 73651998 bytes
After:  211988480 => 73651721 bytes

7 years agoMerge pull request #889 from terrelln/bug-fix
Yann Collet [Sat, 14 Oct 2017 08:29:42 +0000 (01:29 -0700)] 
Merge pull request #889 from terrelln/bug-fix

Fix invalid use of dictionary offcode table

7 years agodictionary compression use correct file size estimation
Yann Collet [Sat, 14 Oct 2017 08:21:43 +0000 (01:21 -0700)] 
dictionary compression use correct file size estimation

when determining compression parameters
to compress one file only.

For multiple files, it still "bets" that files are going to be small.

There was also a bug recently added in ZSTD_CCtx_loadDictionary_advanced()
making it incapable to use pledgedSrcSize to determine compression parameters.

7 years agochanged API comments to invite using macro ZSTD_CONTENTSIZE_UNKNOWN
Yann Collet [Sat, 14 Oct 2017 07:32:06 +0000 (00:32 -0700)] 
changed API comments to invite using macro ZSTD_CONTENTSIZE_UNKNOWN

to mean "pledgedSrcSize is not known at init time" instead of `0`.
Note that, a few prototypes created and documented with `0` to mean "unknown" still interpret "0" as unknown,
to avoid breaking 3rd party applications which depend on this behavior.
But this value is no longer recommended to mean "unknown".

In some future version, it might be possible to switch "0" to mean "empty",
as is already the case for several prototypes.
The advantage is that pledgedSrcSize field would have same behavior accross entire API,
making it easier to reason about.

Note that all concerned prototypes belong to the "experimental" API section.

srcSize is controlled at end of compression,
so if someone uses "0" to mean "unknown" while it effectively means "empty",
this is immediately caught by the compression function, which generates an error code : ZSTD_ERROR_srcSize_wrong

7 years agominor : zstd -l -v display each file name
Yann Collet [Sat, 14 Oct 2017 07:02:32 +0000 (00:02 -0700)] 
minor : zstd -l -v display each file name

7 years agoadd test for presence of decompressed size field in header
Yann Collet [Sat, 14 Oct 2017 06:47:01 +0000 (23:47 -0700)] 
add test for presence of decompressed size field in header

previous test was "display" only, it wouldn't trigger an error in case of missing header.

7 years agofixed ZSTDMT_initCStream() when contentSizeFlag==1 by default
Yann Collet [Sat, 14 Oct 2017 02:09:30 +0000 (19:09 -0700)] 
fixed ZSTDMT_initCStream() when contentSizeFlag==1 by default

and a wrong test in zstreamtest --mt

7 years agofixed ZSTD_initCStream_advanced() behavior, which depends on contentSizeFlag,
Yann Collet [Sat, 14 Oct 2017 02:01:58 +0000 (19:01 -0700)] 
fixed ZSTD_initCStream_advanced() behavior, which depends on contentSizeFlag,

and a stream fuzzer test, which was incorrect
(relied on 0 being unconditionnally transformed into `ZSTD_CONTENTSIZE_UNKNOWN`)

7 years agocontentSizeFlag enabled by default would also fail for streaming and MT operations
Yann Collet [Sat, 14 Oct 2017 01:32:06 +0000 (18:32 -0700)] 
contentSizeFlag enabled by default would also fail for streaming and MT operations

fixed

7 years agoensure fParams.contentSizeFlag starts at 1
Yann Collet [Sat, 14 Oct 2017 00:39:13 +0000 (17:39 -0700)] 
ensure fParams.contentSizeFlag starts at 1

such default was failing for ZSTD_compressBegin/ZSTD_compressContinue
fixed too

7 years agofileio: content size is enabled by default
Yann Collet [Fri, 13 Oct 2017 23:32:18 +0000 (16:32 -0700)] 
fileio: content size is enabled by default

7 years agoAdd DEBUGLOG() that prints FSE encoding types 889/head
Nick Terrell [Fri, 13 Oct 2017 21:09:17 +0000 (14:09 -0700)] 
Add DEBUGLOG() that prints FSE encoding types

7 years agoFix invalid use of dictionary offcode table
Nick Terrell [Fri, 13 Oct 2017 19:47:00 +0000 (12:47 -0700)] 
Fix invalid use of dictionary offcode table

Fixes #888.

7 years agoMerge branch 'dev' of github.com:facebook/zstd into dev
Yann Collet [Fri, 13 Oct 2017 09:36:40 +0000 (02:36 -0700)] 
Merge branch 'dev' of github.com:facebook/zstd into dev

7 years agominor code formatting
Yann Collet [Fri, 13 Oct 2017 09:36:16 +0000 (02:36 -0700)] 
minor code formatting

added a trace during sequence encoding

7 years agoMerge pull request #885 from terrelln/dev
Yann Collet [Mon, 9 Oct 2017 23:50:09 +0000 (16:50 -0700)] 
Merge pull request #885 from terrelln/dev

[doc] Add images for release notes

7 years ago[doc] Add images for release notes 885/head
Nick Terrell [Mon, 9 Oct 2017 23:44:31 +0000 (16:44 -0700)] 
[doc] Add images for release notes

7 years agofixed a small error in decodeCorpus 883/head
Yann Collet [Sat, 7 Oct 2017 22:19:52 +0000 (15:19 -0700)] 
fixed a small error in decodeCorpus

a compressed block must be strictly smaller than its decompressed size.

7 years agoplaytests: do not use cat on large files
Yann Collet [Fri, 6 Oct 2017 03:21:59 +0000 (20:21 -0700)] 
playtests: do not use cat on large files

some target have limitation making cat incompatible with large files
(namely debian hurd-i386)

7 years agoMerge pull request #882 from terrelln/list
Yann Collet [Wed, 4 Oct 2017 20:39:30 +0000 (13:39 -0700)] 
Merge pull request #882 from terrelln/list

[zstdcli] Add window size to verbose list

7 years ago[zstdcli] Add window size to verbose list 882/head
Nick Terrell [Wed, 4 Oct 2017 19:23:23 +0000 (12:23 -0700)] 
[zstdcli] Add window size to verbose list

```
> zstd --list -v file1 file2 file3
*** zstd command line interface 64-bits v1.3.2, by Yann Collet ***
Window Size: 512.00 KB (524288 B)
Compressed Size: 0.02 KB (19 B)
Check: XXH64

Window Size: 8192.00 KB (8388608 B)
Compressed Size: 0.02 KB (19 B)
Check: XXH64

Window Size: 512.00 KB (524288 B)
Compressed Size: 0.01 KB (15 B)
Check: None

```

7 years agoMerge pull request #881 from terrelln/dev
Yann Collet [Tue, 3 Oct 2017 21:49:07 +0000 (14:49 -0700)] 
Merge pull request #881 from terrelln/dev

Ensure dictionary Huff table can encode any symbol

7 years agoEnsure dictionary Huff table can encode any symbol 881/head
Nick Terrell [Tue, 3 Oct 2017 20:22:13 +0000 (13:22 -0700)] 
Ensure dictionary Huff table can encode any symbol

* Ensure that the dictionary Huffman CTable has maxSymbolValue 255.
* Fix a stack buffer overflow during compression dictionary loading.

7 years agofixed minor conversion warnings for printf
Yann Collet [Tue, 3 Oct 2017 00:28:57 +0000 (17:28 -0700)] 
fixed minor conversion warnings for printf

in debug mode

7 years agoMerge branch 'dev' of github.com:facebook/zstd into dev
Yann Collet [Mon, 2 Oct 2017 23:34:26 +0000 (16:34 -0700)] 
Merge branch 'dev' of github.com:facebook/zstd into dev

7 years agoMerge branch 'srcSize' into dev
Yann Collet [Mon, 2 Oct 2017 23:34:14 +0000 (16:34 -0700)] 
Merge branch 'srcSize' into dev

7 years agobumped version number
Yann Collet [Mon, 2 Oct 2017 23:27:25 +0000 (16:27 -0700)] 
bumped version number

and updated NEWS in anticipation for release

7 years agoMerge pull request #876 from facebook/srcSize
Yann Collet [Mon, 2 Oct 2017 22:02:05 +0000 (15:02 -0700)] 
Merge pull request #876 from facebook/srcSize

CLI Fix : srcSize written in frame headers when compressing multiple files

7 years agoMerge pull request #879 from terrelln/block-size
Yann Collet [Mon, 2 Oct 2017 21:51:47 +0000 (14:51 -0700)] 
Merge pull request #879 from terrelln/block-size

[libzstd] Set CLEVEL_CUSTOM correctly

7 years ago[libzstd] Set CLEVEL_CUSTOM correctly 879/head
Nick Terrell [Mon, 2 Oct 2017 20:43:30 +0000 (13:43 -0700)] 
[libzstd] Set CLEVEL_CUSTOM correctly

In `ZSTD_compressBegin_advanced()`, `ZSTD_parameters` are used to set the
compression parameters, but the level didn't get set to `CLEVEL_CUSTOM`, so
`ZSTD_compressBlock()` used the wrong parameters when checking the source
size.

7 years agoremoved isRegularFile parameter 876/head
Yann Collet [Mon, 2 Oct 2017 19:29:25 +0000 (12:29 -0700)] 
removed isRegularFile parameter

no longer useful : size of src is determined for each file.

7 years agointerruption handler and variable are static
Yann Collet [Mon, 2 Oct 2017 18:39:05 +0000 (11:39 -0700)] 
interruption handler and variable are static

7 years ago/contrib: fixed license header
Yann Collet [Mon, 2 Oct 2017 09:07:17 +0000 (02:07 -0700)] 
/contrib: fixed license header

removed last reference to PATENTS file

7 years agoremoved the statement for all versions of Visual Studio
Yann Collet [Mon, 2 Oct 2017 09:02:16 +0000 (02:02 -0700)] 
removed the statement for all versions of Visual Studio

7 years agosame error in Visual Studio 2012 ...
Yann Collet [Mon, 2 Oct 2017 08:12:40 +0000 (01:12 -0700)] 
same error in Visual Studio 2012 ...

7 years agoThe issue also impacts Visual Studio 2010
Yann Collet [Mon, 2 Oct 2017 07:45:28 +0000 (00:45 -0700)] 
The issue also impacts Visual Studio 2010

7 years agoadded (void)sig to avoid compilers complaining that sig is not used.
Yann Collet [Mon, 2 Oct 2017 07:19:47 +0000 (00:19 -0700)] 
added (void)sig to avoid compilers complaining that sig is not used.

7 years agoconditionnally removed invocation that generates a buggy warning with Visual Studio...
Yann Collet [Mon, 2 Oct 2017 07:02:24 +0000 (00:02 -0700)] 
conditionnally removed invocation that generates a buggy warning with Visual Studio 2008

7 years agoMerge branch 'dev' of github.com:facebook/zstd into dev
Yann Collet [Sun, 1 Oct 2017 22:33:57 +0000 (15:33 -0700)] 
Merge branch 'dev' of github.com:facebook/zstd into dev

7 years agoblindfix for Visual : minor casting issue
Yann Collet [Sun, 1 Oct 2017 22:32:48 +0000 (15:32 -0700)] 
blindfix for Visual : minor casting issue

should not happen since SIGIGN is provided by <signal.h>,
so it should work "ouf of the box"

7 years agoMerge pull request #877 from facebook/compressBound
Yann Collet [Sun, 1 Oct 2017 21:59:38 +0000 (14:59 -0700)] 
Merge pull request #877 from facebook/compressBound

added ZSTD_COMPRESSBOUND() as a macro

7 years agocli: add Ctrl-C support, requested by @mike155 in #854
Yann Collet [Sun, 1 Oct 2017 19:10:26 +0000 (12:10 -0700)] 
cli: add Ctrl-C support, requested by @mike155 in #854

Now, pressing Ctrl-C during compression or decompression
will erase operation artefact (unfinished destination file)
before leaving execution.

7 years agoadded comment on ZSTD_COMPRESSBOUND() 877/head
Yann Collet [Sun, 1 Oct 2017 18:32:38 +0000 (11:32 -0700)] 
added comment on ZSTD_COMPRESSBOUND()

as requested by @terrelln

7 years agoMerge branch 'dev' into compressBound
Yann Collet [Sun, 1 Oct 2017 18:24:02 +0000 (11:24 -0700)] 
Merge branch 'dev' into compressBound

7 years agomacro compatible with scenario where windowSize = 1024 (minimum)
Yann Collet [Sat, 30 Sep 2017 22:34:44 +0000 (15:34 -0700)] 
macro compatible with scenario where windowSize = 1024 (minimum)

7 years agoZSTD_adjustCParams_internal : minor optimization
Yann Collet [Sat, 30 Sep 2017 22:02:40 +0000 (15:02 -0700)] 
ZSTD_adjustCParams_internal : minor optimization

7 years agoMerge pull request #878 from terrelln/adjust
Yann Collet [Sat, 30 Sep 2017 21:52:54 +0000 (14:52 -0700)] 
Merge pull request #878 from terrelln/adjust

Don't `size -= 1` in ZSTD_adjustCParams()

7 years agoDon't `size -= 1` in ZSTD_adjustCParams() 878/head
Nick Terrell [Sat, 30 Sep 2017 21:17:32 +0000 (14:17 -0700)] 
Don't `size -= 1` in ZSTD_adjustCParams()

The window size could end up too small if the source size is 2^n + 1.

Credit to OSS-Fuzz

7 years agofix proper naming on FSE_createCTable() arguments in fse.h
Yann Collet [Sat, 30 Sep 2017 18:08:50 +0000 (11:08 -0700)] 
fix proper naming on FSE_createCTable() arguments in fse.h

7 years agoadded ZSTD_COMPRESSBOUND() as a macro
Yann Collet [Sat, 30 Sep 2017 06:17:41 +0000 (23:17 -0700)] 
added ZSTD_COMPRESSBOUND() as a macro

ZSTD_compressBound() works fine, but is only useful for dynamic allocation.
For static allocation, only a macro can provide the amount during compilation time.

7 years agoMerge pull request #860 from felixhandte/zstd-lz4-support-tests
Yann Collet [Sat, 30 Sep 2017 05:32:54 +0000 (22:32 -0700)] 
Merge pull request #860 from felixhandte/zstd-lz4-support-tests

Add Default LZ4 Support When Available

7 years agocli: fixed wrong initialization in MT mode
Yann Collet [Sat, 30 Sep 2017 05:14:37 +0000 (22:14 -0700)] 
cli: fixed wrong initialization in MT mode

It's not good to mix old and new API
ZSTD_resetCStream() doesn't just set pledgedSrcSize :
it also sets the CCtx for a single thread compression.

Problem is, when 2+ threads are defined in cctx->requestedParams,
ZSTD_compress_generic() will want to start MT compression,
since initialization is supposed to have already happened (thanks to ZSTD_resetCStream())
except that the underlying ZSTDMT_CCtx* object is not created,
resulting in a segfault.

This is an invalid construction
(correct one is to use ZSTD_CCtx_setPledgedSrcSize()).
I haven't found a nice way to mitigate this impact if someone makes the same mistake.

At some point, removing the old API to keep only the new API within fileio.c will limit these risks.

7 years agoMerge pull request #875 from facebook/zstdcat
Yann Collet [Sat, 30 Sep 2017 03:12:25 +0000 (20:12 -0700)] 
Merge pull request #875 from facebook/zstdcat

decode more data before triggering error

7 years agominor fix : no longer use fake srcSize during resource creation
Yann Collet [Sat, 30 Sep 2017 02:40:27 +0000 (19:40 -0700)] 
minor fix : no longer use fake srcSize during resource creation

srcSize is read and provided at each file, not at resource creation.
This used to be useful with older API, because it could not re-adapt parameters between sessions.

At some point, it will be better to remove the old code, and only keep the new_api.
It works fine by now.

7 years agofix : srcSize written in frame header when multiple files compressed
Yann Collet [Sat, 30 Sep 2017 01:05:18 +0000 (18:05 -0700)] 
fix : srcSize written in frame header when multiple files compressed

This information used to be disabled when nbFiles>1.
It was badly initialized later in the code, resulting in an error.

7 years agoMerge pull request #873 from facebook/shorterTests
Yann Collet [Sat, 30 Sep 2017 00:26:46 +0000 (17:26 -0700)] 
Merge pull request #873 from facebook/shorterTests

Leaner tests

7 years agoerase existence of a buffer when it's sent out of the pool 873/head
Yann Collet [Fri, 29 Sep 2017 23:27:47 +0000 (16:27 -0700)] 
erase existence of a buffer when it's sent out of the pool

In some complex scenario,
the buffer would be freed because it's too large,
another buffer would be allocated, but fail,
trigger an error,
and the general buffer pool would then be freed,
where the definition of the already freed buffer would be found
(beyond total index, but still), and freed again, resulting in double-free error.

7 years agodecode more data before triggering error 875/head
Yann Collet [Fri, 29 Sep 2017 22:54:09 +0000 (15:54 -0700)] 
decode more data before triggering error

fixes #874 :
when a frame is not properly terminated by a "last block" signal,
zstd -d used to detect it immediately and error out.
This version will decode and flush the last block, and only then issue an error.

7 years agozstdmt : fixed : buffer dst0 wasn't properly set to null after usage
Yann Collet [Fri, 29 Sep 2017 06:01:31 +0000 (23:01 -0700)] 
zstdmt : fixed : buffer dst0 wasn't properly set to null after usage

now it's possible to unconditionnally invoke ZSTD_releaseAllJobRessources()
wether previous compression was completed correctly or not.

7 years agoremoved ZSTDMT_waitForAllJobsCompleted() from ZSTDMT_freeCCtx()
Yann Collet [Fri, 29 Sep 2017 03:44:22 +0000 (20:44 -0700)] 
removed ZSTDMT_waitForAllJobsCompleted() from ZSTDMT_freeCCtx()

as per @terrelln comment

7 years agomake test : removed zstreamtest unit tests for variants
Yann Collet [Fri, 29 Sep 2017 01:34:38 +0000 (18:34 -0700)] 
make test : removed zstreamtest unit tests for variants

slightly reduced time to create dictionary
at beginning of unit tests

7 years agozstreamtest : run unit tests only during "normal" session
Yann Collet [Fri, 29 Sep 2017 01:27:22 +0000 (18:27 -0700)] 
zstreamtest : run unit tests only during "normal" session

not during --mt, --newapi and --opaque
this avoids running them 4x during `make test`

7 years agoadjustCParams : restored previous behavior
Yann Collet [Fri, 29 Sep 2017 01:14:28 +0000 (18:14 -0700)] 
adjustCParams : restored previous behavior

unknowns srcSize presumed small if there is a dictionary (dictSize>0)
and presumed large otherwise.

7 years agoUpdate documentation to reflect other format support 860/head
W. Felix Handte [Thu, 28 Sep 2017 23:34:39 +0000 (19:34 -0400)] 
Update documentation to reflect other format support

7 years agoAdd CLI Program Name Detection for LZ4
W. Felix Handte [Thu, 28 Sep 2017 23:18:15 +0000 (19:18 -0400)] 
Add CLI Program Name Detection for LZ4

7 years agoAdd basic tests for the lz4 integration
W. Felix Handte [Fri, 22 Sep 2017 00:30:43 +0000 (17:30 -0700)] 
Add basic tests for the lz4 integration

7 years agozstdmt : reduced maximum nb of threads
Yann Collet [Thu, 28 Sep 2017 20:49:12 +0000 (13:49 -0700)] 
zstdmt : reduced maximum nb of threads

to avoid memory address space issues on 32-bits systems
(see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=876416#17)

7 years agoMerge branch 'dev' into shorterTests
Yann Collet [Thu, 28 Sep 2017 19:19:28 +0000 (12:19 -0700)] 
Merge branch 'dev' into shorterTests

fixed conflicts

7 years agozstreamtest --newapi : reduced maximum allocated memory
Yann Collet [Thu, 28 Sep 2017 18:48:45 +0000 (11:48 -0700)] 
zstreamtest --newapi : reduced maximum allocated memory

7 years agozstdmt : move on when not enough memory for a new input buffer
Yann Collet [Thu, 28 Sep 2017 18:46:19 +0000 (11:46 -0700)] 
zstdmt : move on when not enough memory for a new input buffer

just continue operations without input forward progress,
instead of an error that stops current compression session.

7 years agofixed minor Visual conversion warning
Yann Collet [Thu, 28 Sep 2017 09:33:41 +0000 (02:33 -0700)] 
fixed minor Visual conversion warning

7 years agozstdmt : better behavior when freeing a context right after a memory allocation error
Yann Collet [Thu, 28 Sep 2017 09:23:44 +0000 (02:23 -0700)] 
zstdmt : better behavior when freeing a context right after a memory allocation error

wait for all jobs to be completed, so that freeing can happen safely

7 years agominor : rewrite unit tests using CHECK_Z macro
Yann Collet [Thu, 28 Sep 2017 09:14:48 +0000 (02:14 -0700)] 
minor : rewrite unit tests using CHECK_Z macro

7 years agofixed maximum windowLog for zstreamtest --newapi
Yann Collet [Thu, 28 Sep 2017 08:42:06 +0000 (01:42 -0700)] 
fixed maximum windowLog for zstreamtest --newapi

for compatibility with low memory VM

7 years agoensure adjustCParams adjust hLog and cLog even without srcSize
Yann Collet [Thu, 28 Sep 2017 08:25:40 +0000 (01:25 -0700)] 
ensure adjustCParams adjust hLog and cLog even without srcSize

It would previously exit when srcSize is unknown.
But in the case of custom parameters,
hLog and cLog can still be too large in comparison with windowLog.

Reduces maximum memory allocated during zstreamtest --newapi

7 years agoMerge pull request #863 from facebook/newFormats
Yann Collet [Thu, 28 Sep 2017 07:32:16 +0000 (00:32 -0700)] 
Merge pull request #863 from facebook/newFormats

magicless frames (#591)

7 years agoMerge pull request #872 from terrelln/fuzz-minor
Yann Collet [Thu, 28 Sep 2017 02:12:18 +0000 (19:12 -0700)] 
Merge pull request #872 from terrelln/fuzz-minor

[fuzz] Small changes for oss-fuzz integration

7 years ago[fuzz] Small changes for oss-fuzz integration 872/head
Nick Terrell [Thu, 28 Sep 2017 01:23:06 +0000 (18:23 -0700)] 
[fuzz] Small changes for oss-fuzz integration

7 years agoreduced memory usage of zstreamtest --newapi
Yann Collet [Thu, 28 Sep 2017 01:00:15 +0000 (18:00 -0700)] 
reduced memory usage of zstreamtest --newapi

to run on memory-constrained VM

7 years agoreduced zstreamtest --mt memory load
Yann Collet [Thu, 28 Sep 2017 00:27:38 +0000 (17:27 -0700)] 
reduced zstreamtest --mt memory load

adjust compression level, hence memory usage, depending on nb threads
in order to run correctly on memory-starved VM.