Skip to content
Snippets Groups Projects
  1. Jan 27, 2025
  2. Jan 13, 2025
    • Sean Bartell's avatar
      [contrib/pzstd] Prevent hangs when there are errors · 80af41e0
      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.
      80af41e0
  3. Jan 02, 2025
  4. Dec 29, 2024
    • Yann Collet's avatar
      update type names · 04a2a021
      Yann Collet authored
      naming convention: Type names should start with a Capital letter (after the prefix)
      04a2a021
  5. Dec 20, 2024
  6. Dec 18, 2024
    • Victor Zhang's avatar
      Move #includes out of `extern "C"` blocks · fc726da7
      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`
      fc726da7
  7. Nov 25, 2024
  8. Oct 31, 2024
  9. Sep 25, 2024
  10. Jul 03, 2024
  11. Jun 14, 2024
  12. Mar 18, 2024
    • Alexander Kanavin's avatar
      pzstd: use c++14 without conditions · cd4dba74
      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.
      cd4dba74
  13. Nov 17, 2023
  14. Sep 23, 2023
  15. Sep 12, 2023
    • Paul Menzel's avatar
      [pzstd]: Fix `DESTDIR` handling to allow setting `BINDIR` · d55ebb57
      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")
      d55ebb57
  16. Jun 15, 2023
  17. Mar 30, 2023
    • Yoni Gilad's avatar
      seekable_format: Add unit test for multiple decompress calls · 649a9c85
      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.
      649a9c85
    • Yoni Gilad's avatar
      seekable_format: Prevent rereading frame when seeking forward · 618bf84e
      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.
      618bf84e
  18. Mar 27, 2023
  19. Mar 10, 2023
  20. Mar 09, 2023
  21. Mar 08, 2023
  22. Feb 12, 2023
  23. Feb 09, 2023
  24. Feb 08, 2023
  25. Jan 24, 2023
  26. Jan 20, 2023
  27. Jan 04, 2023
  28. Dec 28, 2022
    • Elliot Gorokhovsky's avatar
      External matchfinder API (#3333) · 2a402626
      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
      2a402626
  29. Dec 22, 2022
  30. Dec 20, 2022
    • Danielle Rozenblit's avatar
    • W. Felix Handte's avatar
      Coalesce Almost All Copyright Notices to Standard Phrasing · 5d693cc3
      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
      ```
      5d693cc3
    • W. Felix Handte's avatar
      Rewrite Copyright Date Ranges from `-present` to `-2022` · 7f12f24c
      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/
      ```
      7f12f24c
Loading