]> git.ipfire.org Git - thirdparty/zstd.git/log
thirdparty/zstd.git
6 years agoAdd static linking to legacy tests 1547/head
shakeelrao [Fri, 15 Mar 2019 12:13:55 +0000 (05:13 -0700)] 
Add static linking to legacy tests

6 years agoAdd test to validate patch
shakeelrao [Fri, 15 Mar 2019 10:59:03 +0000 (03:59 -0700)] 
Add test to validate patch

6 years agoAdd unit test to validate the error case
shakeelrao [Wed, 13 Mar 2019 08:43:40 +0000 (01:43 -0700)] 
Add unit test to validate the error case

6 years agoFix incorrectly assigned value in ZSTD_errorFrameSizeInfo
shakeelrao [Wed, 13 Mar 2019 08:23:07 +0000 (01:23 -0700)] 
Fix incorrectly assigned value in ZSTD_errorFrameSizeInfo

As documented in `zstd.h`, ZSTD_decompressBound returns `ZSTD_CONTENTSIZE_ERROR`
if an error occurs (not `ZSTD_CONTENTSIZE_UNKNOWN`). This is consistent with
the error checking made in ZSTD_decompressBound, particularly line 545.

6 years agoupdate documentation for decompressBound 1543/head
shakeelrao [Sun, 3 Mar 2019 01:56:10 +0000 (17:56 -0800)] 
update documentation for decompressBound

6 years agoupdate formatting
shakeelrao [Sat, 2 Mar 2019 07:11:15 +0000 (23:11 -0800)] 
update formatting

6 years agoadd missing size content test
shakeelrao [Sat, 2 Mar 2019 05:27:30 +0000 (21:27 -0800)] 
add missing size content test

6 years agoadd stylistic changes
shakeelrao [Sat, 2 Mar 2019 02:29:35 +0000 (18:29 -0800)] 
add stylistic changes

6 years agoupdate missing error case to CONTENTSIZE_ERROR
shakeelrao [Fri, 1 Mar 2019 08:12:16 +0000 (00:12 -0800)] 
update missing error case to CONTENTSIZE_ERROR

6 years agochange nbBlocks to size_t for consistency
shakeelrao [Fri, 1 Mar 2019 08:05:59 +0000 (00:05 -0800)] 
change nbBlocks to size_t for consistency

6 years agochange compressedBound to ULL
shakeelrao [Fri, 1 Mar 2019 08:03:50 +0000 (00:03 -0800)] 
change compressedBound to ULL

6 years agoimplement API-level changes
shakeelrao [Fri, 1 Mar 2019 06:55:18 +0000 (22:55 -0800)] 
implement API-level changes

6 years agoinitialize local vars in decompressBound
shakeelrao [Thu, 28 Feb 2019 11:01:21 +0000 (03:01 -0800)] 
initialize local vars in decompressBound

6 years agoswitch frameBound type to ULL
shakeelrao [Thu, 28 Feb 2019 10:10:17 +0000 (02:10 -0800)] 
switch frameBound type to ULL

6 years agochange return type to ULL
shakeelrao [Thu, 28 Feb 2019 09:52:01 +0000 (01:52 -0800)] 
change return type to ULL

6 years agoRemove autogenerated test file
shakeelrao [Thu, 28 Feb 2019 09:28:29 +0000 (01:28 -0800)] 
Remove autogenerated test file

6 years agoFix decl-after-stmnt build error
shakeelrao [Thu, 28 Feb 2019 09:24:54 +0000 (01:24 -0800)] 
Fix decl-after-stmnt build error

6 years agoProvide an API function to estimate decompressed size.
shakeelrao [Thu, 28 Feb 2019 08:42:49 +0000 (00:42 -0800)] 
Provide an API function to estimate decompressed size.

Introduces a new utility function `ZSTD_findFrameCompressedSize_internal` which
is equivalent to `ZSTD_findFrameCompressSize`, but accepts an additional output
parameter `bound` that computes an upper-bound for the compressed data in the frame.

The new API function is named `ZSTD_decompressBound` to be consistent with
`zstd_compressBound` (the inverse operation). Clients will now be able to compute an upper-bound for
their compressed payloads instead of guessing a large size.

Implements https://github.com/facebook/zstd/issues/1536.

6 years agoMerge pull request #1532 from terrelln/cctx-params
Nick Terrell [Wed, 20 Feb 2019 18:46:46 +0000 (10:46 -0800)] 
Merge pull request #1532 from terrelln/cctx-params

[libzstd] Rename ZSTD_CCtxParam_* to ZSTD_CCtxParams_*

6 years agoUpdate changelog 1532/head
Nick Terrell [Wed, 20 Feb 2019 18:46:14 +0000 (10:46 -0800)] 
Update changelog

6 years agoMerge pull request #1531 from terrelln/appveyorTest
Nick Terrell [Wed, 20 Feb 2019 03:42:07 +0000 (19:42 -0800)] 
Merge pull request #1531 from terrelln/appveyorTest

Fixes for Windows release

6 years ago[libzstd] Rename ZSTD_CCtxParam_* to ZSTD_CCtxParams_*
Nick Terrell [Wed, 20 Feb 2019 01:41:56 +0000 (17:41 -0800)] 
[libzstd] Rename ZSTD_CCtxParam_* to ZSTD_CCtxParams_*

6 years ago[Windows] Don't use a .def file 1531/head
Nick Terrell [Wed, 20 Feb 2019 00:14:02 +0000 (16:14 -0800)] 
[Windows] Don't use a .def file

6 years ago[Windows] Move public headers to include/
Nick Terrell [Tue, 19 Feb 2019 23:49:48 +0000 (15:49 -0800)] 
[Windows] Move public headers to include/

6 years agoMerge pull request #1530 from terrelln/param-order
Nick Terrell [Tue, 19 Feb 2019 22:40:10 +0000 (14:40 -0800)] 
Merge pull request #1530 from terrelln/param-order

Clean up parameter code

6 years ago[fuzzer] Add test cases 1530/head
Nick Terrell [Tue, 19 Feb 2019 19:07:52 +0000 (11:07 -0800)] 
[fuzzer] Add test cases

6 years ago[libzstd] Clean up parameter code
Nick Terrell [Sat, 16 Feb 2019 00:15:20 +0000 (16:15 -0800)] 
[libzstd] Clean up parameter code

* Move all ZSTDMT parameter setting code to ZSTD_CCtxParams_*Parameter().
  ZSTDMT now calls these functions, so we can keep all the logic in the
  same place.
* Clean up `ZSTD_CCtx_setParameter()` to only add extra checks where needed.
* Clean up `ZSTDMT_initJobCCtxParams()` by copying all parameters by default,
  and then zeroing the ones that need to be zeroed. We've missed adding several
  parameters here, and it makes more sense to only have to update it if you
  change something in ZSTDMT.
* Add `ZSTDMT_cParam_clampBounds()` to clamp a parameter into its valid
  range. Use this to keep backwards compatibility when setting ZSTDMT parameters,
  which clamp into the valid range.

6 years agoMerge pull request #1525 from terrelln/enable-huf-flag
Nick Terrell [Sat, 16 Feb 2019 01:21:08 +0000 (20:21 -0500)] 
Merge pull request #1525 from terrelln/enable-huf-flag

Fix optimal parser prices with uncompressed literals

6 years ago[zstdcli] Respect --[no-]compress-literals in benchmark mode 1525/head
Nick Terrell [Fri, 15 Feb 2019 23:24:55 +0000 (15:24 -0800)] 
[zstdcli] Respect --[no-]compress-literals in benchmark mode

6 years ago[zstdcli] Add a flag to control literals compression
Nick Terrell [Fri, 15 Feb 2019 22:15:36 +0000 (14:15 -0800)] 
[zstdcli] Add a flag to control literals compression

6 years agoFix a bug in the compress cctx method
Nick Terrell [Fri, 15 Feb 2019 22:14:32 +0000 (14:14 -0800)] 
Fix a bug in the compress cctx method

6 years ago[libzstd] Handle uncompressed literals
Nick Terrell [Fri, 15 Feb 2019 18:29:03 +0000 (10:29 -0800)] 
[libzstd] Handle uncompressed literals

6 years ago[regression] Test level 19 with uncompressed literals
Nick Terrell [Fri, 15 Feb 2019 18:28:44 +0000 (10:28 -0800)] 
[regression] Test level 19 with uncompressed literals

6 years agoMerge pull request #1522 from terrelln/enable-huf-flag
Nick Terrell [Thu, 14 Feb 2019 00:02:32 +0000 (19:02 -0500)] 
Merge pull request #1522 from terrelln/enable-huf-flag

Add ZSTD_c_literalCompressionMode flag

6 years ago[regression] Test ZSTD_c_literalCompressionMode 1522/head
Nick Terrell [Wed, 13 Feb 2019 23:00:32 +0000 (15:00 -0800)] 
[regression] Test ZSTD_c_literalCompressionMode

Test a positive compression level with uncompressed literals,
and a negative compression level with compressed literals.

I double checked the `results.csv` and made sure that the compressed
sizes make sense.

6 years ago[libzstd] Add ZSTD_c_literalCompressionMode flag
Nick Terrell [Wed, 13 Feb 2019 22:59:22 +0000 (14:59 -0800)] 
[libzstd] Add ZSTD_c_literalCompressionMode flag

It controls the literals compression. It is either
`auto`, `huffman`, or `uncompressed`. It defaults to
`auto`, which is the current behavior.

6 years agoMerge pull request #1519 from terrelln/play-bsd
Nick Terrell [Wed, 13 Feb 2019 21:21:14 +0000 (16:21 -0500)] 
Merge pull request #1519 from terrelln/play-bsd

[cirrus] Run playTests.sh

6 years ago[util] Fix UTIL_isLink() for FreeBSD 1519/head
Nick Terrell [Tue, 12 Feb 2019 01:43:43 +0000 (17:43 -0800)] 
[util] Fix UTIL_isLink() for FreeBSD

6 years ago[cirrus] Run playTests.sh
Nick Terrell [Mon, 11 Feb 2019 18:32:30 +0000 (10:32 -0800)] 
[cirrus] Run playTests.sh

* Pass `-Werror` through `MOREFLAGS`
* Install `coreutils`
* Run `playTests.sh`

6 years agoMerge pull request #1521 from bket/lstat
Nick Terrell [Tue, 12 Feb 2019 01:38:49 +0000 (20:38 -0500)] 
Merge pull request #1521 from bket/lstat

Detection of symbolic links on OpenBSD

6 years agoAdd test 1521/head
Björn Ketelaars [Tue, 12 Feb 2019 00:14:58 +0000 (01:14 +0100)] 
Add test

While here enable symlink test for OpenBSD.

6 years agoMake detection of symbolic links more consistent
Björn Ketelaars [Mon, 11 Feb 2019 23:07:32 +0000 (00:07 +0100)] 
Make detection of symbolic links more consistent

While fixing the detection of symbolic links on OpenBSD I noticed
inconsistent behaviour:

$ echo hello > hello
$ ln -s hello world
$ zstd hello world
Warning : world is a symbolic link, ignoring
hello                :316.67%   (     6 =>     19 bytes, hello.zst
$ ls *.zst
hello.zst
$ zstd world
world                :316.67%   (     6 =>     19 bytes, world.zst)
$ ls *.zst
hello.zst world.zst

6 years agoDetect symbolic links on OpenBSD
Björn Ketelaars [Mon, 11 Feb 2019 23:03:11 +0000 (00:03 +0100)] 
Detect symbolic links on OpenBSD

In #1520 it is described that FreeBSD doesn't detect symbolic links. The
same is true for OpenBSD. This diff fixes this issue for OpenBSD. I'm
guessing that something similar works for FreeBSD as well. However, I'm
unable to test this.

6 years agoMerge pull request #1518 from bket/non-portable
Nick Terrell [Mon, 11 Feb 2019 20:43:03 +0000 (15:43 -0500)] 
Merge pull request #1518 from bket/non-portable

'head -c BYTES' is non portable

6 years ago'head -c BYTES' is non-portable. 1518/head
Björn Ketelaars [Mon, 11 Feb 2019 10:49:35 +0000 (11:49 +0100)] 
'head -c BYTES' is non-portable.

Pull request #1499 added a new test, which uses 'head -c'. The '-c'
option is non-portable (not in POSIX). Instead use 'dd'. Similar issue
has been resolved in the past (#1321).

6 years agoMerge pull request #1516 from terrelln/dict-doc
Nick Terrell [Sat, 2 Feb 2019 00:04:05 +0000 (19:04 -0500)] 
Merge pull request #1516 from terrelln/dict-doc

[zdict] Improve documentation

6 years ago[zdict] Improve documentation 1516/head
Nick Terrell [Fri, 1 Feb 2019 23:19:32 +0000 (15:19 -0800)] 
[zdict] Improve documentation

6 years agoMerge pull request #1515 from thatsafunnyname/patch-1
Nick Terrell [Fri, 1 Feb 2019 18:41:27 +0000 (13:41 -0500)] 
Merge pull request #1515 from thatsafunnyname/patch-1

-Wformat-security not needed with -Wformat=2

6 years ago-Wformat-security not needed with -Wformat=2 1515/head
Peter (Stig) Edwards [Fri, 1 Feb 2019 09:38:49 +0000 (09:38 +0000)] 
-Wformat-security not needed with -Wformat=2

6 years ago-Wformat-security not needed with -Wformat=2
Peter (Stig) Edwards [Fri, 1 Feb 2019 09:31:46 +0000 (09:31 +0000)] 
-Wformat-security not needed with -Wformat=2

6 years ago-Wformat-security not needed with -Wformat=2
Peter (Stig) Edwards [Fri, 1 Feb 2019 09:31:02 +0000 (09:31 +0000)] 
-Wformat-security not needed with -Wformat=2

6 years ago-Wformat-security not needed with -Wformat=2
Peter (Stig) Edwards [Fri, 1 Feb 2019 09:30:31 +0000 (09:30 +0000)] 
-Wformat-security not needed with -Wformat=2

6 years ago-Wformat-security not needed with -Wformat=2
Peter (Stig) Edwards [Fri, 1 Feb 2019 09:29:40 +0000 (09:29 +0000)] 
-Wformat-security not needed with -Wformat=2

6 years ago-Wformat-security not needed with -Wformat=2
Peter (Stig) Edwards [Fri, 1 Feb 2019 09:29:08 +0000 (09:29 +0000)] 
-Wformat-security not needed with -Wformat=2

6 years ago-Wformat-security not needed with -Wformat=2
Peter (Stig) Edwards [Fri, 1 Feb 2019 09:28:41 +0000 (09:28 +0000)] 
-Wformat-security not needed with -Wformat=2

6 years ago-Wformat-security not needed with -Wformat=2
Peter (Stig) Edwards [Fri, 1 Feb 2019 09:27:22 +0000 (09:27 +0000)] 
-Wformat-security not needed with -Wformat=2

6 years agoMerge pull request #1511 from lwhsu/cirrus-ci
Nick Terrell [Wed, 30 Jan 2019 21:53:13 +0000 (16:53 -0500)] 
Merge pull request #1511 from lwhsu/cirrus-ci

Change Cirrus CI's badge to dev branch

6 years agoChange Cirrus CI's badge to dev branch 1511/head
Li-Wen Hsu [Wed, 30 Jan 2019 21:37:04 +0000 (05:37 +0800)] 
Change Cirrus CI's badge to dev branch

6 years agoMerge pull request #1501 from lwhsu/cirrus-ci
Nick Terrell [Wed, 30 Jan 2019 19:15:02 +0000 (14:15 -0500)] 
Merge pull request #1501 from lwhsu/cirrus-ci

Add Cirrus-CI config and build status badge for testing on FreeBSD

6 years agoMerge pull request #1509 from felixhandte/verbose-errors
Yann Collet [Tue, 29 Jan 2019 19:32:24 +0000 (11:32 -0800)] 
Merge pull request #1509 from felixhandte/verbose-errors

Add Debug Information to Error Checks

6 years agoRename FORWARD_ERROR -> FORWARD_IF_ERROR 1509/head
W. Felix Handte [Tue, 29 Jan 2019 17:56:07 +0000 (12:56 -0500)] 
Rename FORWARD_ERROR -> FORWARD_IF_ERROR

6 years agoAdd Comment
W. Felix Handte [Mon, 28 Jan 2019 22:35:31 +0000 (17:35 -0500)] 
Add Comment

6 years agoRemove CHECK_E Macro
W. Felix Handte [Mon, 28 Jan 2019 22:28:14 +0000 (17:28 -0500)] 
Remove CHECK_E Macro

6 years agoReplace Uses of CHECK_E with RETURN_ERROR_IF(*_isError(...
W. Felix Handte [Mon, 28 Jan 2019 22:27:29 +0000 (17:27 -0500)] 
Replace Uses of CHECK_E with RETURN_ERROR_IF(*_isError(...

6 years agoRemove CHECK_F Macro
W. Felix Handte [Mon, 28 Jan 2019 22:16:32 +0000 (17:16 -0500)] 
Remove CHECK_F Macro

6 years agoReplace CHECK_F Uses in zstdmt_compress.c and zstd_ddict.c
W. Felix Handte [Mon, 28 Jan 2019 22:15:57 +0000 (17:15 -0500)] 
Replace CHECK_F Uses in zstdmt_compress.c and zstd_ddict.c

6 years agoMerge pull request #1508 from facebook/fileio_lz4
Yann Collet [Mon, 28 Jan 2019 22:12:27 +0000 (14:12 -0800)] 
Merge pull request #1508 from facebook/fileio_lz4

fixed fileio.c compilation with LZ4 enabled

6 years agoAlso Convert zstd_compress.c
W. Felix Handte [Mon, 28 Jan 2019 22:05:18 +0000 (17:05 -0500)] 
Also Convert zstd_compress.c

6 years agoAdd grep-able String to Error Macros
W. Felix Handte [Mon, 28 Jan 2019 17:50:36 +0000 (12:50 -0500)] 
Add grep-able String to Error Macros

6 years agoSwitch CHECK_F Calls to FORWARD_ERROR
W. Felix Handte [Mon, 28 Jan 2019 17:42:00 +0000 (12:42 -0500)] 
Switch CHECK_F Calls to FORWARD_ERROR

6 years agoSwitch Unconditional RETURN_ERROR_IF Calls to RETURN_ERROR
W. Felix Handte [Mon, 28 Jan 2019 17:35:56 +0000 (12:35 -0500)] 
Switch Unconditional RETURN_ERROR_IF Calls to RETURN_ERROR

6 years agoAdd RETURN_ERROR and FORWARD_ERROR Macros
W. Felix Handte [Mon, 28 Jan 2019 17:34:08 +0000 (12:34 -0500)] 
Add RETURN_ERROR and FORWARD_ERROR Macros

6 years agoConvert Checks in zstd_decompress.c to RETURN_ERROR_IF
W. Felix Handte [Mon, 28 Jan 2019 17:22:52 +0000 (12:22 -0500)] 
Convert Checks in zstd_decompress.c to RETURN_ERROR_IF

6 years agoConvert Checks in zstd_decompress_block.c to RETURN_ERROR_IF
W. Felix Handte [Thu, 6 Dec 2018 01:17:11 +0000 (17:17 -0800)] 
Convert Checks in zstd_decompress_block.c to RETURN_ERROR_IF

6 years agoAdd RETURN_ERROR_IF Macro That Logs Debug Information When Check Fails
W. Felix Handte [Thu, 6 Dec 2018 00:23:18 +0000 (16:23 -0800)] 
Add RETURN_ERROR_IF Macro That Logs Debug Information When Check Fails

6 years agofixed fileio.c compilation with LZ4 enabled 1508/head
Yann Collet [Fri, 25 Jan 2019 22:42:44 +0000 (14:42 -0800)] 
fixed fileio.c compilation with LZ4 enabled

was broken by #1505.

I'm surprised it passed CI tests.
LZ4 tests are part of the "Extended" tests on Travis CI,
which are run on "master" and in "cron" jobs.

Since latest cron job did not failed,
especially this one : https://travis-ci.org/facebook/zstd/jobs/484365040
it suggests cron jobs are no longer using `dev` branch.

To be investigated

6 years agoMerge pull request #1505 from kostmo/remove-global-params
Yann Collet [Thu, 24 Jan 2019 01:11:08 +0000 (17:11 -0800)] 
Merge pull request #1505 from kostmo/remove-global-params

Remove global parameters, pass into public functions instead

6 years agoRemove global parameters, pass into public functions instead 1505/head
Karl Ostmo [Wed, 23 Jan 2019 01:31:13 +0000 (17:31 -0800)] 
Remove global parameters, pass into public functions instead

6 years agoMerge pull request #1504 from facebook/conversionWarnings
Yann Collet [Tue, 22 Jan 2019 18:04:59 +0000 (10:04 -0800)] 
Merge pull request #1504 from facebook/conversionWarnings

Conversion warnings

6 years agoRevert "added clang test in travis" 1504/head
Yann Collet [Sun, 20 Jan 2019 19:13:01 +0000 (11:13 -0800)] 
Revert "added clang test in travis"

This reverts commit 4909a341db27f123d920041dcbd5e4a51aa0b38f.

6 years agoadded clang test in travis
Yann Collet [Sun, 20 Jan 2019 07:44:09 +0000 (23:44 -0800)] 
added clang test in travis

6 years agoupdated clang tests
Yann Collet [Sun, 20 Jan 2019 07:40:41 +0000 (23:40 -0800)] 
updated clang tests

target clangbuild

6 years agofixed minor conversion warnings in examples/
Yann Collet [Sun, 20 Jan 2019 07:38:20 +0000 (23:38 -0800)] 
fixed minor conversion warnings in examples/

6 years agoAdd Cirrus-CI build status badge 1501/head
Li-Wen Hsu [Wed, 16 Jan 2019 19:32:46 +0000 (03:32 +0800)] 
Add Cirrus-CI build status badge

6 years agoAdd Cirrus-CI config for FreeBSD builds
Li-Wen Hsu [Thu, 10 Jan 2019 20:00:27 +0000 (04:00 +0800)] 
Add Cirrus-CI config for FreeBSD builds

6 years agoMerge pull request #1499 from kostmo/detect-truncation
Yann Collet [Wed, 16 Jan 2019 16:56:22 +0000 (08:56 -0800)] 
Merge pull request #1499 from kostmo/detect-truncation

fix --list on truncated files

6 years agoMerge pull request #1500 from lwhsu/unistd
Yann Collet [Wed, 16 Jan 2019 14:21:58 +0000 (06:21 -0800)] 
Merge pull request #1500 from lwhsu/unistd

Include unistd.h on unix platforms for explicit function declaration

6 years agofix --list on truncated files 1499/head
Karl Ostmo [Tue, 15 Jan 2019 01:58:46 +0000 (17:58 -0800)] 
fix --list on truncated files

fseek() doesn't indicate when it moves past the end of a file.
Consequently, if a file is truncated within its last block, the error would't be detected.

This PR adds a test scenario that induces this situation using a small compressed file of only one block in size.
This test is added to tests/playTests.sh

Check is implemented by ensuring that the filehandle position is equal to the filesize upon exit.

6 years agoInclude unistd.h on unix platforms for explicit function declaration 1500/head
Li-Wen Hsu [Tue, 15 Jan 2019 20:55:43 +0000 (04:55 +0800)] 
Include unistd.h on unix platforms for explicit function declaration

6 years agoMerge pull request #1496 from hjmjohnson/cmake-improve-conditional-policies
Yann Collet [Thu, 10 Jan 2019 17:35:21 +0000 (09:35 -0800)] 
Merge pull request #1496 from hjmjohnson/cmake-improve-conditional-policies

ENH: Simplify conditional logic

6 years agoENH: Simplify conditional logic 1496/head
Hans Johnson [Tue, 8 Jan 2019 14:43:04 +0000 (08:43 -0600)] 
ENH: Simplify conditional logic

Based on excellent comment in #1489, the logic
to set cmake policies was simplified.  This will
provide an easier mechanism for maintaining the
conditional logic across many versions of cmake.

6 years agoMerge pull request #1494 from lzutao/fix-leak
Yann Collet [Mon, 7 Jan 2019 01:17:02 +0000 (17:17 -0800)] 
Merge pull request #1494 from lzutao/fix-leak

Fix potential leak of 'outBuff' (reported by scan-build)

6 years agoMerge pull request #1493 from lzutao/fix-#1428
Yann Collet [Sun, 6 Jan 2019 20:37:07 +0000 (12:37 -0800)] 
Merge pull request #1493 from lzutao/fix-#1428

Fix #1428 - zstdgrep returned 1 on both matched and unmatched file

6 years agotests/legagy.c: More fixes 1494/head
Lzu Tao [Sun, 6 Jan 2019 16:42:24 +0000 (23:42 +0700)] 
tests/legagy.c: More fixes

6 years agoFix potential leak of 'outBuff' (reported by scan-build)
Lzu Tao [Sun, 6 Jan 2019 16:28:38 +0000 (23:28 +0700)] 
Fix potential leak of 'outBuff' (reported by scan-build)

6 years agoFix #1428 - zstdgrep returned 1 on match and unmatch 1493/head
Lzu Tao [Sun, 6 Jan 2019 14:22:49 +0000 (21:22 +0700)] 
Fix #1428 - zstdgrep returned 1 on match and unmatch

- Use ZCAT for testing zstdgrep in case of non-install yet
- tests: Add file test for zstdgrep

6 years agoMerge pull request #1491 from cemeyer/freebsd_num_cores
Yann Collet [Sat, 5 Jan 2019 19:48:01 +0000 (11:48 -0800)] 
Merge pull request #1491 from cemeyer/freebsd_num_cores

Fix #1425 - Use physical core count API on FreeBSD

6 years agoFix #1425 - Use physical core count API on FreeBSD 1491/head
Conrad Meyer [Fri, 4 Jan 2019 19:57:12 +0000 (11:57 -0800)] 
Fix #1425 - Use physical core count API on FreeBSD

Similar to Apple, use the native physical core count sysctl, when available.

This is a little repetitive (it's basically the __APPLE__ method plus the
otherBSD method concatenated together) but seemed clearer than any way that
would totally eliminate repetition.

The __FreeBSD_version check only tests the version of the FreeBSD kernel
that zstd is compiled on; importantly, it may be run on a different version.
So the compile-time check is a little naive and needs to be able to fallback
to work on older versions of FreeBSD.  For a similar reason, it may make
sense to simply eliminate the __FreeBSD_version check entirely.  The
tradeoff is that a spurious sysctlbyname would be issued when -T0 is used on
older kernels.

6 years agoMerge pull request #1490 from erikwebb/dev
Yann Collet [Thu, 3 Jan 2019 21:22:07 +0000 (13:22 -0800)] 
Merge pull request #1490 from erikwebb/dev

Check CMake minor version support for VERSION_LESS_EQUAL

6 years agoCheck CMake minor version support for VERSION_LESS_EQUAL 1490/head
Erik Webb [Thu, 3 Jan 2019 20:26:20 +0000 (15:26 -0500)] 
Check CMake minor version support for VERSION_LESS_EQUAL

VERSION_LESS_EQUAL is only available to CMake 3.7+. This adds additional
logic to check that CMAKE_MINOR_VERSION is at least 7.

Fixes #1489