- Jan 27, 2025
-
-
Giovanni Cabiddu authored
Make the function ZSTD_compressSequencesAndLiterals() available in kernel space. This will be used by Intel QAT driver. Additionally, (1) expose the function ZSTD_CCtx_setParameter(), which is required to set parameters before calling ZSTD_compressSequencesAndLiterals(), (2) update the build process to include `compress/zstd_preSplit.o` and (3) replace `asm/unaligned.h` with `linux/unaligned.h`. Signed-off-by:
Giovanni Cabiddu <giovanni.cabiddu@intel.com>
-
- Jan 13, 2025
-
-
Sean Bartell authored
When two threads are using a WorkQueue and the reader thread exits due to an error, it must call WorkQueue::finish() to wake up the writer thread. Otherwise, if the queue is full and the writer thread is waiting for a free slot, it could hang forever. This can happen in pratice when decompressing a large, corrupted file that does not contain pzstd skippable frames.
-
- Jan 02, 2025
-
-
Victor Zhang authored
-
Victor Zhang authored
Some older Android libc implementations don't support `fseeko` or `ftello`. This commit adds a new compile-time macro `LIBC_NO_FSEEKO` as well as a usage in CMake for old Android APIs.
-
- Dec 29, 2024
-
-
Yann Collet authored
naming convention: Type names should start with a Capital letter (after the prefix)
-
- Dec 20, 2024
-
-
Yann Collet authored
-
Victor Zhang authored
-
- Dec 18, 2024
-
-
Victor Zhang authored
Do some include shuffling for `**.h` files within lib, programs, tests, and zlibWrapper. `lib/legacy` and `lib/deprecated` are untouched. `#include`s within `extern "C"` blocks in .cpp files are untouched. todo: shuffling for `xxhash.h`
-
- Nov 25, 2024
-
-
Robert Rose authored
Add a check whether the seek table of a `ZSTD_seekable` is initialized before creating a new seek table from it. Return `NULL`, if the check fails.
-
- Oct 31, 2024
-
-
Yann Collet authored
suggested by @Eugeny1
-
- Sep 25, 2024
-
-
inventor500 authored
-
inventor500 authored
-
- Jul 03, 2024
-
-
Joseph Lee authored
-
- Jun 14, 2024
-
-
Elliot Gorokhovsky authored
-
- Mar 18, 2024
-
-
Alexander Kanavin authored
Doing this check with a direct c++ snippet is prone to portability problems: - \043 is not portable between shells: dash expands it to #, bash does not; - using # directly works with make 4.3 but does not with make 4.2. Let's just use the c++ version that covers both the code and the gtest.
-
- Nov 17, 2023
-
-
Nick Terrell authored
ZSTD_resetDStream() is deprecated and replaced by ZSTD_DCtx_reset(). This removes deprecation warnings from the kernel build. This change is a no-op, see the docs suggesting this replacement. https://github.com/facebook/zstd/blob/fcbf2fde9ac7ce1562c7b3a394350e764bcb580f/lib/zstd.h#L2655-L2663
-
Nick Terrell authored
Linux started providing intptr_t in <linux/types.h> so we no longer need to define it here. https://lkml.kernel.org/r/ed66b9e4-1fb7-45be-9bb9-d4bc291c691f@p183
-
- Sep 23, 2023
-
-
Dimitri Papadopoulos authored
To the best of my knowledge: * `_WIN32` and `_WIN64` are defined by the compiler, * `WIN32` and `WIN64` are defined by the user, to indicate whatever the user chooses them to indicate. They mean 32-bit and 64-bit Windows compilation by convention only. See: https://accu.org/journals/overload/24/132/wilson_2223/ Windows compilers in general, and MSVC in particular, have been defining `_WIN32` and `_WIN64` for a long time, provably at least since Visual Studio 2015, and in practice as early as in the days of 16-bit Windows. See: https://learn.microsoft.com/en-us/cpp/preprocessor/predefined-macros?view=msvc-140 https://learn.microsoft.com/en-us/windows/win32/winprog64/the-tools Tests used to be inconsistent, sometimes testing `_WIN32`, sometimes `_WIN32` and `WIN32`. This brings consistency to Windows detection.
-
- Sep 12, 2023
-
-
Paul Menzel authored
Currently, setting `BINDIR` and `DESTDIR` separately is not possible, so the command below fails, as BINDIR is set explicitly: $ make -j80 install PREFIX=/usr EPREFIX=/usr BINDIR=/usr/bin SBINDIR=/usr/sbin LIBEXECDIR=/usr/libexec SYSCONFDIR=/etc SHAREDSTATEDIR=/var LOCALST ATEDIR=/var LIBDIR=/usr/lib INCLUDEDIR=/usr/include DATAROOTDIR=/usr/share DATADIR=/usr/share INFODIR=/usr/share/info LOCALEDIR=/usr/share/locale MAND IR=/usr/share/man DOCDIR=/usr/share/doc/zstd DESTDIR=/dev/shm/bee-pmenzel/zstd/zstd-1.5.5-0/image -C contrib/pzstd DESTDIR=/dev/shm/bee-pmenzel/zstd/zstd-1.5.5-0/image make: Entering directory '/dev/shm/bee-pmenzel/zstd/zstd-1.5.5-0/source/contrib/pzstd' CFLAGS=" -I../../lib -I../../lib/common -I../../programs -I. -DNDEBUG -O3 -Wall -Wextra -Wno-deprecated-declarations " LDFLAGS=" -O3 -Wall -Wextra -pedantic " make -C ../../lib libzstd.a make[1]: Entering directory '/dev/shm/bee-pmenzel/zstd/zstd-1.5.5-0/source/lib' make[1]: Leaving directory '/dev/shm/bee-pmenzel/zstd/zstd-1.5.5-0/source/lib' g++ main.o ../../programs/util.o Options.o Pzstd.o SkippableFrame.o ../../lib/libzstd.a -O3 -Wall -Wextra -pedantic -pthread -o pzstd install -d -m 755 /usr/bin/ install -m 755 pzstd /usr/bin/pzstd install: cannot create regular file '/usr/bin/pzstd': Permission denied make: *** [Makefile:116: install] Error 1 So, do not prefix `BINDIR` with `DESTDIR`, and adapt all paths for installation. This is more common, and, for example, `programs/Makefile` does the same. Fixes: 8b4e8424 ("[pzstd] Fix Makefile")
-
- Jun 15, 2023
-
-
Yann Collet authored
-
- Mar 30, 2023
-
-
Yoni Gilad authored
This does the following: 1. Compress test data into multiple frames 2. Perform a series of small decompressions and seeks forward, checking that compressed data wasn't reread unnecessarily. 3. Perform some seeks forward and backward to ensure correctness.
-
Yoni Gilad authored
When decompressing a seekable file, if seeking forward within a frame (by issuing multiple ZSTD_seekable_decompress calls with a small gap between them), the frame will be unnecessarily reread from the beginning. This patch makes it continue using the current frame data and simply skip over the unneeded bytes.
-
- Mar 27, 2023
-
-
W. Felix Handte authored
-
W. Felix Handte authored
Rather than remove the flag entirely, as proposed in #3499, this commit uses the newest C++ standard the compiler supports. This retains the selection of using only standardized features (excluding GNU extensions) and keeps the recency requirements of the codebase explicit. Tested with various versions of `g++` and `clang++`.
-
- Mar 10, 2023
-
-
Yann Collet authored
and notably provide additional context for the Maximum Frame Size parameter. requested by @P-E-Meunier at https://github.com/facebook/zstd/commit/1df9f36c6c6cea08778d45a4adaf60e2433439a3#commitcomment-103856979.
-
Yann Collet authored
As reported by @P-E-Meunier in https://github.com/facebook/zstd/issues/2662#issuecomment-1443836186, seekable format ingestion speed can be particularly slow when selected `FRAME_SIZE` is very small, especially in combination with the recent row_hash compression mode. The specific scenario mentioned was `pijul`, using frame sizes of 256 bytes and level 10. This is improved in this PR, by providing approximate parameter adaptation to the compression process. Tested locally on a M1 laptop, ingestion of `enwik8` using `pijul` parameters went from 35sec. (before this PR) to 2.5sec (with this PR). For the specific corner case of a file full of zeroes, this is even more pronounced, going from 45sec. to 0.5sec. These benefits are unrelated to (and come on top of) other improvement efforts currently being made by @yoniko for the row_hash compression method specifically. The `seekable_compress` test program has been updated to allows setting compression level, in order to produce these performance results.
-
- Mar 09, 2023
-
-
W. Felix Handte authored
-
- Mar 08, 2023
-
-
Nick Terrell authored
Backport upstream fix of the assert definition. This code is currently unused, and can be enabled for testing, which is why it wasn't caught. https://lore.kernel.org/lkml/20230129131436.1343228-1-j.neuschaefer@gmx.net/
-
- Feb 12, 2023
-
-
Yonatan Komornik authored
* Fixes zstd-dll build (https://github.com/facebook/zstd/issues/3492): - Adds pool.o and threading.o dependency to the zstd-dll target - Moves custom allocation functions into header to avoid needing to add dependency on common.o - Adds test target for zstd-dll - Adds github workflow that buildis zstd-dll
-
- Feb 09, 2023
-
-
Elliot Gorokhovsky authored
* change "external matchfinder" to "external sequence producer" * migrate contrib/ to new naming convention * fix contrib build * fix error message * update debug strings * fix def of invalid sequences in zstd.h * nit * update CHANGELOG * fix .gitignore
-
Danielle Rozenblit authored
-
- Feb 08, 2023
-
-
Yann Collet authored
-
- Jan 24, 2023
-
-
Danielle Rozenblit authored
-
- Jan 20, 2023
-
-
Nick Terrell authored
Remove all Huffman functions that aren't used by zstd.
-
- Jan 04, 2023
-
-
Danielle Rozenblit authored
-
- Dec 28, 2022
-
-
Elliot Gorokhovsky authored
* First building commit with sample matchfinder * Set up ZSTD_externalMatchCtx struct * move seqBuffer to ZSTD_Sequence* * support non-contiguous dictionary * clean up parens * add clearExternalMatchfinder, handle allocation errors * Add useExternalMatchfinder cParam * validate useExternalMatchfinder cParam * Disable LDM + external matchfinder * Check for static CCtx * Validate mState and mStateDestructor * Improve LDM check to cover both branches * Error API with optional fallback * handle RLE properly for external matchfinder * nit * Move to a CDict-like model for resource ownership * Add hidden useExternalMatchfinder bool to CCtx_params_s * Eliminate malloc, move to cwksp allocation * Handle CCtx reset properly * Ensure seqStore has enough space for external sequences * fix capitalization * Add DEBUGLOG statements * Add compressionLevel param to matchfinder API * fix c99 issues and add a param combination error code * nits * Test external matchfinder API * C90 compat for simpleExternalMatchFinder * Fix some @nocommits and an ASAN bug * nit * nit * nits * forward declare copySequencesToSeqStore functions in zstd_compress_internal.h * nit * nit * nits * Update copyright headers * Fix CMake zstreamtest build * Fix copyright headers (again) * typo * Add externalMatchfinder demo program to make contrib * Reduce memory consumption for small blockSize * ZSTD_postProcessExternalMatchFinderResult nits * test sum(matchlen) + sum(litlen) == srcSize in debug builds * refExternalMatchFinder -> registerExternalMatchFinder * C90 nit * zstreamtest nits * contrib nits * contrib nits * allow block splitter + external matchfinder, refactor * add windowSize param * add contrib/externalMatchfinder/README.md * docs * go back to old RLE heuristic because of the first block issue * fix initializer element is not a constant expression * ref contrib from zstd.h * extremely pedantic compiler warning fix, meson fix, typo fix * Additional docs on API limitations * minor nits * Refactor maxNbSeq calculation into a helper function * Fix copyright
-
- Dec 22, 2022
-
-
Nick Terrell authored
Fix the errors for: * `-Wdocumentation` * `-Wconversion` except `-Wsign-conversion`
-
- Dec 20, 2022
-
-
Danielle Rozenblit authored
-
W. Felix Handte authored
``` for f in $(find . \( -path ./.git -o -path ./tests/fuzz/corpora -o -path ./tests/regression/data-cache -o -path ./tests/regression/cache \) -prune -o -type f); do sed -i '/Copyright .* \(Yann Collet\)\|\(Meta Platforms\)/ s/Copyright .*/Copyright (c) Meta Platforms, Inc. and affiliates./' $f; done git checkout HEAD -- build/VS2010/libzstd-dll/libzstd-dll.rc build/VS2010/zstd/zstd.rc tests/test-license.py contrib/linux-kernel/test/include/linux/xxhash.h examples/streaming_compression_thread_pool.c lib/legacy/zstd_v0*.c lib/legacy/zstd_v0*.h nano ./programs/windres/zstd.rc nano ./build/VS2010/zstd/zstd.rc nano ./build/VS2010/libzstd-dll/libzstd-dll.rc ```
-
W. Felix Handte authored
Apparently it's better. Somehow. ``` for f in $(find . \( -path ./.git -o -path ./tests/fuzz/corpora -o -path ./tests/regression/data-cache -o -path ./tests/regression/cache \) -prune -o -type f); do echo $f; sed -i 's/\-present/-2022/' $f; done g co HEAD -- build/meson/ ```
-