]>
git.ipfire.org Git - thirdparty/zstd.git/log
Nick Terrell [Mon, 12 Oct 2020 19:52:42 +0000 (12:52 -0700)]
[minor] Improve docs and add an assert in response to review
Nick Terrell [Thu, 1 Oct 2020 20:12:23 +0000 (13:12 -0700)]
Fix ZSTD_adjustCParams_internal() to handle dictionary logic
Pass in the `ZSTD_cParamMode_e` to select how we define our cparams.
Based on the mode we either take the `dictSize` into account or we set
it to `0`. See the documentation for `ZSTD_cParamMode_e`.
Some of the modes currently share the same behavior. But they have
distinct modes because they are drastically different cases. E.g.
compression + reprocessing the dictionary and creating a cdict.
Additionally, when downsizing the hashLog and chainLog take the
(adjusted) dictionary size into account, since the size of the
dictionary gets added onto the window size.
Adds a simple test to ensure that we aren't downsizing too far.
Nick Terrell [Mon, 5 Oct 2020 22:38:10 +0000 (15:38 -0700)]
[minor improvement] Pass 0 as the content size in the DDS
The DDS structure can't be copied into the working tables like the DMS.
So it doesn't need to account for the source size when sizing its
parameters, just the dictionary size.
Nick Terrell [Mon, 5 Oct 2020 22:49:55 +0000 (15:49 -0700)]
[minor improvement] Pass dictSize when selecting parameters
When selecting parameters in streaming compression with a dictionary use
the dictionary size to select the parameters.
Nick Terrell [Mon, 5 Oct 2020 22:46:50 +0000 (15:46 -0700)]
[refactor] Remove ZSTD_resetCStream_internal()
This function is only called in one place. It isn't a logical separation
of duties, and it was only obsfucating the code now, so inline it.
Nick Terrell [Mon, 5 Oct 2020 22:17:44 +0000 (15:17 -0700)]
[bug] Fix dictContentType when reprocessing cdict
Conditions to trigger:
* CDict is loaded as raw content.
* CDict starts with the zstd dictionary magic number.
* The CDict is reprocessed (not attached or copied).
* The new API is used (streaming or `ZSTD_compress2()`).
Bug: The dictionary is loaded as a zstd dictionary, not a raw content
dictionary, because the dict content type is set to `ZSTD_dct_auto`.
Fix: Pass in the dictionary content type from cdict creation to the call
to `ZSTD_compress_insertDictionary()`.
Test: Added a test case that exposes the bug, and fixed the raw
content tests to not modify the `dictBuffer`, which makes all future
tests with the `dictBuffer` raw content, which doesn't seem intentional.
Yann Collet [Fri, 9 Oct 2020 08:01:36 +0000 (01:01 -0700)]
Merge pull request #2329 from senhuang42/prevent_summary_updates_when_using_stdout
Prevent summary updates when using stdout
Yann Collet [Fri, 9 Oct 2020 08:00:50 +0000 (01:00 -0700)]
Merge pull request #2328 from marxin/zstd-pool-api
Allow external creation of POOLs that can be shared.
Yann Collet [Fri, 9 Oct 2020 07:48:30 +0000 (00:48 -0700)]
Merge pull request #2303 from senhuang42/let_cdict_take_clevel_priority
For ZSTD_compressStream2(), let cdict take compression level priority
Yann Collet [Fri, 9 Oct 2020 07:40:59 +0000 (00:40 -0700)]
Merge pull request #2319 from facebook/fullbench_stream2
update fullbench for compressStream2()
senhuang42 [Wed, 7 Oct 2020 17:47:38 +0000 (13:47 -0400)]
Add callsites to zstdcli.c and tests to playTests.sh
senhuang42 [Wed, 7 Oct 2020 17:44:25 +0000 (13:44 -0400)]
Add hasStdoutOutput setter to fileio.h
senhuang42 [Wed, 7 Oct 2020 17:43:27 +0000 (13:43 -0400)]
Fixed logic for stdout output
senhuang42 [Wed, 7 Oct 2020 17:42:34 +0000 (13:42 -0400)]
Add new stdoutOutput field
Martin Liska [Fri, 25 Sep 2020 12:12:14 +0000 (14:12 +0200)]
Allow external creation of POOLs that can be shared.
Yann Collet [Tue, 6 Oct 2020 22:58:37 +0000 (15:58 -0700)]
Merge pull request #2330 from senhuang42/fix_stdinout_error_messages
Improve error messages on console input/output
Nick Terrell [Fri, 2 Oct 2020 01:56:24 +0000 (18:56 -0700)]
Merge pull request #2338 from terrelln/comments
Add comments to ZSTD_getLowest{Match,Prefix}Index()
Nick Terrell [Fri, 2 Oct 2020 01:56:11 +0000 (18:56 -0700)]
Merge pull request #2333 from terrelln/stable-dst
Reset all decompression parameters in ZSTD_DCtx_reset()
Nick Terrell [Tue, 29 Sep 2020 23:25:03 +0000 (16:25 -0700)]
Reset all decompression parameters in ZSTD_DCtx_reset()
* Reset all decompression parameters in `ZSTD_DCtx_reset()` when
resetting parameters.
* Add a test case.
Nick Terrell [Thu, 1 Oct 2020 20:21:46 +0000 (13:21 -0700)]
Add comments to ZSTD_getLowest{Match,Prefix}Index()
Clarify how we handle dictionaries in each case.
Yann Collet [Wed, 30 Sep 2020 15:27:53 +0000 (08:27 -0700)]
Merge pull request #2317 from animalize/msvc_inline
Let MSVC force inline ZSTD_hashPtr() function
Yann Collet [Wed, 30 Sep 2020 15:27:21 +0000 (08:27 -0700)]
Merge pull request #2321 from senhuang42/disallow_repcode_0_in_dict
Update documentation about repcodes in dictionaries
Yann Collet [Wed, 30 Sep 2020 15:26:50 +0000 (08:26 -0700)]
Merge pull request #2322 from senhuang42/guard_against_stdin_for_warning_prompts
Don't let warning messages consume input from stdin
Nick Terrell [Tue, 29 Sep 2020 20:51:23 +0000 (13:51 -0700)]
Merge pull request #2326 from terrelln/kernel-test-fix
Fix issues and warnings exposed by Kernel Test Robot
senhuang42 [Mon, 28 Sep 2020 16:15:18 +0000 (12:15 -0400)]
Modify error messages on console input/output
senhuang42 [Fri, 25 Sep 2020 15:51:35 +0000 (11:51 -0400)]
Fix Stdin typo
Yann Collet [Fri, 25 Sep 2020 14:48:33 +0000 (07:48 -0700)]
Merge pull request #2310 from senhuang42/fix_multifile_status_bar
Fix multifile status bar and summary - clear out extraneous characters
Nick Terrell [Fri, 25 Sep 2020 01:04:44 +0000 (18:04 -0700)]
[superblock] Reduce stack usage by correctly sizing header buffers
Nick Terrell [Fri, 25 Sep 2020 00:52:16 +0000 (17:52 -0700)]
[lib] Add ZSTD_COMPRESS_HEAPMODE tuning parameter
Nick Terrell [Thu, 24 Sep 2020 23:25:58 +0000 (16:25 -0700)]
[freestanding] Improve macro resolution to handle #if X
Nick Terrell [Thu, 24 Sep 2020 23:04:21 +0000 (16:04 -0700)]
Allow user to override ASAN/MSAN detection
Rename ADDRESS_SANITIZER -> ZSTD_ADDRESS_SANITIZER and same for
MEMORY_SANITIZER. Also set it to 0/1 instead of checking for defined.
This allows the user to override ASAN/MSAN detection for platforms that
don't support it.
Nick Terrell [Thu, 24 Sep 2020 23:03:28 +0000 (16:03 -0700)]
Remove call to memset
The previous commit fixes the test so it errors on calls to mem*()
functions from <string.h>.
Nick Terrell [Thu, 24 Sep 2020 22:22:34 +0000 (15:22 -0700)]
[linux-kernel] Avoid including <string.h> in the tests
Nick Terrell [Thu, 24 Sep 2020 21:22:56 +0000 (14:22 -0700)]
Reorganize zstd_deps.h and mem.h + replace mem.h for the kernel
Nick Terrell [Thu, 24 Sep 2020 22:45:08 +0000 (15:45 -0700)]
Move __has_builtin() fallback define to compiler.h
Nick Terrell [Thu, 24 Sep 2020 21:14:32 +0000 (14:14 -0700)]
Move ASAN/MSAN support declarations to compiler.h
Nick Terrell [Thu, 24 Sep 2020 21:13:16 +0000 (14:13 -0700)]
Remove MEM_STATIC_ASSERT and use DEBUG_STATIC_ASSERT instead
senhuang42 [Thu, 24 Sep 2020 20:44:33 +0000 (16:44 -0400)]
Update unit tests
senhuang42 [Thu, 24 Sep 2020 20:29:12 +0000 (16:29 -0400)]
Add more useful failure message when stdin is an input
senhuang42 [Thu, 24 Sep 2020 19:58:06 +0000 (15:58 -0400)]
Expand UTIL_requireUserConfirmation to include stdin input check
senhuang42 [Thu, 24 Sep 2020 19:55:30 +0000 (15:55 -0400)]
Add FIO_determineHasStdinInput() function and member to fCtx
senhuang42 [Thu, 24 Sep 2020 19:49:30 +0000 (15:49 -0400)]
Add fCtx to FIO_openDstFile()
Yann Collet [Thu, 24 Sep 2020 16:44:48 +0000 (09:44 -0700)]
Merge pull request #2315 from senhuang42/allow_zstd_suffix
Support .zstd suffix only for decompression
Nick Terrell [Thu, 24 Sep 2020 03:36:47 +0000 (20:36 -0700)]
[linux-kernel] Add missing semicolon in zstd_deps.h
Nick Terrell [Thu, 24 Sep 2020 03:34:44 +0000 (20:34 -0700)]
[lib] Wrap customMem xor checks in parens for readability
This clarifies operator precedence, and quiets cppcheck in
the Kernel Test Robot. I think this is a slight bonus to
readability, so I am accepting the suggestion.
Nick Terrell [Wed, 23 Sep 2020 22:01:56 +0000 (15:01 -0700)]
Merge pull request #2324 from terrelln/kernel-test-fix
Silence warnings reported by Kernel Test Robot
Nick Terrell [Wed, 23 Sep 2020 19:59:23 +0000 (12:59 -0700)]
[CI][linux-kernel] Enable -Wunused-const-variable and -Wunused-but-set-variable
Nick Terrell [Wed, 23 Sep 2020 19:58:38 +0000 (12:58 -0700)]
[lib] Silence -Wunused-const-variable warnings
Nick Terrell [Wed, 23 Sep 2020 19:54:10 +0000 (12:54 -0700)]
[linux-kernel] Fix unused variable warnings with malloc, calloc, and free
senhuang42 [Tue, 22 Sep 2020 18:16:26 +0000 (14:16 -0400)]
Add unit tests to guard against bad stdin
senhuang42 [Tue, 22 Sep 2020 18:15:52 +0000 (14:15 -0400)]
Use IS_CONSOLE macro to detect that we're indeed using a console
Nick Terrell [Tue, 22 Sep 2020 17:58:48 +0000 (10:58 -0700)]
Merge pull request #2320 from terrelln/test-fix
[tests] Don't write to stdout
senhuang42 [Tue, 22 Sep 2020 17:24:27 +0000 (13:24 -0400)]
Updated to repcode documentation to reflect dict content size
senhuang42 [Tue, 22 Sep 2020 16:58:44 +0000 (12:58 -0400)]
Update documentation about repcodes in dictionaries
Nick Terrell [Tue, 22 Sep 2020 07:40:27 +0000 (00:40 -0700)]
[tests] Don't write to stdout
Yann Collet [Mon, 21 Sep 2020 14:19:20 +0000 (07:19 -0700)]
update fullbench for compressStream2()
makes it possible to measure scenarios such as #2314
animalize [Mon, 21 Sep 2020 05:26:38 +0000 (13:26 +0800)]
Use `MEM_STATIC FORCE_INLINE_ATTR` instead of `FORCE_INLINE_TEMPLATE`
It adds `__attribute__((unused))` for __GNUC__, to eliminate `-Werror=unused-function` error.
animalize [Mon, 21 Sep 2020 02:35:47 +0000 (10:35 +0800)]
Let MSVC force inline ZSTD_hashPtr() function
ZSTD_hashPtr() function was not expanded by MSVC, led to low performance compared to GCC.
Felix Handte [Fri, 18 Sep 2020 18:02:14 +0000 (14:02 -0400)]
Merge pull request #2311 from felixhandte/ddss-fix-cparam-derivation
Fix Compression Parameter Derivation Bugs Introduced by DDSS Changes
senhuang42 [Fri, 18 Sep 2020 17:01:45 +0000 (13:01 -0400)]
Add -f to .zstd decompression CLI test
senhuang42 [Fri, 18 Sep 2020 16:49:51 +0000 (12:49 -0400)]
Support .zstd suffix only for decompression
Felix Handte [Fri, 18 Sep 2020 16:03:00 +0000 (12:03 -0400)]
Merge pull request #2313 from felixhandte/fuzzer-separate-long-tests
Separate Long Tests in Fuzzer
W. Felix Handte [Thu, 17 Sep 2020 17:28:20 +0000 (13:28 -0400)]
Run Long Tests in GitHub CI
W. Felix Handte [Thu, 17 Sep 2020 16:57:39 +0000 (12:57 -0400)]
Move Last Two Long Tests in fuzzer.c into Separate --long-tests Section
W. Felix Handte [Thu, 17 Sep 2020 16:23:05 +0000 (12:23 -0400)]
Update Regression Test Results
W. Felix Handte [Thu, 17 Sep 2020 16:15:33 +0000 (12:15 -0400)]
Use ZSTD_CCtxParams_init() to Init CCtxParams, not memset()
Even if the discrepancies are at the moment benign, it's probably better to
standardize on using the one true initializer, rather than trying (and failing)
to correctly duplicate its behavior.
W. Felix Handte [Thu, 17 Sep 2020 16:08:36 +0000 (12:08 -0400)]
Avoid Redundancy in ZSTD_initCDict_internal() Args; Don't Take CParams + CCtxParams
senhuang42 [Wed, 16 Sep 2020 14:38:13 +0000 (10:38 -0400)]
Fix multifile decompression summary
senhuang42 [Wed, 16 Sep 2020 14:28:45 +0000 (10:28 -0400)]
Add filename truncations to decompression
W. Felix Handte [Tue, 15 Sep 2020 18:06:58 +0000 (14:06 -0400)]
Fall Back if Derived CParams are Incompatible with DDSS; Refactor CDict Creation
Rewrite ZSTD_createCDict_advanced() as a wrapper around
ZSTD_createCDict_advanced2(). Evaluate whether to use DDSS mode *after* fully
resolving cparams. If not, fall back.
senhuang42 [Tue, 15 Sep 2020 19:53:32 +0000 (15:53 -0400)]
Add display clears
W. Felix Handte [Tue, 15 Sep 2020 18:06:10 +0000 (14:06 -0400)]
Make ZSTD_createCDict_advanced2() cctxParams Arg Const
W. Felix Handte [Tue, 15 Sep 2020 17:57:43 +0000 (13:57 -0400)]
Do More Complete CParams Deduction in Non-DDSS Path of ZSTD_createCDict_advanced2
Call ZSTD_getCParamsFromCCtxParams() instead of ZSTD_getCParams_internal().
W. Felix Handte [Tue, 15 Sep 2020 17:38:05 +0000 (13:38 -0400)]
Pull CParam Override Logic into Helper
senhuang42 [Tue, 15 Sep 2020 17:01:46 +0000 (13:01 -0400)]
Add padding to remove previous line's leftovers, and keep the printed line to around the same size
Nick Terrell [Mon, 14 Sep 2020 21:56:30 +0000 (14:56 -0700)]
Merge pull request #2308 from terrelln/zstd-kernel
[contrib][linux-kernel] Add decompress_sources.h
Yann Collet [Mon, 14 Sep 2020 21:06:26 +0000 (14:06 -0700)]
Merge pull request #2292 from senhuang42/multifile_status_update_fio_refactor
Make multifile (de)compression print out a summary
Yann Collet [Mon, 14 Sep 2020 21:04:19 +0000 (14:04 -0700)]
Merge pull request #2299 from senhuang42/env_var_num_threads
Allow environment variable to specify number of threads for compression
Yann Collet [Mon, 14 Sep 2020 20:57:55 +0000 (13:57 -0700)]
Merge pull request #2306 from facebook/check_endDirective
check endDirective in ZSTD_compressStream2()
Nick Terrell [Mon, 14 Sep 2020 19:45:24 +0000 (12:45 -0700)]
[contrib][linux-kernel] Add decompress_sources.h
Add decompress_sources.h, which includes all the decompression .c files.
This is used for kernel decompression.
Also, add a test which checks that including decompress_sources.h works.
Yann Collet [Mon, 14 Sep 2020 18:46:23 +0000 (11:46 -0700)]
minor fix casting for Visual
Yann Collet [Mon, 14 Sep 2020 17:56:08 +0000 (10:56 -0700)]
check endDirective in ZSTD_compressStream2()
fix #2297
also :
- `assert()` `endDirective` in `ZSTD_compressStream_internal()`, for debug mode
- add relevant tests
senhuang42 [Fri, 11 Sep 2020 15:42:12 +0000 (11:42 -0400)]
Coding style cleanup
senhuang42 [Fri, 11 Sep 2020 15:41:10 +0000 (11:41 -0400)]
Modify params rather than cctx->requestedParams
Felix Handte [Fri, 11 Sep 2020 05:39:23 +0000 (01:39 -0400)]
Merge pull request #2295 from felixhandte/dedicated-dict-search-structure-chain
DDSS for Lazy: Implement a Dedicated Dictionary Chain Table
W. Felix Handte [Fri, 11 Sep 2020 03:35:42 +0000 (23:35 -0400)]
Print More During Fuzzer Test to Avoid CI Killing it Due to Timeout
This is kind of hacky. And maybe this test doesn't need to be permanently as
exhaustive as it is now. But while we're actively developing the DDSS, we
should ensure it's compatible across many different modes.
W. Felix Handte [Fri, 11 Sep 2020 02:29:19 +0000 (22:29 -0400)]
Test Fewer Dictionary Sizes
W. Felix Handte [Thu, 10 Sep 2020 23:19:39 +0000 (19:19 -0400)]
Fix Debug Logging in 32-bit Build
W. Felix Handte [Thu, 10 Sep 2020 22:22:49 +0000 (18:22 -0400)]
Document searchFuncs Table
W. Felix Handte [Thu, 10 Sep 2020 22:18:50 +0000 (18:18 -0400)]
Further Consolidate Dict Mode Checks
W. Felix Handte [Thu, 10 Sep 2020 20:36:28 +0000 (16:36 -0400)]
Improve Documentation Slightly
W. Felix Handte [Thu, 10 Sep 2020 15:33:12 +0000 (11:33 -0400)]
Make DDSS Selection Override ForceCopy Directive
W. Felix Handte [Thu, 10 Sep 2020 15:32:16 +0000 (11:32 -0400)]
Test DDSS A Little More Thoroughly
W. Felix Handte [Tue, 8 Sep 2020 21:39:37 +0000 (17:39 -0400)]
Attempt to Fix MSVC Warnings
W. Felix Handte [Fri, 4 Sep 2020 04:31:00 +0000 (00:31 -0400)]
Simplify Match Limit Checks
Seems like a ~1.25% speedup.
W. Felix Handte [Fri, 4 Sep 2020 04:11:44 +0000 (00:11 -0400)]
Use All Available Space in the Hash Table to Extent Chain Table Reach
Rather than restrict our temp chain table to 2 ** chainLog entries, this
commit uses all available space to reach further back to gather longer
chains to pack into the DDSS chain table.
W. Felix Handte [Thu, 3 Sep 2020 23:45:24 +0000 (19:45 -0400)]
Rewrite Table Fill to Retain Cache Entries Beyond Chain Window
W. Felix Handte [Thu, 3 Sep 2020 21:29:44 +0000 (17:29 -0400)]
Avoid Malloc in Table Fill; Pack Tmp Structure into Hash Table
W. Felix Handte [Thu, 3 Sep 2020 17:58:11 +0000 (13:58 -0400)]
Truncate Chain at Last Possible Attempt
Make the chain table denser?
W. Felix Handte [Thu, 3 Sep 2020 17:34:38 +0000 (13:34 -0400)]
Prefetch Chain Table Matches