]> git.ipfire.org Git - thirdparty/zstd.git/log
thirdparty/zstd.git
4 years agoReduce stack usage of ZSTD_buildCTable() 2522/head
Nick Terrell [Thu, 4 Mar 2021 18:50:34 +0000 (10:50 -0800)] 
Reduce stack usage of ZSTD_buildCTable()

It is a stack high-point for some compression strategies and has an easy
fix. This moves the normalized count into the entropy workspace.

4 years agoMerge pull request #2516 from senhuang42/seekable_hang_fix
sen [Wed, 3 Mar 2021 22:30:46 +0000 (17:30 -0500)] 
Merge pull request #2516 from senhuang42/seekable_hang_fix

Seekable hang fix

4 years agoFix seekable decompress hanging 2516/head
Sen Huang [Tue, 2 Mar 2021 22:30:03 +0000 (14:30 -0800)] 
Fix seekable decompress hanging

4 years agoZSTD_seekable_decompress() example that hangs.
Martin Lindsay [Mon, 22 Feb 2021 15:57:35 +0000 (10:57 -0500)] 
ZSTD_seekable_decompress() example that hangs.

4 years agoMerge pull request #2514 from felixhandte/v1.4.9 2515/head
Felix Handte [Tue, 2 Mar 2021 16:41:55 +0000 (11:41 -0500)] 
Merge pull request #2514 from felixhandte/v1.4.9

Prepare Codebase for v1.4.9 Release

4 years agoUpdate CHANGELOG 2514/head
W. Felix Handte [Mon, 1 Mar 2021 23:00:10 +0000 (18:00 -0500)] 
Update CHANGELOG

4 years agoDocumentation Rebuild
W. Felix Handte [Mon, 1 Mar 2021 22:57:02 +0000 (17:57 -0500)] 
Documentation Rebuild

4 years agoBump Library Version 1.4.8 -> 1.4.9
W. Felix Handte [Mon, 1 Mar 2021 22:45:30 +0000 (17:45 -0500)] 
Bump Library Version 1.4.8 -> 1.4.9

4 years agoMerge pull request #2513 from felixhandte/fix-2493
Felix Handte [Fri, 26 Feb 2021 23:02:38 +0000 (18:02 -0500)] 
Merge pull request #2513 from felixhandte/fix-2493

Avoid Using `stat -c` on NetBSD

4 years agoMerge pull request #2512 from felixhandte/fix-2509
Felix Handte [Fri, 26 Feb 2021 23:02:18 +0000 (18:02 -0500)] 
Merge pull request #2512 from felixhandte/fix-2509

Detect `..` in Paths Correctly

4 years agoAvoid Using `stat -c` on NetBSD 2513/head
W. Felix Handte [Fri, 26 Feb 2021 18:05:39 +0000 (13:05 -0500)] 
Avoid Using `stat -c` on NetBSD

Addresses #2493. I think. I don't have a NetBSD system to test on.

4 years agoCover These Edge Cases in Tests 2512/head
W. Felix Handte [Fri, 26 Feb 2021 18:01:20 +0000 (13:01 -0500)] 
Cover These Edge Cases in Tests

4 years agoDetect `..` in Paths Correctly
W. Felix Handte [Fri, 26 Feb 2021 17:29:42 +0000 (12:29 -0500)] 
Detect `..` in Paths Correctly

This commit addresses #2509.

4 years agoMerge pull request #2510 from terrelln/regression
Nick Terrell [Thu, 25 Feb 2021 18:55:30 +0000 (10:55 -0800)] 
Merge pull request #2510 from terrelln/regression

[regression] Update results.csv

4 years ago[regression] Update results.csv 2510/head
Nick Terrell [Thu, 25 Feb 2021 03:11:38 +0000 (19:11 -0800)] 
[regression] Update results.csv

Fixes the update from PR #2508. I had accidentally forgotten to rebuild
the library, and the regression test suite isn't hooked up to the new
fancy build system yet.

I've double checked that the results are deterministic.

4 years agoMerge pull request #2492 from niacat/dev
Yann Collet [Thu, 25 Feb 2021 00:38:10 +0000 (16:38 -0800)] 
Merge pull request #2492 from niacat/dev

Use standard md5 tool on NetBSD.

4 years agoMerge pull request #2489 from concatime/cmake-c-lib-programs
Yann Collet [Wed, 24 Feb 2021 23:58:33 +0000 (15:58 -0800)] 
Merge pull request #2489 from concatime/cmake-c-lib-programs

CMake: Enable only C for lib and programs projects

4 years agoMerge pull request #2508 from terrelln/regression
Nick Terrell [Wed, 24 Feb 2021 00:19:33 +0000 (16:19 -0800)] 
Merge pull request #2508 from terrelln/regression

[regression] Update results.csv

4 years ago[regression] Update results.csv 2508/head
Nick Terrell [Tue, 23 Feb 2021 23:15:39 +0000 (15:15 -0800)] 
[regression] Update results.csv

9f327c02fd17a5aad2b24ae06b85d8226add1f93 changed the compression method
for LDM, so the results are slightly different.

I've re-tested LDM on some larger inputs and everything seems fine.
These ratio changes just seem to be noise. There is generally a 0.01%
swing in ratio, sometimes better sometimes worse, but never large.

4 years agoMerge pull request #2507 from facebook/freebsd12_2
Yann Collet [Tue, 23 Feb 2021 22:54:52 +0000 (14:54 -0800)] 
Merge pull request #2507 from facebook/freebsd12_2

update FreeBSD image to latest 12.2

4 years agoMerge pull request #2504 from skitt/stop-using-resetxstream
Yann Collet [Tue, 23 Feb 2021 21:37:17 +0000 (13:37 -0800)] 
Merge pull request #2504 from skitt/stop-using-resetxstream

Stop using deprecated reset?Stream functions

4 years agodisabled icc tests on Github Actions 2507/head
Yann Collet [Tue, 23 Feb 2021 21:25:08 +0000 (13:25 -0800)] 
disabled icc tests on Github Actions

4 years agoStop using deprecated reset?Stream functions 2504/head
Stephen Kitt [Sat, 20 Feb 2021 16:28:19 +0000 (17:28 +0100)] 
Stop using deprecated reset?Stream functions

These are replaced by the corresponding context resets. When
converting resetCStream, CCtx_setPledgedSrcSize isn't called if the
source size is "unknown".

This helps reduce the reliance on "static only" symbols, as well as
reducing the use of deprecated functions.

Signed-off-by: Stephen Kitt <steve@sk2.org>
4 years agoupdate FreeBSD image to latest 12.2
Yann Collet [Tue, 23 Feb 2021 18:40:44 +0000 (10:40 -0800)] 
update FreeBSD image to latest 12.2

4 years agoMerge pull request #2502 from facebook/ubsanfix
Yann Collet [Sat, 20 Feb 2021 19:05:55 +0000 (11:05 -0800)] 
Merge pull request #2502 from facebook/ubsanfix

fix ubsan test errors

4 years agoremoving signed integer overflow exception from ubsan tests 2502/head
Yann Collet [Sat, 20 Feb 2021 00:30:06 +0000 (16:30 -0800)] 
removing signed integer overflow exception from ubsan tests

4 years agoMerge pull request #2503 from terrelln/fuzz-ubsan
Yann Collet [Sat, 20 Feb 2021 00:19:07 +0000 (16:19 -0800)] 
Merge pull request #2503 from terrelln/fuzz-ubsan

[fuzz] Fix compiler detection & update ubsan flags

4 years ago[fuzz] Fix compiler detection & update ubsan flags 2503/head
Nick Terrell [Fri, 19 Feb 2021 21:11:29 +0000 (13:11 -0800)] 
[fuzz] Fix compiler detection & update ubsan flags

* Fix compiler version regex, which was broken for multi-digit
  versions.
* Fix compiler detection for gcc.
* Disable `pointer-overflow` instead of `integer-overflow` for gcc
  versions newer than 8.0.0.

4 years agofix ubsan test errors
Yann Collet [Fri, 19 Feb 2021 18:42:05 +0000 (10:42 -0800)] 
fix ubsan test errors

allows recovering from pointer overflow

4 years agoMerge pull request #2495 from felixhandte/umask
Felix Handte [Wed, 17 Feb 2021 22:03:23 +0000 (17:03 -0500)] 
Merge pull request #2495 from felixhandte/umask

Use umask() to Constrain Created File Permissions

4 years agoUse umask() to Constrain Created File Permissions 2495/head
W. Felix Handte [Thu, 11 Feb 2021 20:50:13 +0000 (15:50 -0500)] 
Use umask() to Constrain Created File Permissions

This commit addresses #2491.

Note that a downside of this solution is that it is global: `umask()` affects
all file creation calls in the process. I believe this is safe since
`fileio.c` functions should only ever be used in the zstd binary, and these
are (almost) the only files ever created by zstd, and AIUI they're only
created in a single thread. So we can get away with messing with global state.

Note that this doesn't change the permissions of files created by `dibio.c`.
I'm not sure what those should be...

4 years agoMerge pull request #2500 from senhuang42/add_cli_newline
Yann Collet [Wed, 17 Feb 2021 18:43:41 +0000 (10:43 -0800)] 
Merge pull request #2500 from senhuang42/add_cli_newline

[easy][cli] Add newline to boundary of --help message of --trace and --[no-]check

4 years agoAdd newline to end of cli help message 2500/head
senhuang42 [Wed, 17 Feb 2021 17:26:38 +0000 (12:26 -0500)] 
Add newline to end of cli help message

4 years agoMerge pull request #2498 from terrelln/old-api-fix
Nick Terrell [Tue, 16 Feb 2021 18:51:25 +0000 (10:51 -0800)] 
Merge pull request #2498 from terrelln/old-api-fix

[bug-fix] Make simple single-pass functions ignore advanced parameters

4 years ago[bug-fix] Make simple single-pass functions ignore advanced parameters 2498/head
Nick Terrell [Sat, 13 Feb 2021 02:52:08 +0000 (18:52 -0800)] 
[bug-fix] Make simple single-pass functions ignore advanced parameters

The simple compression functions are intended to ignore the advanced
parameters, but they were accidentally using them. All the
`ZSTD_parameters` were set correctly, but any extra parameters were
used as-is. E.g. `ZSTD_c_format`.

This PR makes all the simple single-pass functions listed below ignore
the advanced parameters, as intended.

* `ZSTD_compressCCtx()`
* `ZSTD_compress_usingDict()`
* `ZSTD_compress_usingCDict()`
* `ZSTD_compress_advanced()`
* `ZSTD_compress_usingCDict_advanced()`

It also adds a test case that ensures that each of these functions
ignore the advanced parameters.

4 years agoMerge pull request #2497 from terrelln/tracing
Nick Terrell [Sat, 13 Feb 2021 01:34:07 +0000 (17:34 -0800)] 
Merge pull request #2497 from terrelln/tracing

[lib] Set appliedParams.compressionLevel correctly

4 years ago[lib] Set appliedParams.compressionLevel correctly 2497/head
Nick Terrell [Fri, 12 Feb 2021 22:53:07 +0000 (14:53 -0800)] 
[lib] Set appliedParams.compressionLevel correctly

Forward the correct compressionLevel to the appliedParams in all cases.
It was already correct for the advanced API, so only the old single-pass
functions needed to be fixed.

This compression level is unused by the library, but is set so that the
tracing framework can consume it.

4 years agoMerge pull request #2496 from terrelln/tracing
Nick Terrell [Fri, 12 Feb 2021 18:48:30 +0000 (10:48 -0800)] 
Merge pull request #2496 from terrelln/tracing

[trace] Minor fixes found during integration

4 years ago[trace] Minor fixes found during integration 2496/head
Nick Terrell [Fri, 12 Feb 2021 00:20:04 +0000 (16:20 -0800)] 
[trace] Minor fixes found during integration

* Mark `ZSTD_CCtx_getParameter()` as const
* Add `extern "C"` guards to `zstd_trace.h`

4 years agoMerge pull request #2483 from mpu/ldmgear
Yann Collet [Thu, 11 Feb 2021 16:38:23 +0000 (08:38 -0800)] 
Merge pull request #2483 from mpu/ldmgear

New algorithms for the long distance matcher

4 years agoUse standard md5 tool on NetBSD. 2492/head
nia [Thu, 11 Feb 2021 09:50:11 +0000 (10:50 +0100)] 
Use standard md5 tool on NetBSD.

This avoids a GNU coreutils dependency.

-n is used to match the output format of coreutils:
http://man.netbsd.org/md5.1

4 years agorelocate large arrays from the stack to ldmState_t 2483/head
Quentin Carbonneaux [Wed, 10 Feb 2021 15:16:54 +0000 (16:16 +0100)] 
relocate large arrays from the stack to ldmState_t

4 years agoMerge pull request #2490 from terrelln/tracing
Nick Terrell [Tue, 9 Feb 2021 20:16:17 +0000 (12:16 -0800)] 
Merge pull request #2490 from terrelln/tracing

[trace] Keep track of a uint64_t tracing context

4 years ago[trace] Keep track of a uint64_t tracing context 2490/head
Nick Terrell [Tue, 9 Feb 2021 19:37:05 +0000 (11:37 -0800)] 
[trace] Keep track of a uint64_t tracing context

The most common information that you want to track between begin() and
end() is the timestamp of the begin function, so you can measure the
duration of the (de)compression call. Allow the tracing library to put
this information inside the `ZSTD_TraceCtx`, so it doesn't need to keep
a global map in this case. If a single uint64_t is not enough, the
tracing library can return a unique identifier (like the context
pointer) instead, and use it as a key in a map.

This keeps the simple case simple.

4 years agofix some compiler warnings
Quentin Carbonneaux [Mon, 8 Feb 2021 10:43:06 +0000 (11:43 +0100)] 
fix some compiler warnings

4 years agoCMake: Enable only C for lib and programs projects 2489/head
Issam E. Maghni [Mon, 8 Feb 2021 00:38:47 +0000 (19:38 -0500)] 
CMake: Enable only C for lib and programs projects

4 years agoMerge pull request #2482 from terrelln/tracing
Nick Terrell [Sat, 6 Feb 2021 03:19:01 +0000 (19:19 -0800)] 
Merge pull request #2482 from terrelln/tracing

Add (de)compression tracing functionality

4 years agoAdd basic tracing functionality 2482/head
Nick Terrell [Thu, 4 Feb 2021 03:53:00 +0000 (19:53 -0800)] 
Add basic tracing functionality

4 years agoMerge pull request #2488 from terrelln/continuity
Nick Terrell [Sat, 6 Feb 2021 00:08:02 +0000 (16:08 -0800)] 
Merge pull request #2488 from terrelln/continuity

[zstd] Fix NULL pointer addition in ZSTD_checkContinuity()

4 years ago[zstd] Fix NULL pointer addition in ZSTD_checkContinuity() 2488/head
Nick Terrell [Fri, 5 Feb 2021 20:16:10 +0000 (12:16 -0800)] 
[zstd] Fix NULL pointer addition in ZSTD_checkContinuity()

Don't start a new section when `dstSize == 0` to avoid NULL
pointer addition.

4 years agoMerge pull request #2486 from facebook/nogcc6
Yann Collet [Fri, 5 Feb 2021 18:58:21 +0000 (10:58 -0800)] 
Merge pull request #2486 from facebook/nogcc6

minor: removed flackey gcc6 tests from github actions

4 years agoMerge pull request #2487 from facebook/fixcast
Yann Collet [Fri, 5 Feb 2021 18:57:55 +0000 (10:57 -0800)] 
Merge pull request #2487 from facebook/fixcast

fixed minor cast warning

4 years agofixed minor cast warning 2487/head
Yann Collet [Fri, 5 Feb 2021 17:28:08 +0000 (09:28 -0800)] 
fixed minor cast warning

4 years agoremoved flackey gcc6 tests 2486/head
Yann Collet [Fri, 5 Feb 2021 17:19:27 +0000 (09:19 -0800)] 
removed flackey gcc6 tests

from github actions.
replaced by equivalent "current" gcc tests when it makes sense

4 years agodeal safely with short inputs in ZSTD_ldm_generateSequences
Quentin Carbonneaux [Thu, 4 Feb 2021 10:13:41 +0000 (11:13 +0100)] 
deal safely with short inputs in ZSTD_ldm_generateSequences

The fuzzer CI found this bug.

4 years agonew core ldm algorithm
Quentin Carbonneaux [Mon, 11 Jan 2021 16:16:51 +0000 (08:16 -0800)] 
new core ldm algorithm

4 years agoMerge pull request #2464 from mpu/ldmfixes
Nick Terrell [Fri, 22 Jan 2021 17:41:22 +0000 (12:41 -0500)] 
Merge pull request #2464 from mpu/ldmfixes

Simple performance improvements for ldm

4 years agofix a variable name to reflect its nature 2464/head
Quentin Carbonneaux [Fri, 22 Jan 2021 10:24:19 +0000 (02:24 -0800)] 
fix a variable name to reflect its nature

4 years agofix warning and remove one more occurrence of makeEntryAndInsertByTag
Quentin Carbonneaux [Wed, 20 Jan 2021 09:05:29 +0000 (01:05 -0800)] 
fix warning and remove one more occurrence of makeEntryAndInsertByTag

4 years agofix forgotten numTagBits in getTagMask
Quentin Carbonneaux [Mon, 11 Jan 2021 10:41:17 +0000 (02:41 -0800)] 
fix forgotten numTagBits in getTagMask

4 years agoa couple performance improvement changes for ldm
Quentin Carbonneaux [Fri, 8 Jan 2021 08:54:06 +0000 (00:54 -0800)] 
a couple performance improvement changes for ldm

4 years agoMerge pull request #2475 from facebook/parallel_build
Yann Collet [Tue, 19 Jan 2021 18:19:41 +0000 (10:19 -0800)] 
Merge pull request #2475 from facebook/parallel_build

parallel make build on linux

4 years agoparallel make build on linux 2475/head
Yann Collet [Mon, 18 Jan 2021 19:33:03 +0000 (11:33 -0800)] 
parallel make build on linux

fix #2474

4 years agoMerge pull request #2466 from felixhandte/force-stdin-console
Yann Collet [Mon, 18 Jan 2021 19:03:45 +0000 (11:03 -0800)] 
Merge pull request #2466 from felixhandte/force-stdin-console

Allow Input From Console When `-f`/`--force` is Passed

4 years agoMerge pull request #2473 from terrelln/recovery
Nick Terrell [Fri, 15 Jan 2021 20:30:24 +0000 (15:30 -0500)] 
Merge pull request #2473 from terrelln/recovery

[contrib][recovery] Add recovery_directory program

4 years ago[contrib][recovery] Add recovery_directory program 2473/head
Nick Terrell [Fri, 15 Jan 2021 16:41:42 +0000 (08:41 -0800)] 
[contrib][recovery] Add recovery_directory program

This program takes a file with concatenated zstd frames and splits the
file up by frame. E.g. if `dir.zst` has 4 frames:

```
> ./recover_directory dir.zst recovery/file
Recovering 4 files...
Recovered recovery/file0
Recovered recovery/file1
Recovered recovery/file2
Recovered recovery/file3
Complete
```

4 years agoAlso Update Man Page Documentation 2466/head
W. Felix Handte [Mon, 11 Jan 2021 22:55:58 +0000 (17:55 -0500)] 
Also Update Man Page Documentation

4 years agoAllow Input From Console When `--force` is Passed
W. Felix Handte [Mon, 11 Jan 2021 22:53:20 +0000 (17:53 -0500)] 
Allow Input From Console When `--force` is Passed

Also update option flag documentation.

4 years agoMerge pull request #2465 from senhuang42/cformat_2021
sen [Mon, 11 Jan 2021 17:35:34 +0000 (12:35 -0500)] 
Merge pull request #2465 from senhuang42/cformat_2021

[license] Change year to 2021 compression_format.md

4 years agoMerge pull request #2462 from lazka/cmake-fix-pc-escaping
Nick Terrell [Mon, 11 Jan 2021 17:30:13 +0000 (12:30 -0500)] 
Merge pull request #2462 from lazka/cmake-fix-pc-escaping

cmake: use configure_file() for creating the .pc file

4 years agoChange year to 2021 for compression format file 2465/head
senhuang42 [Mon, 11 Jan 2021 13:53:29 +0000 (08:53 -0500)] 
Change year to 2021 for compression format file

4 years agocmake: use configure_file() for creating the .pc file 2462/head
Christoph Reiter [Sat, 9 Jan 2021 08:24:45 +0000 (09:24 +0100)] 
cmake: use configure_file() for creating the .pc file

Escaping in add_custom_target() seems to depend on the shell used in the cmake
generator and using Ninja on Windows, which uses cmd.exe, results in stray backslashes
in the .pc file.

Instead of going through escaping hell just use configure_file() with the existing
libzstd.pc.in file already used by the simple Makefile based build system.

This fixes the .pc file syntax when building zstd with CMake+Ninja+gcc on Windows.

4 years agoFix visibility of symbols in .so (#2441)
yumeyao [Fri, 8 Jan 2021 22:27:31 +0000 (06:27 +0800)] 
Fix visibility of symbols in .so (#2441)

Fix visibility of symbols in .so and add an alias for renamed API

4 years agoMerge pull request #2446 from senhuang42/multiple_ddicts_v3
sen [Fri, 8 Jan 2021 21:49:45 +0000 (16:49 -0500)] 
Merge pull request #2446 from senhuang42/multiple_ddicts_v3

[RFC] Support references to multiple DDicts

4 years agoMerge pull request #2457 from facebook/cli-dll
Yann Collet [Fri, 8 Jan 2021 01:10:13 +0000 (17:10 -0800)] 
Merge pull request #2457 from facebook/cli-dll

zstd CLI can now be linked to libzstd dynamic library

4 years agoMerge pull request #2459 from ThomasWaldmann/fix-typos
Yann Collet [Fri, 8 Jan 2021 00:19:10 +0000 (16:19 -0800)] 
Merge pull request #2459 from ThomasWaldmann/fix-typos

fix typos (work done by Andrea Gelmini)

4 years agoFix Visual and staticanalyze warnings 2446/head
senhuang42 [Thu, 7 Jan 2021 17:13:27 +0000 (12:13 -0500)] 
Fix Visual and staticanalyze warnings

4 years agofixup: lits means literals 2459/head
Thomas Waldmann [Thu, 7 Jan 2021 22:30:42 +0000 (23:30 +0100)] 
fixup: lits means literals

4 years agoAdded library version check 2457/head
Yann Collet [Thu, 7 Jan 2021 18:37:27 +0000 (10:37 -0800)] 
Added library version check

4 years agoMerge branch 'dev' into cli-dll
Yann Collet [Thu, 7 Jan 2021 18:24:09 +0000 (10:24 -0800)] 
Merge branch 'dev' into cli-dll

4 years agoMerge pull request #2455 from facebook/lessTests
Yann Collet [Thu, 7 Jan 2021 18:23:14 +0000 (10:23 -0800)] 
Merge pull request #2455 from facebook/lessTests

removed redundant tests

4 years agofix typos (work done by Andrea Gelmini)
Thomas Waldmann [Thu, 7 Jan 2021 17:47:23 +0000 (18:47 +0100)] 
fix typos (work done by Andrea Gelmini)

4 years agoAllow freestanding lib script regex to detect XXH64(
senhuang42 [Thu, 7 Jan 2021 17:09:46 +0000 (12:09 -0500)] 
Allow freestanding lib script regex to detect XXH64(

4 years agoAdd streaming decompression to unit test
senhuang42 [Thu, 7 Jan 2021 17:07:35 +0000 (12:07 -0500)] 
Add streaming decompression to unit test

4 years agoAddress comments, clean up interface/internals
senhuang42 [Thu, 7 Jan 2021 16:53:35 +0000 (11:53 -0500)] 
Address comments, clean up interface/internals

4 years agoAdd unit test, improve documentation
senhuang42 [Mon, 28 Dec 2020 21:43:04 +0000 (16:43 -0500)] 
Add unit test, improve documentation

4 years agoUse XXHash for hash function, create a sensible public interface
senhuang42 [Mon, 28 Dec 2020 18:14:58 +0000 (13:14 -0500)] 
Use XXHash for hash function, create a sensible public interface

4 years agoAdd debuglog statements
senhuang42 [Mon, 28 Dec 2020 16:59:58 +0000 (11:59 -0500)] 
Add debuglog statements

4 years agoReference requested dict ID at decompression time
senhuang42 [Mon, 28 Dec 2020 15:40:29 +0000 (10:40 -0500)] 
Reference requested dict ID at decompression time

4 years agoAllocate memory for DDict hash set when parameter is set
senhuang42 [Wed, 23 Dec 2020 21:33:57 +0000 (16:33 -0500)] 
Allocate memory for DDict hash set when parameter is set

4 years agoAdd parameter to control multiple DDicts
senhuang42 [Wed, 23 Dec 2020 21:09:31 +0000 (16:09 -0500)] 
Add parameter to control multiple DDicts

4 years agoImplement hashset for dictIDs
senhuang42 [Wed, 23 Dec 2020 20:46:22 +0000 (15:46 -0500)] 
Implement hashset for dictIDs

4 years agoThe CLI can be linked to libzstd dynamic library
Yann Collet [Thu, 7 Jan 2021 01:54:07 +0000 (17:54 -0800)] 
The CLI can be linked to libzstd dynamic library

invoking target zstd-dll

4 years agoremoved CLI dependency to legacy unsafe function 2456/head
Yann Collet [Thu, 7 Jan 2021 00:19:42 +0000 (16:19 -0800)] 
removed CLI dependency to legacy unsafe function

makint the CLI ons step closer to being linkable to the dynamic library

4 years agoremoved redundant tests 2455/head
Yann Collet [Wed, 6 Jan 2021 23:37:46 +0000 (15:37 -0800)] 
removed redundant tests

clang v3.8 tests are either flacky or redundant,
prefer using clang-latest.

4 years agoMerge pull request #2454 from facebook/cycleLog_noDeps
Yann Collet [Wed, 6 Jan 2021 23:30:05 +0000 (15:30 -0800)] 
Merge pull request #2454 from facebook/cycleLog_noDeps

removed internal library dependency from CLI

4 years agoremoved internal dependency from CLI 2454/head
Yann Collet [Wed, 6 Jan 2021 09:35:52 +0000 (01:35 -0800)] 
removed internal dependency from CLI

ZSTD_cycleLog() is a very short function,
creating a rather large dependency onto libzstd's internal just for it is overkill.
Prefer duplicating this 2-lines function.

This PR makes the zstd CLI one step closer to being linkable to the dynamic library (see #2450)
More steps are still needed to reach this goal.

4 years agoMerge pull request #2451 from terrelln/adjust-dict-2
Nick Terrell [Tue, 5 Jan 2021 03:27:30 +0000 (22:27 -0500)] 
Merge pull request #2451 from terrelln/adjust-dict-2

Don't shrink window log when streaming with a dictionary

4 years agoDon't shrink window log in ZSTD_getCParams() 2451/head
Nick Terrell [Mon, 4 Jan 2021 23:51:23 +0000 (15:51 -0800)] 
Don't shrink window log in ZSTD_getCParams()

Treat ZSTD_getCParams() and ZSTD_adjustCParams() in the same way
we treat streaming compression. Choose parameters based on the
dictionary size + source size, and assume the source size is small
if unkown. But, don't shrink the window log down in
ZSTD_adjustCParams_internal().

4 years agoDon't shrink window log when streaming with a dictionary
Nick Terrell [Mon, 4 Jan 2021 21:43:47 +0000 (13:43 -0800)] 
Don't shrink window log when streaming with a dictionary

Fixes #2442.

1. When creating a dictionary keep the same behavior as before.
   Assume the source size is 513 bytes when adjusting parameters.
2. When calling ZSTD_getCParams() or ZSTD_adjustCParams() keep
   the same behavior as before.
3. When attaching a dictionary keep the same behavior of ignoring
   the dictionary size. When streaming this will select the
   largest parameters and not adjust them down. But, the CDict
   will use the correctly sized parameters, which seems like the
   right tradeoff.
4. When not attaching a dictionary (either forced not to, or
   using a prefix dictionary) we select parameters based on the
   dictionary size + source size, and assume the source size is
   small, which is the same behavior as before. But, now we don't
   adjust the window log (and hash and chain log) down when the
   source size is unknown.

When the source size is unknown all cdicts should attach, except
when the user disables attaching, or `forceWindow` is used. This
means that when streaming with a CDict we end up in the good case
where we get small CDict parameters, and large source parameters.

TODO: Add a streaming + dictionary regression test case.