Showing preview only (6,874K chars total). Download the full file or copy to clipboard to get everything.
Repository: facebook/zstd
Branch: dev
Commit: 3ae099b48dfc
Files: 509
Total size: 6.5 MB
Directory structure:
gitextract_qen600gb/
├── .buckconfig
├── .buckversion
├── .cirrus.yml
├── .gitattributes
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ ├── bug_report.md
│ │ └── feature_request.md
│ ├── dependabot.yml
│ └── workflows/
│ ├── android-ndk-build.yml
│ ├── cmake-tests.yml
│ ├── commit.yml
│ ├── dev-long-tests.yml
│ ├── dev-short-tests.yml
│ ├── nightly.yml
│ ├── publish-release-artifacts.yml
│ ├── release_check.yml
│ ├── scorecards.yml
│ └── windows-artifacts.yml
├── .gitignore
├── CHANGELOG
├── CMakeLists.txt
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── COPYING
├── LICENSE
├── Makefile
├── Package.swift
├── README.md
├── SECURITY.md
├── TESTING.md
├── contrib/
│ ├── VS2005/
│ │ ├── README.md
│ │ ├── fullbench/
│ │ │ └── fullbench.vcproj
│ │ ├── fuzzer/
│ │ │ └── fuzzer.vcproj
│ │ ├── zstd/
│ │ │ └── zstd.vcproj
│ │ ├── zstd.sln
│ │ └── zstdlib/
│ │ └── zstdlib.vcproj
│ ├── cleanTabs
│ ├── diagnose_corruption/
│ │ ├── .gitignore
│ │ ├── Makefile
│ │ └── check_flipped_bits.c
│ ├── docker/
│ │ ├── Dockerfile
│ │ └── README.md
│ ├── freestanding_lib/
│ │ └── freestanding.py
│ ├── linux-kernel/
│ │ ├── .gitignore
│ │ ├── Makefile
│ │ ├── README.md
│ │ ├── btrfs-benchmark.sh
│ │ ├── btrfs-extract-benchmark.sh
│ │ ├── decompress_sources.h
│ │ ├── linux.mk
│ │ ├── linux_zstd.h
│ │ ├── mem.h
│ │ ├── squashfs-benchmark.sh
│ │ ├── test/
│ │ │ ├── Makefile
│ │ │ ├── include/
│ │ │ │ └── linux/
│ │ │ │ ├── compiler.h
│ │ │ │ ├── errno.h
│ │ │ │ ├── kernel.h
│ │ │ │ ├── limits.h
│ │ │ │ ├── math64.h
│ │ │ │ ├── module.h
│ │ │ │ ├── printk.h
│ │ │ │ ├── stddef.h
│ │ │ │ ├── swab.h
│ │ │ │ ├── types.h
│ │ │ │ ├── unaligned.h
│ │ │ │ └── xxhash.h
│ │ │ ├── macro-test.sh
│ │ │ ├── static_test.c
│ │ │ └── test.c
│ │ ├── zstd_common_module.c
│ │ ├── zstd_compress_module.c
│ │ ├── zstd_decompress_module.c
│ │ └── zstd_deps.h
│ ├── match_finders/
│ │ ├── README.md
│ │ ├── zstd_edist.c
│ │ └── zstd_edist.h
│ ├── premake/
│ │ ├── premake4.lua
│ │ └── zstd.lua
│ ├── recovery/
│ │ ├── Makefile
│ │ └── recover_directory.c
│ ├── seekable_format/
│ │ ├── README.md
│ │ ├── examples/
│ │ │ ├── .gitignore
│ │ │ ├── Makefile
│ │ │ ├── parallel_compression.c
│ │ │ ├── parallel_processing.c
│ │ │ ├── seekable_compression.c
│ │ │ ├── seekable_decompression.c
│ │ │ └── seekable_decompression_mem.c
│ │ ├── tests/
│ │ │ ├── .gitignore
│ │ │ ├── Makefile
│ │ │ └── seekable_tests.c
│ │ ├── zstd_seekable.h
│ │ ├── zstd_seekable_compression_format.md
│ │ ├── zstdseek_compress.c
│ │ └── zstdseek_decompress.c
│ ├── seqBench/
│ │ ├── Makefile
│ │ └── seqBench.c
│ └── snap/
│ └── snapcraft.yaml
├── doc/
│ ├── README.md
│ ├── decompressor_errata.md
│ ├── decompressor_permissive.md
│ ├── educational_decoder/
│ │ ├── .gitignore
│ │ ├── Makefile
│ │ ├── README.md
│ │ ├── harness.c
│ │ ├── zstd_decompress.c
│ │ └── zstd_decompress.h
│ ├── zstd_compression_format.md
│ └── zstd_manual.html
├── examples/
│ ├── .gitignore
│ ├── Makefile
│ ├── README.md
│ ├── common.h
│ ├── dictionary_compression.c
│ ├── dictionary_decompression.c
│ ├── multiple_simple_compression.c
│ ├── multiple_streaming_compression.c
│ ├── simple_compression.c
│ ├── simple_decompression.c
│ ├── streaming_compression.c
│ ├── streaming_compression_thread_pool.c
│ ├── streaming_decompression.c
│ └── streaming_memory_usage.c
├── lib/
│ ├── .gitignore
│ ├── BUCK
│ ├── Makefile
│ ├── README.md
│ ├── common/
│ │ ├── allocations.h
│ │ ├── bits.h
│ │ ├── bitstream.h
│ │ ├── compiler.h
│ │ ├── cpu.h
│ │ ├── debug.c
│ │ ├── debug.h
│ │ ├── entropy_common.c
│ │ ├── error_private.c
│ │ ├── error_private.h
│ │ ├── fse.h
│ │ ├── fse_decompress.c
│ │ ├── huf.h
│ │ ├── mem.h
│ │ ├── pool.c
│ │ ├── pool.h
│ │ ├── portability_macros.h
│ │ ├── threading.c
│ │ ├── threading.h
│ │ ├── xxhash.c
│ │ ├── xxhash.h
│ │ ├── zstd_common.c
│ │ ├── zstd_deps.h
│ │ ├── zstd_internal.h
│ │ └── zstd_trace.h
│ ├── compress/
│ │ ├── clevels.h
│ │ ├── fse_compress.c
│ │ ├── hist.c
│ │ ├── hist.h
│ │ ├── huf_compress.c
│ │ ├── zstd_compress.c
│ │ ├── zstd_compress_internal.h
│ │ ├── zstd_compress_literals.c
│ │ ├── zstd_compress_literals.h
│ │ ├── zstd_compress_sequences.c
│ │ ├── zstd_compress_sequences.h
│ │ ├── zstd_compress_superblock.c
│ │ ├── zstd_compress_superblock.h
│ │ ├── zstd_cwksp.h
│ │ ├── zstd_double_fast.c
│ │ ├── zstd_double_fast.h
│ │ ├── zstd_fast.c
│ │ ├── zstd_fast.h
│ │ ├── zstd_lazy.c
│ │ ├── zstd_lazy.h
│ │ ├── zstd_ldm.c
│ │ ├── zstd_ldm.h
│ │ ├── zstd_ldm_geartab.h
│ │ ├── zstd_opt.c
│ │ ├── zstd_opt.h
│ │ ├── zstd_preSplit.c
│ │ ├── zstd_preSplit.h
│ │ ├── zstdmt_compress.c
│ │ └── zstdmt_compress.h
│ ├── decompress/
│ │ ├── huf_decompress.c
│ │ ├── huf_decompress_amd64.S
│ │ ├── zstd_ddict.c
│ │ ├── zstd_ddict.h
│ │ ├── zstd_decompress.c
│ │ ├── zstd_decompress_block.c
│ │ ├── zstd_decompress_block.h
│ │ └── zstd_decompress_internal.h
│ ├── deprecated/
│ │ ├── zbuff.h
│ │ ├── zbuff_common.c
│ │ ├── zbuff_compress.c
│ │ └── zbuff_decompress.c
│ ├── dictBuilder/
│ │ ├── cover.c
│ │ ├── cover.h
│ │ ├── divsufsort.c
│ │ ├── divsufsort.h
│ │ ├── fastcover.c
│ │ └── zdict.c
│ ├── dll/
│ │ └── example/
│ │ ├── Makefile
│ │ ├── README.md
│ │ ├── build_package.bat
│ │ ├── fullbench-dll.sln
│ │ └── fullbench-dll.vcxproj
│ ├── install_oses.mk
│ ├── legacy/
│ │ ├── zstd_legacy.h
│ │ ├── zstd_v01.c
│ │ ├── zstd_v01.h
│ │ ├── zstd_v02.c
│ │ ├── zstd_v02.h
│ │ ├── zstd_v03.c
│ │ ├── zstd_v03.h
│ │ ├── zstd_v04.c
│ │ ├── zstd_v04.h
│ │ ├── zstd_v05.c
│ │ ├── zstd_v05.h
│ │ ├── zstd_v06.c
│ │ ├── zstd_v06.h
│ │ ├── zstd_v07.c
│ │ └── zstd_v07.h
│ ├── libzstd.mk
│ ├── libzstd.pc.in
│ ├── module.modulemap
│ ├── zdict.h
│ ├── zstd.h
│ └── zstd_errors.h
├── programs/
│ ├── .gitignore
│ ├── BUCK
│ ├── Makefile
│ ├── README.md
│ ├── benchfn.c
│ ├── benchfn.h
│ ├── benchzstd.c
│ ├── benchzstd.h
│ ├── datagen.c
│ ├── datagen.h
│ ├── dibio.c
│ ├── dibio.h
│ ├── fileio.c
│ ├── fileio.h
│ ├── fileio_asyncio.c
│ ├── fileio_asyncio.h
│ ├── fileio_common.h
│ ├── fileio_types.h
│ ├── lorem.c
│ ├── lorem.h
│ ├── platform.h
│ ├── timefn.c
│ ├── timefn.h
│ ├── util.c
│ ├── util.h
│ ├── windres/
│ │ ├── verrsrc.h
│ │ ├── zstd.rc
│ │ ├── zstd32.res
│ │ └── zstd64.res
│ ├── zstd.1
│ ├── zstd.1.md
│ ├── zstdcli.c
│ ├── zstdcli_trace.c
│ ├── zstdcli_trace.h
│ ├── zstdgrep
│ ├── zstdgrep.1
│ ├── zstdgrep.1.md
│ ├── zstdless
│ ├── zstdless.1
│ └── zstdless.1.md
├── tests/
│ ├── .gitignore
│ ├── DEPRECATED-test-zstd-speed.py
│ ├── Makefile
│ ├── README.md
│ ├── automated_benchmarking.py
│ ├── checkTag.c
│ ├── check_size.py
│ ├── cli-tests/
│ │ ├── .gitignore
│ │ ├── README.md
│ │ ├── basic/
│ │ │ ├── args.sh
│ │ │ ├── args.sh.exit
│ │ │ ├── args.sh.stderr.glob
│ │ │ ├── help.sh
│ │ │ ├── help.sh.stdout.glob
│ │ │ ├── memlimit.sh
│ │ │ ├── memlimit.sh.stderr.exact
│ │ │ ├── memlimit.sh.stdout.exact
│ │ │ ├── output_dir.sh
│ │ │ ├── output_dir.sh.stderr.exact
│ │ │ ├── output_dir.sh.stdout.exact
│ │ │ ├── version.sh
│ │ │ └── version.sh.stdout.glob
│ │ ├── bin/
│ │ │ ├── cmp_size
│ │ │ ├── datagen
│ │ │ ├── die
│ │ │ ├── println
│ │ │ ├── zstd
│ │ │ ├── zstdgrep
│ │ │ └── zstdless
│ │ ├── cltools/
│ │ │ ├── setup
│ │ │ ├── zstdgrep.sh
│ │ │ ├── zstdgrep.sh.exit
│ │ │ ├── zstdgrep.sh.stderr.exact
│ │ │ ├── zstdgrep.sh.stdout.glob
│ │ │ ├── zstdless.sh
│ │ │ ├── zstdless.sh.stderr.exact
│ │ │ └── zstdless.sh.stdout.glob
│ │ ├── common/
│ │ │ ├── format.sh
│ │ │ ├── mtime.sh
│ │ │ ├── permissions.sh
│ │ │ └── platform.sh
│ │ ├── compression/
│ │ │ ├── adapt.sh
│ │ │ ├── basic.sh
│ │ │ ├── compress-literals.sh
│ │ │ ├── format.sh
│ │ │ ├── golden.sh
│ │ │ ├── gzip-compat.sh
│ │ │ ├── levels.sh
│ │ │ ├── levels.sh.stderr.exact
│ │ │ ├── long-distance-matcher.sh
│ │ │ ├── multi-threaded.sh
│ │ │ ├── multi-threaded.sh.stderr.exact
│ │ │ ├── multiple-files.sh
│ │ │ ├── multiple-files.sh.stdout.exact
│ │ │ ├── row-match-finder.sh
│ │ │ ├── setup
│ │ │ ├── stream-size.sh
│ │ │ ├── verbose-wlog.sh
│ │ │ ├── verbose-wlog.sh.stderr.glob
│ │ │ ├── verbose-wlog.sh.stdout.glob
│ │ │ ├── window-resize.sh
│ │ │ ├── window-resize.sh.stderr.ignore
│ │ │ └── window-resize.sh.stdout.glob
│ │ ├── decompression/
│ │ │ ├── detectErrors.sh
│ │ │ ├── golden.sh
│ │ │ ├── pass-through.sh
│ │ │ ├── pass-through.sh.stderr.exact
│ │ │ └── pass-through.sh.stdout.exact
│ │ ├── determinism/
│ │ │ ├── basic.sh
│ │ │ ├── basic.sh.stderr.exact
│ │ │ ├── basic.sh.stdout.exact
│ │ │ ├── multithread.sh
│ │ │ ├── multithread.sh.stderr.exact
│ │ │ ├── multithread.sh.stdout.exact
│ │ │ ├── reuse.sh
│ │ │ ├── reuse.sh.stderr.exact
│ │ │ ├── reuse.sh.stdout.exact
│ │ │ ├── setup
│ │ │ └── setup_once
│ │ ├── dict-builder/
│ │ │ ├── empty-input.sh
│ │ │ ├── empty-input.sh.stderr.exact
│ │ │ ├── no-inputs.sh
│ │ │ ├── no-inputs.sh.exit
│ │ │ └── no-inputs.sh.stderr.exact
│ │ ├── dictionaries/
│ │ │ ├── dictionary-mismatch.sh
│ │ │ ├── dictionary-mismatch.sh.stderr.exact
│ │ │ ├── golden.sh
│ │ │ ├── setup
│ │ │ └── setup_once
│ │ ├── file-handling/
│ │ │ ├── directory-mirror.sh
│ │ │ ├── directory-mirror.sh.stderr.exact
│ │ │ └── directory-mirror.sh.stdout.exact
│ │ ├── file-stat/
│ │ │ ├── compress-file-to-dir-without-write-perm.sh
│ │ │ ├── compress-file-to-dir-without-write-perm.sh.stderr.exact
│ │ │ ├── compress-file-to-file.sh
│ │ │ ├── compress-file-to-file.sh.stderr.glob
│ │ │ ├── compress-file-to-stdout.sh
│ │ │ ├── compress-file-to-stdout.sh.stderr.exact
│ │ │ ├── compress-stdin-to-file.sh
│ │ │ ├── compress-stdin-to-file.sh.stderr.glob
│ │ │ ├── compress-stdin-to-stdout.sh
│ │ │ ├── compress-stdin-to-stdout.sh.stderr.exact
│ │ │ ├── decompress-file-to-file.sh
│ │ │ ├── decompress-file-to-file.sh.stderr.glob
│ │ │ ├── decompress-file-to-stdout.sh
│ │ │ ├── decompress-file-to-stdout.sh.stderr.exact
│ │ │ ├── decompress-stdin-to-file.sh
│ │ │ ├── decompress-stdin-to-file.sh.stderr.glob
│ │ │ ├── decompress-stdin-to-stdout.sh
│ │ │ └── decompress-stdin-to-stdout.sh.stderr.exact
│ │ ├── progress/
│ │ │ ├── no-progress.sh
│ │ │ ├── no-progress.sh.stderr.glob
│ │ │ ├── progress.sh
│ │ │ └── progress.sh.stderr.glob
│ │ ├── run.py
│ │ └── zstd-symlinks/
│ │ ├── setup
│ │ ├── zstdcat.sh
│ │ └── zstdcat.sh.stdout.exact
│ ├── datagencli.c
│ ├── decodecorpus.c
│ ├── dict-files/
│ │ └── zero-weight-dict
│ ├── external_matchfinder.c
│ ├── external_matchfinder.h
│ ├── fullbench.c
│ ├── fuzz/
│ │ ├── .gitignore
│ │ ├── Makefile
│ │ ├── README.md
│ │ ├── block_decompress.c
│ │ ├── block_round_trip.c
│ │ ├── decompress_cross_format.c
│ │ ├── decompress_dstSize_tooSmall.c
│ │ ├── dictionary_decompress.c
│ │ ├── dictionary_loader.c
│ │ ├── dictionary_round_trip.c
│ │ ├── dictionary_stream_round_trip.c
│ │ ├── fse_read_ncount.c
│ │ ├── fuzz.h
│ │ ├── fuzz.py
│ │ ├── fuzz_data_producer.c
│ │ ├── fuzz_data_producer.h
│ │ ├── fuzz_helpers.c
│ │ ├── fuzz_helpers.h
│ │ ├── fuzz_third_party_seq_prod.h
│ │ ├── generate_sequences.c
│ │ ├── huf_decompress.c
│ │ ├── huf_round_trip.c
│ │ ├── raw_dictionary_round_trip.c
│ │ ├── regression_driver.c
│ │ ├── seekable_roundtrip.c
│ │ ├── seq_prod_fuzz_example/
│ │ │ ├── Makefile
│ │ │ ├── README.md
│ │ │ └── example_seq_prod.c
│ │ ├── sequence_compression_api.c
│ │ ├── simple_compress.c
│ │ ├── simple_decompress.c
│ │ ├── simple_round_trip.c
│ │ ├── stream_decompress.c
│ │ ├── stream_round_trip.c
│ │ ├── zstd_frame_info.c
│ │ ├── zstd_helpers.c
│ │ └── zstd_helpers.h
│ ├── fuzzer.c
│ ├── golden-compression/
│ │ ├── PR-3517-block-splitter-corruption-test
│ │ ├── http
│ │ ├── huffman-compressed-larger
│ │ └── large-literal-and-match-lengths
│ ├── golden-decompression-errors/
│ │ ├── .gitignore
│ │ ├── off0.bin.zst
│ │ ├── truncated_huff_state.zst
│ │ └── zeroSeq_extraneous.zst
│ ├── golden-dictionaries/
│ │ └── http-dict-missing-symbols
│ ├── gzip/
│ │ ├── Makefile
│ │ ├── gzip-env.sh
│ │ ├── helin-segv.sh
│ │ ├── help-version.sh
│ │ ├── hufts.sh
│ │ ├── init.cfg
│ │ ├── init.sh
│ │ ├── keep.sh
│ │ ├── list.sh
│ │ ├── memcpy-abuse.sh
│ │ ├── mixed.sh
│ │ ├── null-suffix-clobber.sh
│ │ ├── stdin.sh
│ │ ├── test-driver.sh
│ │ ├── trailing-nul.sh
│ │ ├── unpack-invalid.sh
│ │ ├── z-suffix.sh
│ │ ├── zdiff.sh
│ │ ├── zgrep-context.sh
│ │ ├── zgrep-f.sh
│ │ ├── zgrep-signal.sh
│ │ └── znew-k.sh
│ ├── invalidDictionaries.c
│ ├── largeDictionary.c
│ ├── legacy.c
│ ├── libzstd_builds.sh
│ ├── longmatch.c
│ ├── loremOut.c
│ ├── loremOut.h
│ ├── paramgrill.c
│ ├── playTests.sh
│ ├── poolTests.c
│ ├── rateLimiter.py
│ ├── regression/
│ │ ├── .gitignore
│ │ ├── Makefile
│ │ ├── README.md
│ │ ├── config.c
│ │ ├── config.h
│ │ ├── data.c
│ │ ├── data.h
│ │ ├── levels.h
│ │ ├── method.c
│ │ ├── method.h
│ │ ├── result.c
│ │ ├── result.h
│ │ ├── results.csv
│ │ └── test.c
│ ├── roundTripCrash.c
│ ├── seqgen.c
│ ├── seqgen.h
│ ├── test-license.py
│ ├── test-variants.sh
│ ├── test-zstd-versions.py
│ ├── test_process_substitution.bash
│ └── zstreamtest.c
└── zlibWrapper/
├── .gitignore
├── BUCK
├── Makefile
├── README.md
├── examples/
│ ├── example.c
│ ├── example_original.c
│ ├── fitblk.c
│ ├── fitblk_original.c
│ ├── minigzip.c
│ └── zwrapbench.c
├── gzclose.c
├── gzcompatibility.h
├── gzguts.h
├── gzlib.c
├── gzread.c
├── gzwrite.c
├── zstd_zlibwrapper.c
└── zstd_zlibwrapper.h
================================================
FILE CONTENTS
================================================
================================================
FILE: .buckconfig
================================================
[cxx]
cppflags = -DXXH_NAMESPACE=ZSTD_ -DZSTD_LEGACY_SUPPORT=4
cflags = -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow -Wstrict-aliasing=1 -Wswitch-enum -Wdeclaration-after-statement -Wstrict-prototypes -Wundef -Wpointer-arith
cxxppflags = -DXXH_NAMESPACE=ZSTD_ -DZSTD_LEGACY_SUPPORT=4
cxxflags = -std=c++11 -Wno-deprecated-declarations
gtest_dep = //contrib/pzstd:gtest
[httpserver]
port = 0
================================================
FILE: .buckversion
================================================
c8dec2e8da52d483f6dd7c6cd2ad694e8e6fed2b
================================================
FILE: .cirrus.yml
================================================
task:
name: FreeBSD (make check)
freebsd_instance:
matrix:
image_family: freebsd-15-0-amd64-zfs
install_script: pkg install -y gmake coreutils
script: |
MOREFLAGS="-Werror" gmake -j all
gmake check
================================================
FILE: .gitattributes
================================================
# Set the default behavior
* text eol=lf
# Explicitly declare source files
*.c text eol=lf
*.h text eol=lf
# Denote files that should not be modified.
*.odt binary
*.png binary
# Visual Studio
*.sln text eol=crlf
*.vcxproj* text eol=crlf
*.vcproj* text eol=crlf
*.suo binary
*.rc text eol=crlf
# Windows
*.bat text eol=crlf
*.cmd text eol=crlf
================================================
FILE: .github/ISSUE_TEMPLATE/bug_report.md
================================================
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Downloads data '...'
2. Run '...' with flags '...'
3. Scroll up on the log to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots and charts**
If applicable, add screenshots and charts to help explain your problem.
**Desktop (please complete the following information):**
- OS: [e.g. Mac]
- Version [e.g. 22]
- Compiler [e.g. gcc]
- Flags [e.g. O2]
- Other relevant hardware specs [e.g. Dual-core]
- Build system [e.g. Makefile]
**Additional context**
Add any other context about the problem here.
================================================
FILE: .github/ISSUE_TEMPLATE/feature_request.md
================================================
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.
================================================
FILE: .github/dependabot.yml
================================================
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
================================================
FILE: .github/workflows/android-ndk-build.yml
================================================
name: Android NDK Build
on:
pull_request:
branches: [ dev, release, actionsTest ]
push:
branches: [ actionsTest, '*ndk*' ]
permissions: read-all
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
- name: Set up JDK 17
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
java-version: '17'
distribution: 'temurin'
- name: Setup Android SDK
uses: android-actions/setup-android@9fc6c4e9069bf8d3d10b2204b1fb8f6ef7065407 # v3.2.2
- name: Install Android NDK
run: |
sdkmanager --install "ndk;27.0.12077973"
echo "ANDROID_NDK_HOME=$ANDROID_SDK_ROOT/ndk/27.0.12077973" >> $GITHUB_ENV
- name: Build with NDK
run: |
export PATH=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH
make CC=aarch64-linux-android21-clang \
AR=llvm-ar \
RANLIB=llvm-ranlib \
STRIP=llvm-strip
- name: Build with CMake and NDK
run: |
mkdir -p build-android
cd build-android
cmake --version
cmake ../build/cmake \
-DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_HOME/build/cmake/android.toolchain.cmake \
-DANDROID_ABI=arm64-v8a \
-DANDROID_PLATFORM=android-21 \
-DCMAKE_BUILD_TYPE=Release
cmake --build . --parallel
================================================
FILE: .github/workflows/cmake-tests.yml
================================================
name: cmake-tests
# CMake-specific build and test workflows
# This workflow validates zstd builds across different CMake configurations,
# platforms, and edge cases to ensure broad compatibility.
concurrency:
group: cmake-${{ github.ref }}
cancel-in-progress: true
on:
pull_request:
branches: [ dev, release, actionsTest ]
permissions: read-all
env:
# Centralized test timeouts for consistency
QUICK_TEST_TIME: "30s"
STANDARD_TEST_TIME: "1mn"
# Common CMake flags
COMMON_CMAKE_FLAGS: "-DCMAKE_COMPILE_WARNING_AS_ERROR=ON -DZSTD_BUILD_TESTS=ON"
jobs:
# Basic cmake build using the root CMakeLists.txt
# Provides a lightweight sanity check that the top-level project config builds
# with the default Unix Makefiles generator driven purely through cmake commands
cmake-root-basic:
name: "CMake Root Build"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
- name: Configure (Root)
run: |
cmake -S . -B cmake-build -DCMAKE_BUILD_TYPE=Release ${{ env.COMMON_CMAKE_FLAGS }}
- name: Build (Root)
run: |
cmake --build cmake-build --config Release
# Ubuntu-based cmake build using make wrapper
# This test uses the make-driven cmake build to ensure compatibility
# with the existing build system integration
cmake-ubuntu-basic:
name: "CMake build using make wrapper"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
- name: Install dependencies
run: |
sudo apt install liblzma-dev # Required for compression algorithms
- name: CMake build and test via make
run: |
# Use make wrapper for cmake build with quick test timeouts
FUZZERTEST=-T${{ env.STANDARD_TEST_TIME }} ZSTREAM_TESTTIME=-T${{ env.STANDARD_TEST_TIME }} make cmakebuild V=1
# Cross-platform cmake build with edge case: source paths containing spaces
# This test ensures cmake handles filesystem paths with spaces correctly
# across different operating systems and build generators
cmake-cross-platform-spaces:
name: "CMake Cross-Platform (Spaces in Path)"
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
generator: "Unix Makefiles"
name: "Linux"
- os: windows-latest
generator: "NMake Makefiles"
name: "Windows NMake"
- os: macos-latest
generator: "Unix Makefiles"
name: "macOS"
env:
SRC_DIR: "source directory with spaces"
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
with:
path: "${{ env.SRC_DIR }}"
- uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
if: ${{ matrix.generator == 'NMake Makefiles' }}
- name: "CMake build and install (${{ matrix.name }})"
run: |
# Test Release build with installation to verify packaging
cmake -S "${{ env.SRC_DIR }}/build/cmake" -B build -DBUILD_TESTING=ON -G "${{ matrix.generator }}" -DCMAKE_BUILD_TYPE=Release --install-prefix "${{ runner.temp }}/install"
cmake --build build --config Release
cmake --install build --config Release
# Windows-specific cmake testing with Visual Studio 2022
# Tests multiple generators and toolchains to ensure broad Windows compatibility
# including MSVC (x64, Win32, ARM64), MinGW, and Clang-CL with various architectures and optimizations
cmake-windows-comprehensive:
name: "CMake Windows VS2022 (${{ matrix.name }})"
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- generator: "Visual Studio 17 2022"
flags: "-A x64"
name: "MSVC x64"
runner: "windows-2022"
cmake_extra_flags: "-DCMAKE_COMPILE_WARNING_AS_ERROR=ON -DZSTD_BUILD_TESTS=ON"
- generator: "Visual Studio 17 2022"
flags: "-A Win32"
name: "MSVC Win32"
runner: "windows-2022"
cmake_extra_flags: "-DCMAKE_COMPILE_WARNING_AS_ERROR=ON -DZSTD_BUILD_TESTS=ON"
- generator: "Visual Studio 17 2022"
flags: "-A x64"
name: "MSVC x64 (No ZSTD_BUILD_TESTS)"
runner: "windows-2022"
# Intentionally omit ZSTD_BUILD_TESTS to reproduce the CXX language configuration bug
cmake_extra_flags: "-DCMAKE_COMPILE_WARNING_AS_ERROR=ON"
- generator: "Visual Studio 17 2022"
flags: "-A ARM64"
name: "MSVC ARM64"
runner: "windows-11-arm" # githuh runner for WOA instance
- generator: "MinGW Makefiles"
flags: ""
name: "MinGW"
runner: "windows-2022"
cmake_extra_flags: "-DCMAKE_COMPILE_WARNING_AS_ERROR=ON -DZSTD_BUILD_TESTS=ON"
- generator: "Visual Studio 17 2022"
flags: "-T ClangCL"
name: "Clang-CL"
runner: "windows-2022"
cmake_extra_flags: "-DCMAKE_COMPILE_WARNING_AS_ERROR=ON -DZSTD_BUILD_TESTS=ON"
- generator: "Visual Studio 17 2022"
flags: "-T ClangCL -A x64 -DCMAKE_C_FLAGS=/arch:AVX2"
name: "Clang-CL AVX2"
runner: "windows-2022"
cmake_extra_flags: "-DCMAKE_COMPILE_WARNING_AS_ERROR=ON -DZSTD_BUILD_TESTS=ON"
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@6fb02220983dee41ce7ae257b6f4d8f9bf5ed4ce # tag=v2.0.0
- name: "Configure CMake (${{ matrix.name }})"
run: |
cd build\cmake
mkdir build
cd build
cmake.exe -G "${{matrix.generator}}" ${{matrix.flags}} -DCMAKE_BUILD_TYPE=Debug ${{ matrix.cmake_extra_flags }} -DZSTD_ZSTREAM_FLAGS=-T${{ env.QUICK_TEST_TIME }} -DZSTD_FUZZER_FLAGS=-T${{ env.QUICK_TEST_TIME }} -DZSTD_FULLBENCH_FLAGS=-i0 ..
- name: "Build (${{ matrix.name }})"
run: |
cd build\cmake\build
cmake.exe --build .
- name: "Test (${{ matrix.name }})"
run: |
cd build\cmake\build
ctest.exe -V -C Debug
# macOS ARM64 (Apple Silicon) specific cmake testing
# Validates zstd builds and runs correctly on Apple Silicon architecture
# Uses native ARM64 hardware for optimal performance and compatibility testing
cmake-macos-arm64:
name: "CMake macOS ARM64 (Apple Silicon)"
runs-on: macos-14 # ARM64 runner
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
- name: "CMake build and test (ARM64)"
run: |
# Configure and build with ARM64-specific optimizations
cd build/cmake
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ${{ env.COMMON_CMAKE_FLAGS }} -DZSTD_ZSTREAM_FLAGS=-T${{ env.QUICK_TEST_TIME }} -DZSTD_FUZZER_FLAGS=-T${{ env.QUICK_TEST_TIME }} -DZSTD_FULLBENCH_FLAGS=-i1 ..
make -j$(sysctl -n hw.ncpu)
ctest -V
================================================
FILE: .github/workflows/commit.yml
================================================
name: facebook/zstd/commit
on:
push:
branches:
- dev
pull_request:
branches:
- dev
permissions: read-all
jobs:
short-tests-0:
runs-on: ubuntu-latest
services:
docker:
image: fbopensource/zstd-circleci-primary:0.0.1
options: --entrypoint /bin/bash
steps:
- uses: actions/checkout@v6.0.2
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install libcurl4-gnutls-dev
- name: Test
run: |
./tests/test-license.py
cc -v
CFLAGS="-O0 -Werror -pedantic" make allmost; make clean
make c99build; make clean
make c11build; make clean
make -j regressiontest; make clean
make check; make clean
make cxxtest; make clean
short-tests-1:
runs-on: ubuntu-latest
services:
docker:
image: fbopensource/zstd-circleci-primary:0.0.1
options: --entrypoint /bin/bash
steps:
- uses: actions/checkout@v6.0.2
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install gcc-powerpc-linux-gnu gcc-arm-linux-gnueabi gcc-aarch64-linux-gnu libc6-dev-ppc64-powerpc-cross libcurl4-gnutls-dev lib64gcc-13-dev-powerpc-cross
- name: gnu90 build
run: make gnu90build && make clean
- name: gnu99 build
run: make gnu99build && make clean
- name: ppc64 build
run: make ppc64build V=1 && make clean
- name: ppc build
run: make ppcbuild V=1 && make clean
- name: arm build
run: make armbuild V=1 && make clean
- name: aarch64 build
run: make aarch64build V=1 && make clean
- name: test-legacy
run: make -C tests test-legacy V=1 && make clean
- name: test-longmatch
run: make -C tests test-longmatch V=1 && make clean
- name: libzstd-nomt build
run: make -C lib libzstd-nomt V=1 && make clean
regression-test:
runs-on: ubuntu-latest
services:
docker:
image: fbopensource/zstd-circleci-primary:0.0.1
options: --entrypoint /bin/bash
env:
CIRCLE_ARTIFACTS: "/tmp/circleci-artifacts"
steps:
- uses: actions/checkout@v6.0.2
- name: restore_cache
uses: actions/cache@v5
with:
key: regression-cache-{{ checksum "tests/regression/data.c" }}-v0
path: tests/regression/cache
restore-keys: regression-cache-{{ checksum "tests/regression/data.c" }}-v0
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install libcurl4-gnutls-dev
- name: Regression Test
run: |
make -C programs zstd
make -C tests/regression test
mkdir -p $CIRCLE_ARTIFACTS
./tests/regression/test \
--cache tests/regression/cache \
--output $CIRCLE_ARTIFACTS/results.csv \
--zstd programs/zstd
echo "NOTE: The new results.csv is uploaded as an artifact to this job"
echo " If this fails, go to the Artifacts pane in CircleCI, "
echo " download /tmp/circleci-artifacts/results.csv, and if they "
echo " are still good, copy it into the repo and commit it."
echo "> diff tests/regression/results.csv $CIRCLE_ARTIFACTS/results.csv"
diff tests/regression/results.csv $CIRCLE_ARTIFACTS/results.csv
- uses: actions/upload-artifact@v7.0.0
with:
path: "/tmp/circleci-artifacts"
================================================
FILE: .github/workflows/dev-long-tests.yml
================================================
name: dev-long-tests
# Tests generally longer than 10mn
concurrency:
group: long-${{ github.ref }}
cancel-in-progress: true
on:
pull_request:
branches: [ dev, release, actionsTest ]
permissions: read-all
jobs:
# lasts ~7mn
make-all:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
- name: make all
run: make all
# lasts ~19mn
make-test:
runs-on: ubuntu-latest
env:
DEVNULLRIGHTS: 1
READFROMBLOCKDEVICE: 1
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
- name: make test
run: |
make test
make -j zstd
./tests/test_process_substitution.bash ./zstd
# lasts ~16mn
make-test-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
- name: make test on macos
run: make test
# lasts ~10mn
make-test-32bit:
runs-on: ubuntu-latest
env:
DEVNULLRIGHTS: 1
READFROMBLOCKDEVICE: 1
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
- name: make test # note: `make -j test success` seems to require a clean state
run: |
sudo apt-get -qqq update
make libc6install
make clean
CFLAGS="-m32 -O2" make -j test V=1
# lasts ~7mn
test-largeDictionary:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
- name: largeDictionary
run: |
CFLAGS="-Werror -O3" make -j -C tests test-largeDictionary
# lasts ~9mn
no-intrinsics-fuzztest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
- name: no intrinsics fuzztest
run: MOREFLAGS="-DZSTD_NO_INTRINSICS" make -C tests fuzztest
# lasts ~8mn
tsan-zstreamtest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
- name: thread sanitizer zstreamtest
run: CC=clang ZSTREAM_TESTTIME=-T3mn make tsan-test-zstream
uasan-zstreamtest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
- name: ub + address sanitizer on zstreamtest
run: CC=clang make uasan-test-zstream
# lasts ~11mn
tsan-fuzztest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
- name: thread sanitizer fuzztest
run: CC=clang make tsan-fuzztest
big-tests-zstreamtest32:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
- name: zstream tests in 32bit mode, with big tests
run: |
sudo apt-get -qqq update
make libc6install
CC=clang make -C tests test-zstream32 FUZZER_FLAGS="--big-tests"
# lasts ~13mn
gcc-8-asan-ubsan-testzstd:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
- name: gcc-8 + ASan + UBSan + Test Zstd
# See https://askubuntu.com/a/1428822
run: |
echo "deb [arch=amd64] http://archive.ubuntu.com/ubuntu focal main universe" | sudo tee -a /etc/apt/sources.list
sudo apt-get -qqq update
make gcc8install
CC=gcc-8 make -j uasan-test-zstd </dev/null V=1
clang-asan-ubsan-testzstd:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
- name: clang + ASan + UBSan + Test Zstd
run: CC=clang make -j uasan-test-zstd </dev/null V=1
gcc-asan-ubsan-testzstd-32bit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
- name: ASan + UBSan + Test Zstd, 32bit mode
run: |
sudo apt-get -qqq update
make libc6install
make -j uasan-test-zstd32 V=1
# Note : external libraries must be turned off when using MSAN tests,
# because they are not msan-instrumented,
# so any data coming from these libraries is always considered "uninitialized"
gcc-8-asan-ubsan-fuzz:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
- name: gcc-8 + ASan + UBSan + Fuzz Test
# See https://askubuntu.com/a/1428822
run: |
echo "deb [arch=amd64] http://archive.ubuntu.com/ubuntu focal main universe" | sudo tee -a /etc/apt/sources.list
sudo apt-get -qqq update
make gcc8install
CC=gcc-8 FUZZER_FLAGS="--long-tests" make clean uasan-fuzztest
clang-asan-ubsan-fuzz:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
- name: clang + ASan + UBSan + Fuzz Test
run: CC=clang FUZZER_FLAGS="--long-tests" make clean uasan-fuzztest
gcc-asan-ubsan-fuzz32:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
- name: ASan + UBSan + Fuzz Test 32bit
run: |
sudo apt-get -qqq update
make libc6install
CFLAGS="-O3 -m32" FUZZER_FLAGS="--long-tests" make uasan-fuzztest
clang-asan-fuzz32:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
- name: clang + ASan + Fuzz Test 32bit
run: |
sudo apt-get -qqq update
make libc6install
CC=clang CFLAGS="-O3 -m32" FUZZER_FLAGS="--long-tests" make asan-fuzztest
# The following test seems to have issues on github CI specifically,
# it does not provide the `__mulodi4` instruction emulation
# required for signed 64-bit multiplication.
# Replaced by asan-only test (above)
#
# clang-asan-ubsan-fuzz32:
# runs-on: ubuntu-20.04
# steps:
# - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
# - name: clang + ASan + UBSan + Fuzz Test 32bit
# run: |
# sudo apt-get -qqq update
# make libc6install
# CC=clang CFLAGS="-O3 -m32" FUZZER_FLAGS="--long-tests" make uasan-fuzztest
asan-ubsan-regression:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
- name: ASan + UBSan + Regression Test
run: make -j uasanregressiontest
clang-asan-ubsan-regression:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
- name: clang + ASan + UBSan + Regression Test
run: CC=clang make -j uasanregressiontest
msan-regression:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
- name: MSan + Regression Test
run: make -j msanregressiontest
clang-msan-fuzz-unoptimized:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
- name: clang + MSan + Fuzz Test
run: |
sudo apt-get -qqq update
sudo apt-get install clang
CC=clang MOREFLAGS="-O0" make clean msan-fuzztest
clang-msan-fuzz:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
- name: clang + MSan + Fuzz Test
run: |
sudo apt-get -qqq update
sudo apt-get install clang
CC=clang FUZZER_FLAGS="--long-tests" make clean msan-fuzztest
clang-msan-testzstd:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
- name: clang + MSan + Test Zstd
run: |
CC=clang make -j msan-test-zstd HAVE_ZLIB=0 HAVE_LZ4=0 HAVE_LZMA=0 V=1
armfuzz:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
- name: Qemu ARM emulation + Fuzz Test
run: |
sudo apt-get -qqq update
make arminstall
make armfuzz
valgrind-fuzz-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
- name: valgrind + fuzz test stack mode # ~ 7mn
shell: 'script -q -e -c "bash {0}"'
run: |
sudo apt-get -qqq update
make valgrindinstall
make -C tests test-valgrind
make clean
make -C tests test-fuzzer-stackmode
mingw-long-test:
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
- uses: msys2/setup-msys2@4f806de0a5a7294ffabaff804b38a9b435a73bda # tag=v2.30.0
with:
msystem: MINGW64
install: make
update: true
# Based on https://ariya.io/2020/07/on-github-actions-with-msys2
- name: install mingw gcc
run: pacman --noconfirm -S gcc
- name: MINGW64 gcc fuzztest
run: |
export CC="gcc"
export CXX="g++"
export FUZZERTEST="-T2mn"
export ZSTREAM_TESTTIME="-T2mn"
echo "Testing $CC $CXX MINGW64"
make -v
$CC --version
$CXX --version
make -C tests fuzztest
# lasts ~20mn
oss-fuzz:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sanitizer: [address, undefined, memory]
steps:
- name: Build Fuzzers (${{ matrix.sanitizer }})
id: build
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
with:
oss-fuzz-project-name: 'zstd'
dry-run: false
sanitizer: ${{ matrix.sanitizer }}
- name: Run Fuzzers (${{ matrix.sanitizer }})
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
with:
oss-fuzz-project-name: 'zstd'
fuzz-seconds: 600
dry-run: false
sanitizer: ${{ matrix.sanitizer }}
- name: Upload Crash
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # tag=v7.0.0
if: failure() && steps.build.outcome == 'success'
with:
name: ${{ matrix.sanitizer }}-artifacts
path: ./out/artifacts
================================================
FILE: .github/workflows/dev-short-tests.yml
================================================
name: dev-short-tests
# Faster tests: mostly build tests, along with some other
# misc tests
concurrency:
group: fast-${{ github.ref }}
cancel-in-progress: true
on:
pull_request:
branches: [ dev, release, actionsTest ]
permissions: read-all
jobs:
linux-kernel:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
- name: linux kernel, library + build + test
run: make -C contrib/linux-kernel test CFLAGS="-Werror -Wunused-const-variable -Wunused-but-set-variable"
benchmarking:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
- name: make benchmarking
run: make benchmarking
check-32bit: # designed to catch https://github.com/facebook/zstd/issues/2428
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
- name: make check on 32-bit
run: |
sudo apt update
APT_PACKAGES="gcc-multilib" make apt-install
CFLAGS="-m32 -O1 -fstack-protector" make check V=1
CFLAGS="-m32 -O1 -fstack-protector" make V=1 -C tests test-cli-tests
build-c89:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
- name: ensure zstd can be built with c89/c90 compilers (+ long long support + variadic macros)
run: |
make c89build V=1
build-zstd-dll:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
- name: build zstd bin against a dynamic lib (debuglevel for more dependencies)
run: |
make -C lib lib-mt-release
DEBUGLEVEL=2 make -C programs zstd-dll
gcc-7-libzstd:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
- name: gcc-7 + libzstdmt compilation
# See https://askubuntu.com/a/1428822
run: |
echo "deb [arch=amd64] http://archive.ubuntu.com/ubuntu focal main universe" | sudo tee -a /etc/apt/sources.list
sudo apt-get -qqq update
make gcc7install
CC=gcc-7 CFLAGS=-Werror make -j all
make clean
LDFLAGS=-Wl,--no-undefined make -C lib libzstd-mt
# candidate test (for discussion) : underlink test
# LDFLAGS=-Wl,--no-undefined : will make the linker fail if dll is underlinked
cpp-gnu90-c99-compatibility:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
- name: C++, gnu90 and c99 compatibility
run: |
make cxxtest
make clean
make gnu90build
make clean
make c99build
make clean
make travis-install # just ensures `make install` works
mingw-cross-compilation:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
- name: mingw cross-compilation
run: |
# sudo update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix; (doesn't work)
sudo apt-get -qqq update
sudo apt-get install gcc-mingw-w64
CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ CFLAGS="-Werror -O1" make zstd
armbuild:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
- name: ARM Build Test
run: |
sudo apt-get -qqq update
make arminstall
make armbuild
bourne-shell:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
- name: Bourne shell compatibility (shellcheck)
run: |
wget https://github.com/koalaman/shellcheck/releases/download/v0.7.1/shellcheck-v0.7.1.linux.x86_64.tar.xz
tar -xf shellcheck-v0.7.1.linux.x86_64.tar.xz
shellcheck-v0.7.1/shellcheck --shell=sh --severity=warning --exclude=SC2010 tests/playTests.sh
zlib-wrapper:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
- name: install valgrind
run: |
sudo apt-get -qqq update
make valgrindinstall V=1
- name: zlib wrapper test
run: make -C zlibWrapper test V=1
- name: zlib wrapper test under valgrind
run: make -C zlibWrapper test-valgrind V=1
lz4-threadpool-libs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
- name: LZ4, thread pool, and libs build testslib wrapper test
run: |
make -C tests test-lz4
make check < /dev/null | tee # mess with lz4 console detection
make clean
make -C tests test-pool
make clean
bash tests/libzstd_builds.sh
gcc-make-all-avx2:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
- name: Make all, with AVX2
run: |
sudo apt-get -qqq update
make libc6install
CFLAGS="-Werror -mavx2" make -j all
gcc-make-all-32bit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
- name: Make all, 32bit mode
run: |
sudo apt-get -qqq update
make libc6install
CFLAGS="-Werror -m32" make -j all32
gcc-make-all-32bit-avx2:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
- name: Make all, 32bit + AVX2 mode
run: |
sudo apt-get -qqq update
make libc6install
CPPFLAGS="-DSTATIC_BMI2=1" CFLAGS="-Werror -m32 -mavx2 -mbmi2" make -j all32
gcc-8-make:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
- name: gcc-8 build
# See https://askubuntu.com/a/1428822
run: |
echo "deb [arch=amd64] http://archive.ubuntu.com/ubuntu focal main universe" | sudo tee -a /etc/apt/sources.list
sudo apt-get -qqq update
make gcc8install
CC=gcc-8 CFLAGS="-Werror" make -j all
make-external-compressors:
strategy:
matrix:
include:
- name: "no external compressors"
flags: "HAVE_ZLIB=0 HAVE_LZ4=0 HAVE_LZMA=0"
- name: "only zlib"
flags: "HAVE_ZLIB=1 HAVE_LZ4=0 HAVE_LZMA=0"
- name: "only lz4"
flags: "HAVE_ZLIB=0 HAVE_LZ4=1 HAVE_LZMA=0"
- name: "only lzma"
flags: "HAVE_ZLIB=0 HAVE_LZ4=0 HAVE_LZMA=1"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
- name: Build with ${{matrix.name}}
run: |
sudo apt install liblzma-dev
${{matrix.flags}} make zstd
implicit-fall-through:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
- name: -Wimplicit-fallthrough build
run: |
make clean
CC=gcc MOREFLAGS="-Werror -Wimplicit-fallthrough=2 -O0" make -C lib -j libzstd.a ZSTD_LEGACY_SUPPORT=0
make clean
CC=clang MOREFLAGS="-Werror -Wimplicit-fallthrough -O0" make -C lib -j libzstd.a ZSTD_LEGACY_SUPPORT=0
meson-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
- name: Install packages
run: |
sudo apt-get update
sudo apt-get -y install build-essential python3-pip ninja-build liblz4-dev liblzma-dev
pip install --pre meson
- name: Build with Meson
run: |
meson setup \
--buildtype=debugoptimized \
-Db_lundef=false \
-Dauto_features=enabled \
-Dbin_programs=true \
-Dbin_tests=true \
-Dbin_contrib=true \
-Ddefault_library=both \
build/meson mesonBuild
ninja -C mesonBuild/
meson test -C mesonBuild/ --print-errorlogs
meson install -C mesonBuild --destdir staging/
meson-mingw-cross-compilation:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
- name: Install packages
run: |
sudo apt-get -qqq update
sudo apt-get -y install build-essential python3-pip ninja-build {gcc,g++}-mingw-w64-x86-64
pip install --pre meson
- name: Build with Meson
run: |
cat > cross.ini <<EOF
[binaries]
ar = 'x86_64-w64-mingw32-ar'
c = 'x86_64-w64-mingw32-gcc'
cpp = 'x86_64-w64-mingw32-g++'
ld = 'x86_64-w64-mingw32-ld'
objcopy = 'x86_64-w64-mingw32-objcopy'
objdump = 'x86_64-w64-mingw32-objdump'
strip = 'x86_64-w64-mingw32-strip'
windres = 'x86_64-w64-mingw32-windres'
[host_machine]
system = 'windows'
endian = 'little'
cpu_family = 'x86_64'
cpu = 'x86_64'
EOF
# pzstd doesn't build; skip -Dbin_contrib=true
meson setup \
--buildtype=debugoptimized \
--cross-file=cross.ini \
-Db_lundef=false \
-Dbin_programs=true \
-Dbin_tests=true \
-Ddefault_library=both \
build/meson builddir
ninja -C builddir/
if grep -- -pthread builddir/meson-private/libzstd.pc; then
echo "Error: found stray pthread dependency"
exit 1
fi
meson-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
- name: Install packages
run: pip install --pre meson
- name: Configure with Meson
run: |
meson setup --vsenv build/meson/ builddir -Dbin_tests=true -Dbin_programs=true -Dbin_contrib=true
- name: Build with Meson
run: |
meson compile -C builddir/
- name: Test with Meson
run: |
meson test -C builddir/ --print-errorlogs
- name: Install with Meson
run: |
meson install -C builddir --destdir staging/
msbuild-visual-studio:
strategy:
fail-fast: false # 'false' means Don't stop matrix workflows even if some matrix failed.
matrix:
include: [
{ name: "VS 2022 x64 Debug", platform: x64, configuration: Debug, toolset: v143, runner: "windows-2022", arch: "" },
{ name: "VS 2022 Win32 Debug", platform: Win32, configuration: Debug, toolset: v143, runner: "windows-2022", arch: "" },
{ name: "VS 2022 x64 Release", platform: x64, configuration: Release, toolset: v143, runner: "windows-2022", arch: ""},
{ name: "VS 2022 Win32 Release", platform: Win32, configuration: Release, toolset: v143, runner: "windows-2022", arch: ""},
{ name: "VS 2025 x64 Debug", platform: x64, configuration: Debug, toolset: v143, runner: "windows-2025", arch: ""},
{ name: "VS 2022 x64 Release AVX2", platform: x64, configuration: Release, toolset: v143, runner: "windows-2022", arch: "AdvancedVectorExtensions2" },
]
runs-on: ${{matrix.runner}}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@6fb02220983dee41ce7ae257b6f4d8f9bf5ed4ce # tag=v2.0.0
- name: Build ${{matrix.name}}
working-directory: ${{env.GITHUB_WORKSPACE}}
# See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference
if: ${{ matrix.arch == '' }}
run: >
msbuild "build\VS2010\zstd.sln" /m /verbosity:minimal /property:PlatformToolset=${{matrix.toolset}}
/t:Clean,Build /p:Platform=${{matrix.platform}} /p:Configuration=${{matrix.configuration}} /warnaserror
- name: Build ${{matrix.name}}
working-directory: ${{env.GITHUB_WORKSPACE}}
# See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference
if: ${{ matrix.arch != '' }}
run: >
msbuild "build\VS2010\zstd.sln" /m /verbosity:minimal /property:PlatformToolset=${{matrix.toolset}}
/t:Clean,Build /p:Platform=${{matrix.platform}} /p:Configuration=${{matrix.configuration}} /warnaserror
/p:InstructionSet=${{matrix.arch}}
# This tests that we don't accidentally grow the size too much.
# If the size grows intentionally, you can raise these numbers.
# But we do need to think about binary size, since it is a concern.
libzstd-size:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
- name: libzstd size test
run: |
make clean && make -j -C lib libzstd && ./tests/check_size.py lib/libzstd.so 1100000
make clean && make -j -C lib libzstd ZSTD_LIB_COMPRESSION=0 ZSTD_LIB_DICTBUILDER=0 && ./tests/check_size.py lib/libzstd.so 400000
make clean && make -j -C lib libzstd ZSTD_LIB_MINIFY=1 && ./tests/check_size.py lib/libzstd.so 300000
make clean && make -j -C lib libzstd ZSTD_LIB_MINIFY=1 ZSTD_LIB_COMPRESSION=0 ZSTD_LIB_DICTBUILDER=0 && ./tests/check_size.py lib/libzstd.so 80000
minimal-decompressor-macros:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
- name: minimal decompressor macros
run: |
make clean && make -j all ZSTD_LIB_MINIFY=1 MOREFLAGS="-Werror"
make clean && make check ZSTD_LIB_MINIFY=1 MOREFLAGS="-Werror"
make clean && make -j all MOREFLAGS="-Werror -DHUF_FORCE_DECOMPRESS_X1 -DZSTD_FORCE_DECOMPRESS_SEQUENCES_SHORT"
make clean && make check MOREFLAGS="-Werror -DHUF_FORCE_DECOMPRESS_X1 -DZSTD_FORCE_DECOMPRESS_SEQUENCES_SHORT"
make clean && make -j all MOREFLAGS="-Werror -DHUF_FORCE_DECOMPRESS_X2 -DZSTD_FORCE_DECOMPRESS_SEQUENCES_LONG"
make clean && make check MOREFLAGS="-Werror -DHUF_FORCE_DECOMPRESS_X2 -DZSTD_FORCE_DECOMPRESS_SEQUENCES_LONG"
make clean && make -j all MOREFLAGS="-Werror -DZSTD_NO_INLINE -DZSTD_STRIP_ERROR_STRINGS"
make clean && make check MOREFLAGS="-Werror -DZSTD_NO_INLINE -DZSTD_STRIP_ERROR_STRINGS"
make clean && make check ZSTD_LIB_EXCLUDE_COMPRESSORS_DFAST_AND_UP=1 MOREFLAGS="-Werror"
make clean && make check ZSTD_LIB_EXCLUDE_COMPRESSORS_GREEDY_AND_UP=1 MOREFLAGS="-Werror"
dynamic-bmi2:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
- name: dynamic bmi2 tests
run: |
make clean && make -j check MOREFLAGS="-O0 -Werror -mbmi2"
make clean && make -j check MOREFLAGS="-O0 -Werror -DDYNAMIC_BMI2=1"
make clean && make -j check MOREFLAGS="-O0 -Werror -DDYNAMIC_BMI2=1 -mbmi2"
make clean && make -j check MOREFLAGS="-O0 -Werror -DDYNAMIC_BMI2=0"
make clean && make -j check MOREFLAGS="-O0 -Werror -DDYNAMIC_BMI2=0 -mbmi2"
test-variants:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
- name: make all variants & validate
run: |
make -j -C programs allVariants MOREFLAGS=-O0
./tests/test-variants.sh
qemu-consistency:
name: QEMU ${{ matrix.name }}
runs-on: ubuntu-24.04
strategy:
fail-fast: false # 'false' means Don't stop matrix workflows even if some matrix failed.
matrix:
include: [
{ name: ARM, xcc_pkg: gcc-arm-linux-gnueabi, xcc: arm-linux-gnueabi-gcc, xemu_pkg: qemu-system-arm, xemu: qemu-arm-static },
{ name: ARM64, xcc_pkg: gcc-aarch64-linux-gnu, xcc: aarch64-linux-gnu-gcc, xemu_pkg: qemu-system-aarch64,xemu: qemu-aarch64-static },
{ name: PPC, xcc_pkg: gcc-powerpc-linux-gnu, xcc: powerpc-linux-gnu-gcc, xemu_pkg: qemu-system-ppc, xemu: qemu-ppc-static },
{ name: PPC64LE, xcc_pkg: gcc-powerpc64le-linux-gnu, xcc: powerpc64le-linux-gnu-gcc, xemu_pkg: qemu-system-ppc, xemu: qemu-ppc64le-static },
{ name: S390X, xcc_pkg: gcc-s390x-linux-gnu, xcc: s390x-linux-gnu-gcc, xemu_pkg: qemu-system-s390x, xemu: qemu-s390x-static },
{ name: MIPS, xcc_pkg: gcc-mips-linux-gnu, xcc: mips-linux-gnu-gcc, xemu_pkg: qemu-system-mips, xemu: qemu-mips-static },
{ name: RISC-V, xcc_pkg: gcc-14-riscv64-linux-gnu, xcc: riscv64-linux-gnu-gcc-14, xemu_pkg: qemu-system-riscv64,xemu: qemu-riscv64-static },
{ name: M68K, xcc_pkg: gcc-m68k-linux-gnu, xcc: m68k-linux-gnu-gcc, xemu_pkg: qemu-system-m68k, xemu: qemu-m68k-static },
{ name: SPARC, xcc_pkg: gcc-sparc64-linux-gnu, xcc: sparc64-linux-gnu-gcc, xemu_pkg: qemu-system-sparc, xemu: qemu-sparc64-static },
]
env: # Set environment variables
XCC: ${{ matrix.xcc }}
XEMU: ${{ matrix.xemu }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
- name: apt update & install
run: |
sudo apt-get update
sudo apt-get install gcc-multilib g++-multilib qemu-utils qemu-user-static
sudo apt-get install ${{ matrix.xcc_pkg }} ${{ matrix.xemu_pkg }}
- name: Environment info
run: |
echo && which $XCC
echo && $XCC --version
echo && $XCC -v # Show built-in specs
echo && which $XEMU
echo && $XEMU --version
- name: ARM
if: ${{ matrix.name == 'ARM' }}
run: |
LDFLAGS="-static" CC=$XCC QEMU_SYS=$XEMU make clean check
- name: ARM64
if: ${{ matrix.name == 'ARM64' }}
run: |
make clean
LDFLAGS="-static" CC=$XCC QEMU_SYS=$XEMU make -j check
LDFLAGS="-static" CC=$XCC QEMU_SYS=$XEMU make -j -C tests test-cli-tests
CFLAGS="-O3 -march=armv8.2-a+sve2" LDFLAGS="-static" CC=$XCC QEMU_SYS=$XEMU make -j check
CFLAGS="-O3 -march=armv8.2-a+sve2" LDFLAGS="-static" CC=$XCC QEMU_SYS=$XEMU make -j -C tests test-cli-tests
# This test is only compatible with standard libraries that support BTI (Branch Target Identification).
# Unfortunately, the standard library provided on Ubuntu 24.04 does not have this feature enabled.
# make clean
# LDFLAGS="-static -z force-bti" MOREFLAGS="-mbranch-protection=standard" CC=$XCC QEMU_SYS=$XEMU make check V=1
- name: PPC
if: ${{ matrix.name == 'PPC' }}
run: |
LDFLAGS="-static" CC=$XCC QEMU_SYS=$XEMU make clean check
- name: PPC64LE
if: ${{ matrix.name == 'PPC64LE' }}
run: |
LDFLAGS="-static" CC=$XCC QEMU_SYS=$XEMU make clean check
- name: S390X
if: ${{ matrix.name == 'S390X' }}
run: |
LDFLAGS="-static" CC=$XCC QEMU_SYS=$XEMU make clean check
- name: MIPS
if: ${{ matrix.name == 'MIPS' }}
run: |
LDFLAGS="-static" CC=$XCC QEMU_SYS=$XEMU make clean check
- name: RISC-V
if: ${{ matrix.name == 'RISC-V' }}
run: |
LDFLAGS="-static" CC=$XCC QEMU_SYS=$XEMU make clean check
CFLAGS="-march=rv64gcv -O3" LDFLAGS="-static -DMEM_FORCE_MEMORY_ACCESS=0" CC=$XCC QEMU_SYS="$XEMU -cpu rv64,v=true,vlen=128" make clean check
CFLAGS="-march=rv64gcv -O3" LDFLAGS="-static -DMEM_FORCE_MEMORY_ACCESS=0" CC=$XCC QEMU_SYS="$XEMU -cpu rv64,v=true,vlen=256" make clean check
CFLAGS="-march=rv64gcv -O3" LDFLAGS="-static -DMEM_FORCE_MEMORY_ACCESS=0" CC=$XCC QEMU_SYS="$XEMU -cpu rv64,v=true,vlen=512" make clean check
- name: M68K
if: ${{ matrix.name == 'M68K' }}
run: |
LDFLAGS="-static" CC=$XCC QEMU_SYS=$XEMU make clean check
- name: SPARC
if: ${{ matrix.name == 'SPARC' }}
run: |
LDFLAGS="-static" CC=$XCC QEMU_SYS=$XEMU make clean check
mingw-short-test:
runs-on: windows-latest
strategy:
fail-fast: false # 'false' means Don't stop matrix workflows even if some matrix failed.
matrix:
include: [
{ compiler: gcc, msystem: MINGW32, cflags: "-Werror"},
{ compiler: gcc, msystem: MINGW64, cflags: "-Werror"},
{ compiler: clang, msystem: MINGW64, cflags: "--target=x86_64-w64-mingw32 -Werror -Wconversion -Wno-sign-conversion -Wno-unused-command-line-argument"},
]
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
- uses: msys2/setup-msys2@4f806de0a5a7294ffabaff804b38a9b435a73bda # tag=v2.30.0
with:
msystem: ${{ matrix.msystem }}
install: make diffutils
update: true
# Based on https://ariya.io/2020/07/on-github-actions-with-msys2
- name: install mingw gcc i686
if: ${{ (matrix.msystem == 'MINGW32') && (matrix.compiler == 'gcc') }}
run: pacman --noconfirm -S mingw-w64-i686-gcc
- name: install mingw gcc x86_64
if: ${{ (matrix.msystem == 'MINGW64') && (matrix.compiler == 'gcc') }}
run: pacman --noconfirm -S mingw-w64-x86_64-gcc
- name: install mingw clang i686
if: ${{ (matrix.msystem == 'MINGW32') && (matrix.compiler == 'clang') }}
run: pacman --noconfirm -S mingw-w64-i686-clang
- name: install mingw clang x86_64
if: ${{ (matrix.msystem == 'MINGW64') && (matrix.compiler == 'clang') }}
run: pacman --noconfirm -S mingw-w64-x86_64-clang
- name: run mingw tests
run: |
make -v
export CC=${{ matrix.compiler }}
$CC --version
CFLAGS="${{ matrix.cflags }}" make -j allzstd
echo "Testing $CC ${{ matrix.msystem }}"
make clean
MSYS="" make check
visual-runtime-tests:
runs-on: windows-latest
strategy:
matrix:
platform: [x64, Win32]
configuration: [Release]
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@6fb02220983dee41ce7ae257b6f4d8f9bf5ed4ce # tag=v2.0.0
- name: Build and run tests
working-directory: ${{env.GITHUB_WORKSPACE}}
env:
ZSTD_BIN: ./zstd.exe
DATAGEN_BIN: ./datagen.exe
# See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference
run: |
msbuild "build\VS2010\zstd.sln" /m /verbosity:minimal /property:PlatformToolset=v142 /t:Clean,Build /p:Platform=${{matrix.platform}} /p:Configuration=${{matrix.configuration}}
COPY build\VS2010\bin\${{matrix.platform}}_${{matrix.configuration}}\*.exe tests\
CD tests
sh -e playTests.sh
.\fuzzer.exe -T2m
# Following instructions at: https://github.com/marketplace/actions/install-cygwin-action
cygwin-tests:
runs-on: windows-latest
steps:
- run: git config --global core.autocrlf input
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
- uses: cygwin/cygwin-install-action@711d29f3da23c9f4a1798e369a6f01198c13b11a # tag=v6
with:
platform: x86_64
packages: >-
autoconf,
automake,
gcc-g++,
make,
mingw64-x86_64-gcc-g++,
patch,
perl
- name: cygwin tests
shell: C:\cygwin\bin\bash.exe --noprofile --norc -eo pipefail '{0}'
run: >-
export PATH=/usr/bin:$(cygpath ${SYSTEMROOT})/system32 &&
export CFLAGS="-Werror -O1" &&
ls &&
make -j allzstd &&
make -C tests fuzzer &&
./tests/fuzzer.exe -v -T1m
- name: cygwin install test
shell: C:\cygwin\bin\bash.exe --noprofile --norc -eo pipefail '{0}'
run: >-
make -j &&
make install
pkg-config:
runs-on: ubuntu-latest
container:
image: debian:testing
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
- name: Install dependencies
run: |
apt -y update
apt -y install --no-install-recommends gcc libc6-dev make pkg-config
- name: Build and install
run: make -C lib install
- name: Test pkg-config
run: |
cc -Wall -Wextra -Wpedantic -Werror -o simple examples/simple_compression.c $(pkg-config --cflags --libs libzstd)
./simple LICENSE
versions-compatibility:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
- name: Versions Compatibility Test
run: |
make -C tests versionsTest
clangbuild:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
- name: make clangbuild
run: |
make clangbuild
gcc-pgo:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
- name: Build PGO Zstd with GCC
env:
CC: gcc
run: |
make -C programs zstd-pgo
./programs/zstd -b
clang-pgo:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
- name: Build PGO Zstd with Clang
env:
CC: clang
run: |
sudo apt install -y llvm
llvm-profdata --version
make -C programs zstd-pgo
./programs/zstd -b
musl-build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
- name: Install musl-tools
run: |
sudo apt install -y musl-tools
- name: Compile with musl-gcc and test-zstd
run: |
CC=musl-gcc CFLAGS="-Werror -O3" CPPFLAGS=-DZDICT_QSORT=ZDICT_QSORT_C90 make -j -C tests test-zstd V=1
intel-cet-compatibility:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
- name: Build Zstd
run: |
make -j zstd V=1
readelf -n zstd
- name: Get Intel SDE
run: |
curl -LO https://downloadmirror.intel.com/813591/sde-external-9.33.0-2024-01-07-lin.tar.xz
tar xJvf sde-external-9.33.0-2024-01-07-lin.tar.xz
- name: Configure Permissions
run: |
echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope
- name: Run Under SDE
run: |
sde-external-9.33.0-2024-01-07-lin/sde -cet -cet-raise 0 -cet-endbr-exe -cet-stderr -cet-abort -- ./zstd -b3
icx:
# install instructions: https://www.intel.com/content/www/us/en/docs/oneapi/installation-guide-linux/2025-0/apt-005.html
name: icx-check
runs-on: ubuntu-latest
steps:
- name: install icx
run: |
# download the key to system keyring
wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB \
| gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null
# add signed entry to apt sources and configure the APT client to use Intel repository:
echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
sudo apt-get update
sudo apt-get install -y intel-basekit intel-hpckit
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
- name: make check
run: |
source /opt/intel/oneapi/setvars.sh
make CC=icx check
make CC=icx -C tests test-cli-tests
================================================
FILE: .github/workflows/nightly.yml
================================================
name: facebook/zstd/nightly
on:
schedule:
- cron: '0 0 * * *'
push:
branches:
- release
- dev
- '*nightly*'
permissions: read-all
jobs:
regression-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6.0.2
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y libcurl4-openssl-dev
- name: Regression Test
run: |
make -C programs zstd
make -C tests/regression test
# Longer tests
#- make -C tests test-zstd-nolegacy && make clean
#- pyenv global 3.4.4; make -C tests versionsTest && make clean
#- make zlibwrapper && make clean
#- gcc -v; make -C tests test32 MOREFLAGS="-I/usr/include/x86_64-linux-gnu" && make clean
#- make uasan && make clean
#- make asan32 && make clean
#- make -C tests test32 CC=clang MOREFLAGS="-g -fsanitize=address -I/usr/include/x86_64-linux-gnu"
# Valgrind tests
#- CFLAGS="-O1 -g" make -C zlibWrapper valgrindTest && make clean
#- make -C tests valgrindTest && make clean
# ARM, AArch64, PowerPC, PowerPC64 tests
#- make ppctest && make clean
#- make ppc64test && make clean
#- make armtest && make clean
#- make aarch64test && make clean
================================================
FILE: .github/workflows/publish-release-artifacts.yml
================================================
name: publish-release-artifacts
on:
release:
types:
- published
permissions: read-all
jobs:
publish-release-artifacts:
permissions:
contents: write # to fetch code and upload artifacts
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
- name: Archive
env:
RELEASE_SIGNING_KEY: ${{ secrets.RELEASE_SIGNING_KEY }}
RELEASE_SIGNING_KEY_PASSPHRASE: ${{ secrets.RELEASE_SIGNING_KEY_PASSPHRASE }}
run: |
# compute file name
export TAG="$(echo "$GITHUB_REF" | sed -n 's_^refs/tags/__p')"
if [ -z "$TAG" ]; then
echo "action must be run on a tag. GITHUB_REF is not a tag: $GITHUB_REF"
exit 1
fi
# Attempt to extract "1.2.3" from "v1.2.3" to maintain artifact name backwards compat.
# Otherwise, degrade to using full tag.
export VERSION="$(echo "$TAG" | sed 's_^v\([0-9]\+\.[0-9]\+\.[0-9]\+\)$_\1_')"
export ZSTD_VERSION="zstd-$VERSION"
# archive
git archive $TAG \
--prefix $ZSTD_VERSION/ \
--format tar \
-o $ZSTD_VERSION.tar
# Do the rest of the work in a sub-dir so we can glob everything we want to publish.
mkdir artifacts/
mv $ZSTD_VERSION.tar artifacts/
cd artifacts/
# compress
zstd -k -19 $ZSTD_VERSION.tar
gzip -k -9 $ZSTD_VERSION.tar
# we only publish the compressed tarballs
rm $ZSTD_VERSION.tar
# hash
sha256sum $ZSTD_VERSION.tar.zst > $ZSTD_VERSION.tar.zst.sha256
sha256sum $ZSTD_VERSION.tar.gz > $ZSTD_VERSION.tar.gz.sha256
# sign
if [ -n "$RELEASE_SIGNING_KEY" ]; then
export GPG_BATCH_OPTS="--batch --no-use-agent --pinentry-mode loopback --no-tty --yes"
echo "$RELEASE_SIGNING_KEY" | gpg $GPG_BATCH_OPTS --import
gpg $GPG_BATCH_OPTS --armor --sign --sign-with signing@zstd.net --detach-sig --passphrase "$RELEASE_SIGNING_KEY_PASSPHRASE" --output $ZSTD_VERSION.tar.zst.sig $ZSTD_VERSION.tar.zst
gpg $GPG_BATCH_OPTS --armor --sign --sign-with signing@zstd.net --detach-sig --passphrase "$RELEASE_SIGNING_KEY_PASSPHRASE" --output $ZSTD_VERSION.tar.gz.sig $ZSTD_VERSION.tar.gz
fi
- name: Publish
uses: skx/github-action-publish-binaries@b9ca5643b2f1d7371a6cba7f35333f1461bbc703 # tag=release-2.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: artifacts/*
================================================
FILE: .github/workflows/release_check.yml
================================================
name: release_checks
on:
push:
branches:
- release
pull_request:
branches:
- release
permissions: read-all
jobs:
verify-manual:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v6.0.2
- name: Save current manual
run: mv doc/zstd_manual.html doc/zstd_manual_saved.html
- name: Generate new manual
run: make manual
- name: Compare manuals
run: |
if ! cmp -s doc/zstd_manual.html doc/zstd_manual_saved.html; then
echo "The API manual was not updated before release !"
exit 1
fi
verify-man-pages:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v6.0.2
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y ruby ruby-dev
sudo gem install ronn
- name: Display ronn version
run: ronn --version
- name: Save current man pages
run: |
mv programs/zstd.1 programs/zstd.1.saved
mv programs/zstdgrep.1 programs/zstdgrep.1.saved
mv programs/zstdless.1 programs/zstdless.1.saved
- name: Generate new manual pages
run: make -C programs man
- name: Compare man pages
run: |
for file in zstd.1 zstdgrep.1 zstdless.1; do
if ! cmp -s programs/$file programs/$file.saved; then
echo "The man page $file should have been updated."
exit 1
fi
done
================================================
FILE: .github/workflows/scorecards.yml
================================================
name: Scorecards supply-chain security
on:
# Only the default branch is supported.
branch_protection_rule:
schedule:
- cron: '22 21 * * 2'
push:
# TODO: Add release branch when supported?
branches: [ "dev" ]
# Declare default permissions as read only.
permissions: read-all
jobs:
analysis:
name: Scorecards analysis
if: github.repository == 'facebook/zstd'
runs-on: ubuntu-latest
permissions:
# Needed to upload the results to code-scanning dashboard.
security-events: write
# Used to receive a badge.
id-token: write
# Needs for private repositories.
contents: read
actions: read
steps:
- name: "Checkout code"
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
with:
persist-credentials: false
- name: "Run analysis"
uses: ossf/scorecard-action@f49aabe0b5af0936a0987cfb85d86b75731b0186 # tag=v2.4.1
with:
results_file: results.sarif
results_format: sarif
# (Optional) Read-only PAT token. Uncomment the `repo_token` line below if:
# - you want to enable the Branch-Protection check on a *public* repository, or
# - you are installing Scorecards on a *private* repository
# To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-pat.
# repo_token: ${{ secrets.SCORECARD_READ_TOKEN }}
# Publish the results for public repositories to enable scorecard badges. For more details, see
# https://github.com/ossf/scorecard-action#publishing-results.
# For private repositories, `publish_results` will automatically be set to `false`, regardless
# of the value entered here.
publish_results: true
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # tag=v7.0.0
with:
name: SARIF file
path: results.sarif
retention-days: 5
# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@0499de31b99561a6d14a36a5f662c2a54f91beee # tag=v4.31.2
with:
sarif_file: results.sarif
================================================
FILE: .github/workflows/windows-artifacts.yml
================================================
name: windows-artifacts
on:
push:
branches: [ test_artifacts, win_artifacts, release ]
release:
types:
- published
permissions: read-all
jobs:
windows-artifacts:
permissions:
contents: write # to fetch code and upload artifacts
# For msys2, see https://ariya.io/2020/07/on-github-actions-with-msys2
runs-on: ${{ matrix.shell == 'cmake' && 'windows-11-arm' || 'windows-latest' }}
strategy:
# For msys2, see https://github.com/msys2/setup-msys2
matrix:
include:
- { msystem: mingw64, env: x86_64, ziparch: win64, shell: msys2 }
- { msystem: mingw32, env: i686, ziparch: win32, shell: msys2 }
- { msystem: null, env: arm64, ziparch: win-arm64, shell: cmake }
defaults:
run:
shell: ${{ matrix.shell == 'cmake' && 'pwsh' || 'msys2 {0}' }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2
# MSYS2 setup
- uses: msys2/setup-msys2@4f806de0a5a7294ffabaff804b38a9b435a73bda # tag=v2.30.0
if: matrix.shell == 'msys2'
with:
msystem: ${{ matrix.msystem }}
install: make p7zip git mingw-w64-${{matrix.env}}-gcc
update: true
- name: display versions (MSYS2)
if: matrix.shell == 'msys2'
run: |
make -v
cc -v
- name: display versions (CMake)
if: matrix.shell == 'cmake'
run: |
cmake --version
# Build dependencies (MSYS2 only)
- name: Building zlib to static link
if: matrix.shell == 'msys2'
run: |
git clone --depth 1 --branch v1.3.1 https://github.com/madler/zlib
make -C zlib -f win32/Makefile.gcc libz.a
- name: Building lz4 to static link
if: matrix.shell == 'msys2'
run: |
git clone --depth 1 --branch v1.10.0 https://github.com/lz4/lz4
# ensure both libraries use the same version of libxxhash
cp lib/common/xxhash.* lz4/lib
CPPFLAGS=-DXXH_NAMESPACE=LZ4_ make -C lz4/lib liblz4.a V=1
# Build zstd
- name: Building zstd programs
if: matrix.shell == 'msys2'
run: |
CPPFLAGS="-I../zlib -I../lz4/lib" LDFLAGS=-static make -j allzstd V=1 HAVE_ZLIB=1 HAVE_LZ4=1 HAVE_LZMA=0 LDLIBS="../zlib/libz.a ../lz4/lib/liblz4.a"
- name: Build zstd (CMake ARM64)
if: matrix.shell == 'cmake'
run: |
cd build\cmake
mkdir build
cd build
cmake.exe -G "Visual Studio 17 2022" -A ARM64 -DCMAKE_BUILD_TYPE=Release -DZSTD_BUILD_PROGRAMS=ON -DZSTD_BUILD_SHARED=ON -DZSTD_BUILD_STATIC=ON ..
cmake.exe --build . --config Release --parallel
- name: Create artifacts (MSYS2)
if: matrix.shell == 'msys2'
run: |
./lib/dll/example/build_package.bat || exit 1
mv bin/ zstd-${{ github.ref_name }}-${{matrix.ziparch}}/
- name: Create artifacts (CMake)
if: matrix.shell == 'cmake'
run: |
.\lib\dll\example\build_package.bat
if ($LASTEXITCODE -ne 0) { exit 1 }
mv bin/ zstd-${{ github.ref_name }}-${{matrix.ziparch}}/
- name: Publish zstd-$VERSION-${{matrix.ziparch}}.zip for manual inspection
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # tag=v7.0.0
with:
compression-level: 9 # maximum compression
if-no-files-found: error # defaults to `warn`
path: ${{ github.workspace }}/zstd-${{ github.ref_name }}-${{matrix.ziparch}}/
name: zstd-${{ github.ref_name }}-${{matrix.ziparch}}
- name: Package artifact for upload (MSYS2)
if: matrix.shell == 'msys2'
run: |
7z a -tzip -mx9 "$(cygpath -u '${{ github.workspace }}/zstd-${{ github.ref_name }}-${{ matrix.ziparch }}.zip')" "$(cygpath -u '${{ github.workspace }}/zstd-${{ github.ref_name }}-${{ matrix.ziparch }}')"
- name: Package artifact for upload (CMake)
if: matrix.shell == 'cmake'
run: |
Compress-Archive -Path "zstd-${{ github.ref_name }}-${{ matrix.ziparch }}" -DestinationPath "zstd-${{ github.ref_name }}-${{ matrix.ziparch }}.zip" -CompressionLevel Optimal
- name: Upload release asset
if: github.event_name == 'release'
shell: pwsh
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload "${{ github.ref_name }}" "$env:GITHUB_WORKSPACE/zstd-${{ github.ref_name }}-${{ matrix.ziparch }}.zip" --clobber
================================================
FILE: .gitignore
================================================
# Object files
*.o
*.ko
*.dSYM
# Libraries
*.lib
*.a
# Shared objects (inc. Windows DLLs)
*.dll
*.so
*.so.*
*.dylib
*.framework
*.xcframework
# Executables
/zstd
zstdmt
*.exe
*.out
*.app
# Build artefacts
contrib/linux-kernel/linux/
projects/
bin/
.buckd/
buck-out/
build-*
*.gcda
cmakebuild/
cmake-build/
# Test artefacts
tmp*
*.zst
*.zstd
dictionary.
dictionary
NUL
install/
# IDE
.clang_complete
compile_flags.txt
.clang-format
# Other files
.directory
_codelite/
_zstdbench/
*.idea
*.swp
.DS_Store
googletest/
*.d
*.vscode
*.code-workspace
compile_commands.json
.clangd
perf.data
perf.data.old
================================================
FILE: CHANGELOG
================================================
v1.6.0 (Dec 2025)
api: legacy format support is now disabled by default
build: `ZSTD_LEGACY_SUPPORT` defaults to `0` in Makefile and CMake
V1.5.7 (Feb 2025)
fix: compression bug in 32-bit mode associated with long-lasting sessions
api: new method `ZSTD_compressSequencesAndLiterals()` (#4217, #4232)
api: `ZSTD_getFrameHeader()` works on skippable frames (#4228)
perf: substantial compression speed improvements (up to +30%) on small data, by @TocarIP (#4144) and @cyan4973 (#4165)
perf: improved compression speed (~+5%) for dictionary compression at low levels (#4170)
perf: much faster speed for `--patch-from` at high compression levels (#4276)
perf: higher `--patch-from` compression ratios, notably at high levels (#4288)
perf: better speed for binaries on Windows (@pps83) and when compiled with Visual Studio (@MessyHack)
perf: slight compression ratio improvement thanks to better block boundaries (#4136, #4176, #4178)
perf: slight compression ratio improvement for `dfast`, aka levels 3 and 4 (#4171)
perf: runtime bmi2 detection enabled on x86 32-bit mode (#4251)
cli: multi-threading as default CLI setting, by @daniellerozenblit
cli: new `--max` command (#4290)
build: improve `msbuild` version autodetection, support VS2022, by @ManuelBlanc
build: fix `meson` build by @artem and @Victor-C-Zhang, and on Windows by @bgilbert
build: compatibility with Apple Framework, by @Treata11
build: improve icc/icx compatibility, by @josepho0918 and @luau-project
build: improve compatibility with Android NDK, by Adenilson Cavalcanti
portability: linux kernel branch, with improved support for Sequence producers (@embg, @gcabiddu, @cyan4973)
portability: improved qnx compatibility, suggested by @rainbowball
portability: improved install script for FreeBSD, by @sunpoet
portability: fixed test suite compatibility with gnu hurd, by @diegonc
doc: clarify specification, by @elasota
misc: improved tests/decodecorpus validation tool (#4102), by antmicro
V1.5.6 (Mar 2024)
api: Promote `ZSTD_c_targetCBlockSize` to Stable API by @felixhandte
api: new `ZSTD_d_maxBlockSize` experimental parameter, to reduce streaming decompression memory, by @terrelln
perf: improve performance of param `ZSTD_c_targetCBlockSize`, by @Cyan4973
perf: improved compression of arrays of integers at high compression, by @Cyan4973
lib: reduce binary size with selective build-time exclusion, by @felixhandte
lib: improved huffman speed on small data and linux kernel, by @terrelln
lib: accept dictionaries with partial literal tables, by @terrelln
lib: fix CCtx size estimation with external sequence producer, by @embg
lib: fix corner case decoder behaviors, by @Cyan4973 and @aimuz
lib: fix zdict prototype mismatch in static_only mode, by @ldv-alt
lib: fix several bugs in magicless-format decoding, by @embg
cli: add common compressed file types to `--exclude-compressed`` by @daniellerozenblit
cli: fix mixing `-c` and `-o` commands with `--rm`, by @Cyan4973
cli: fix erroneous exclusion of hidden files with `--output-dir-mirror` by @felixhandte
cli: improved time accuracy on BSD, by @felixhandte
cli: better errors on argument parsing, by @KapJI
tests: better compatibility with older versions of `grep`, by @Cyan4973
tests: lorem ipsum generator as default backup content, by @Cyan4973
build: cmake improvements by @terrelln, @sighingnow, @gjasny, @JohanMabille, @Saverio976, @gruenich, @teo-tsirpanis
build: bazel support, by @jondo2010
build: fix cross-compiling for AArch64 with lld by @jcelerier
build: fix Apple platform compatibility, by @nidhijaju
build: fix Visual 2012 and lower compatibility, by @Cyan4973
build: improve win32 support, by @DimitriPapadopoulos
build: better C90 compliance for zlibWrapper, by @emaste
port: make: fat binaries on macos, by @mredig
port: ARM64EC compatibility for Windows, by @dunhor
port: QNX support by @klausholstjacobsen
port: MSYS2 and Cygwin makefile installation and test support, by @QBos07
port: risc-v support validation in CI, by @Cyan4973
port: sparc64 support validation in CI, by @Cyan4973
port: AIX compatibility, by @likema
port: HP-UX compatibility, by @likema
doc: Improved specification accuracy, by @elasota
bug: Fix and deprecate ZSTD_generateSequences (#3981)
v1.5.5 (Apr 2023)
fix: fix rare corruption bug affecting the high compression mode, reported by @danlark1 (#3517, @terrelln)
perf: improve mid-level compression speed (#3529, #3533, #3543, @yoniko and #3552, @terrelln)
lib: deprecated bufferless block-level API (#3534) by @terrelln
cli: mmap large dictionaries to save memory, by @daniellerozenblit
cli: improve speed of --patch-from mode (~+50%) (#3545) by @daniellerozenblit
cli: improve i/o speed (~+10%) when processing lots of small files (#3479) by @felixhandte
cli: zstd no longer crashes when requested to write into write-protected directory (#3541) by @felixhandte
cli: fix decompression into block device using -o, reported by @georgmu (#3583)
build: fix zstd CLI compiled with lzma support but not zlib support (#3494) by @Hello71
build: fix cmake does no longer require 3.18 as minimum version (#3510) by @kou
build: fix MSVC+ClangCL linking issue (#3569) by @tru
build: fix zstd-dll, version of zstd CLI that links to the dynamic library (#3496) by @yoniko
build: fix MSVC warnings (#3495) by @embg
doc: updated zstd specification to clarify corner cases, by @Cyan4973
doc: document how to create fat binaries for macos (#3568) by @rickmark
misc: improve seekable format ingestion speed (~+100%) for very small chunk sizes (#3544) by @Cyan4973
misc: tests/fullbench can benchmark multiple files (#3516) by @dloidolt
v1.5.4 (Feb 2023)
perf: +20% faster huffman decompression for targets that can't compile x64 assembly (#3449, @terrelln)
perf: up to +10% faster streaming compression at levels 1-2 (#3114, @embg)
perf: +4-13% for levels 5-12 by optimizing function generation (#3295, @terrelln)
pref: +3-11% compression speed for `arm` target (#3199, #3164, #3145, #3141, #3138, @JunHe77 and #3139, #3160, @danlark1)
perf: +5-30% faster dictionary compression at levels 1-4 (#3086, #3114, #3152, @embg)
perf: +10-20% cold dict compression speed by prefetching CDict tables (#3177, @embg)
perf: +1% faster compression by removing a branch in ZSTD_fast_noDict (#3129, @felixhandte)
perf: Small compression ratio improvements in high compression mode (#2983, #3391, @Cyan4973 and #3285, #3302, @daniellerozenblit)
perf: small speed improvement by better detecting `STATIC_BMI2` for `clang` (#3080, @TocarIP)
perf: Improved streaming performance when `ZSTD_c_stableInBuffer` is set (#2974, @Cyan4973)
cli: Asynchronous I/O for improved cli speed (#2975, #2985, #3021, #3022, @yoniko)
cli: Change `zstdless` behavior to align with `zless` (#2909, @binhdvo)
cli: Keep original file if `-c` or `--stdout` is given (#3052, @dirkmueller)
cli: Keep original files when result is concatenated into a single output with `-o` (#3450, @Cyan4973)
cli: Preserve Permissions and Ownership of regular files (#3432, @felixhandte)
cli: Print zlib/lz4/lzma library versions with `-vv` (#3030, @terrelln)
cli: Print checksum value for single frame files with `-lv` (#3332, @Cyan4973)
cli: Print `dictID` when present with `-lv` (#3184, @htnhan)
cli: when `stderr` is *not* the console, disable status updates, but preserve final summary (#3458, @Cyan4973)
cli: support `--best` and `--no-name` in `gzip` compatibility mode (#3059, @dirkmueller)
cli: support for `posix` high resolution timer `clock_gettime()`, for improved benchmark accuracy (#3423, @Cyan4973)
cli: improved help/usage (`-h`, `-H`) formatting (#3094, @dirkmueller and #3385, @jonpalmisc)
cli: Fix better handling of bogus numeric values (#3268, @ctkhanhly)
cli: Fix input consists of multiple files _and_ `stdin` (#3222, @yoniko)
cli: Fix tiny files passthrough (#3215, @cgbur)
cli: Fix for `-r` on empty directory (#3027, @brailovich)
cli: Fix empty string as argument for `--output-dir-*` (#3220, @embg)
cli: Fix decompression memory usage reported by `-vv --long` (#3042, @u1f35c, and #3232, @zengyijing)
cli: Fix infinite loop when empty input is passed to trainer (#3081, @terrelln)
cli: Fix `--adapt` doesn't work when `--no-progress` is also set (#3354, @terrelln)
api: Support for Block-Level Sequence Producer (#3333, @embg)
api: Support for in-place decompression (#3432, @terrelln)
api: New `ZSTD_CCtx_setCParams()` function, set all parameters defined in a `ZSTD_compressionParameters` structure (#3403, @Cyan4973)
api: Streaming decompression detects incorrect header ID sooner (#3175, @Cyan4973)
api: Window size resizing optimization for edge case (#3345, @daniellerozenblit)
api: More accurate error codes for busy-loop scenarios (#3413, #3455, @Cyan4973)
api: Fix limit overflow in `compressBound` and `decompressBound` (#3362, #3373, Cyan4973) reported by @nigeltao
api: Deprecate several advanced experimental functions: streaming (#3408, @embg), copy (#3196, @mileshu)
bug: Fix corruption that rarely occurs in 32-bit mode with wlog=25 (#3361, @terrelln)
bug: Fix for block-splitter (#3033, @Cyan4973)
bug: Fixes for Sequence Compression API (#3023, #3040, @Cyan4973)
bug: Fix leaking thread handles on Windows (#3147, @animalize)
bug: Fix timing issues with cmake/meson builds (#3166, #3167, #3170, @Cyan4973)
build: Allow user to select legacy level for cmake (#3050, @shadchin)
build: Enable legacy support by default in cmake (#3079, @niamster)
build: Meson build script improvements (#3039, #3120, #3122, #3327, #3357, @eli-schwartz and #3276, @neheb)
build: Add aarch64 to supported architectures for zstd_trace (#3054, @ooosssososos)
build: support AIX architecture (#3219, @qiongsiwu)
build: Fix `ZSTD_LIB_MINIFY` build macro, which now reduces static library size by half (#3366, @terrelln)
build: Fix Windows issues with Multithreading translation layer (#3364, #3380, @yoniko) and ARM64 target (#3320, @cwoffenden)
build: Fix `cmake` script (#3382, #3392, @terrelln and #3252 @Tachi107 and #3167 @Cyan4973)
doc: Updated man page, providing more details for `--train` mode (#3112, @Cyan4973)
doc: Add decompressor errata document (#3092, @terrelln)
misc: Enable Intel CET (#2992, #2994, @hjl-tools)
misc: Fix `contrib/` seekable format (#3058, @yhoogstrate and #3346, @daniellerozenblit)
misc: Improve speed of the one-file library generator (#3241, @wahern and #3005, @cwoffenden)
v1.5.3 (dev version, unpublished)
v1.5.2 (Jan, 2022)
perf: Regain Minimal memset()-ing During Reuse of Compression Contexts (@Cyan4973, #2969)
build: Build Zstd with `noexecstack` on All Architectures (@felixhandte, #2964)
doc: Clarify Licensing (@terrelln, #2981)
v1.5.1 (Dec, 2021)
perf: rebalanced compression levels, to better match the intended speed/level curve, by @senhuang42
perf: faster huffman decoder, using x64 assembly, by @terrelln
perf: slightly faster high speed modes (strategies fast & dfast), by @felixhandte
perf: improved binary size and faster compilation times, by @terrelln
perf: new row64 mode, used notably in level 12, by @senhuang42
perf: faster mid-level compression speed in presence of highly repetitive patterns, by @senhuang42
perf: minor compression ratio improvements for small data at high levels, by @cyan4973
perf: reduced stack usage (mostly useful for Linux Kernel), by @terrelln
perf: faster compression speed on incompressible data, by @bindhvo
perf: on-demand reduced ZSTD_DCtx state size, using build macro ZSTD_DECODER_INTERNAL_BUFFER, at a small cost of performance, by @bindhvo
build: allows hiding static symbols in the dynamic library, using build macro, by @skitt
build: support for m68k (Motorola 68000's), by @cyan4973
build: improved AIX support, by @Helflym
build: improved meson unofficial build, by @eli-schwartz
cli : custom memory limit when training dictionary (#2925), by @embg
cli : report advanced parameters information when compressing in very verbose mode (`-vv`), by @Svetlitski-FB
v1.5.0 (May 11, 2021)
api: Various functions promoted from experimental to stable API: (#2579-2581, @senhuang42)
`ZSTD_defaultCLevel()`
`ZSTD_getDictID_fromCDict()`
api: Several experimental functions have been deprecated and will emit a compiler warning (#2582, @senhuang42)
`ZSTD_compress_advanced()`
`ZSTD_compress_usingCDict_advanced()`
`ZSTD_compressBegin_advanced()`
`ZSTD_compressBegin_usingCDict_advanced()`
`ZSTD_initCStream_srcSize()`
`ZSTD_initCStream_usingDict()`
`ZSTD_initCStream_usingCDict()`
`ZSTD_initCStream_advanced()`
`ZSTD_initCStream_usingCDict_advanced()`
`ZSTD_resetCStream()`
api: ZSTDMT_NBWORKERS_MAX reduced to 64 for 32-bit environments (@Cyan4973)
perf: Significant speed improvements for middle compression levels (#2494, @senhuang42 @terrelln)
perf: Block splitter to improve compression ratio, enabled by default for high compression levels (#2447, @senhuang42)
perf: Decompression loop refactor, speed improvements on `clang` and for `--long` modes (#2614 #2630, @Cyan4973)
perf: Reduced stack usage during compression and decompression entropy stage (#2522 #2524, @terrelln)
bug: Improve setting permissions of created files (#2525, @felixhandte)
bug: Fix large dictionary non-determinism (#2607, @terrelln)
bug: Fix non-determinism test failures on Linux i686 (#2606, @terrelln)
bug: Fix various dedicated dictionary search bugs (#2540 #2586, @senhuang42 @felixhandte)
bug: Ensure `ZSTD_estimateCCtxSize*() `monotonically increases with compression level (#2538, @senhuang42)
bug: Fix --patch-from mode parameter bound bug with small files (#2637, @occivink)
bug: Fix UBSAN error in decompression (#2625, @terrelln)
bug: Fix superblock compression divide by zero bug (#2592, @senhuang42)
bug: Make the number of physical CPU cores detection more robust (#2517, @PaulBone)
doc: Improve `zdict.h` dictionary training API documentation (#2622, @terrelln)
doc: Note that public `ZSTD_free*()` functions accept NULL pointers (#2521, @animalize)
doc: Add style guide docs for open source contributors (#2626, @Cyan4973)
tests: Better regression test coverage for different dictionary modes (#2559, @senhuang42)
tests: Better test coverage of index reduction (#2603, @terrelln)
tests: OSS-Fuzz coverage for seekable format (#2617, @senhuang42)
tests: Test coverage for ZSTD threadpool API (#2604, @senhuang42)
build: Dynamic library built multithreaded by default (#2584, @senhuang42)
build: Move `zstd_errors.h` and `zdict.h` to `lib/` root (#2597, @terrelln)
build: Allow `ZSTDMT_JOBSIZE_MIN` to be configured at compile-time, reduce default to 512KB (#2611, @Cyan4973)
build: Single file library build script moved to `build/` directory (#2618, @felixhandte)
build: `ZBUFF_*()` is no longer built by default (#2583, @senhuang42)
build: Fixed Meson build (#2548, @SupervisedThinking @kloczek)
build: Fix excessive compiler warnings with clang-cl and CMake (#2600, @nickhutchinson)
build: Detect presence of `md5` on Darwin (#2609, @felixhandte)
build: Avoid SIGBUS on armv6 (#2633, @bmwiedmann)
cli: `--progress` flag added to always display progress bar (#2595, @senhuang42)
cli: Allow reading from block devices with `--force` (#2613, @felixhandte)
cli: Fix CLI filesize display bug (#2550, @Cyan4973)
cli: Fix windows CLI `--filelist` end-of-line bug (#2620, @Cyan4973)
contrib: Various fixes for linux kernel patch (#2539, @terrelln)
contrib: Seekable format - Decompression hanging edge case fix (#2516, @senhuang42)
contrib: Seekable format - New seek table-only API (#2113 #2518, @mdittmer @Cyan4973)
contrib: Seekable format - Fix seek table descriptor check when loading (#2534, @foxeng)
contrib: Seekable format - Decompression fix for large offsets, (#2594, @azat)
misc: Automatically published release tarballs available on Github (#2535, @felixhandte)
v1.4.9 (Mar 1, 2021)
bug: Use `umask()` to Constrain Created File Permissions (#2495, @felixhandte)
bug: Make Simple Single-Pass Functions Ignore Advanced Parameters (#2498, @terrelln)
api: Add (De)Compression Tracing Functionality (#2482, @terrelln)
api: Support References to Multiple DDicts (#2446, @senhuang42)
api: Add Function to Generate Skippable Frame (#2439, @senhuang42)
perf: New Algorithms for the Long Distance Matcher (#2483, @mpu)
perf: Performance Improvements for Long Distance Matcher (#2464, @mpu)
perf: Don't Shrink Window Log when Streaming with a Dictionary (#2451, @terrelln)
cli: Fix `--output-dir-mirror` rejection of `..` -containing paths (#2512, @felixhandte)
cli: Allow Input From Console When `-f`/`--force` is Passed (#2466, @felixhandte)
cli: Improve Help Message (#2500, @senhuang42)
tests: Remove Flaky Tests (#2455, #2486, #2445, @Cyan4973)
tests: Correctly Invoke md5 Utility on NetBSD (#2492, @niacat)
tests: Avoid Using `stat -c` on NetBSD (#2513, @felixhandte)
build: Zstd CLI Can Now be Linked to Dynamic `libzstd` (#2457, #2454 @Cyan4973)
build: Hide and Avoid Using Static-Only Symbols (#2501, #2504, @skitt)
build: CMake: Enable Only C for lib/ and programs/ Projects (#2498, @concatime)
build: CMake: Use `configure_file()` to Create the `.pc` File (#2462, @lazka)
build: Fix Fuzzer Compiler Detection & Update UBSAN Flags (#2503, @terrelln)
build: Add Guards for `_LARGEFILE_SOURCE` and `_LARGEFILE64_SOURCE` (#2444, @indygreg)
build: Improve `zlibwrapper` Makefile (#2437, @Cyan4973)
contrib: Add `recover_directory` Program (#2473, @terrelln)
doc: Change License Year to 2021 (#2452 & #2465, @terrelln & @senhuang42)
doc: Fix Typos (#2459, @ThomasWaldmann)
v1.4.8 (Dec 18, 2020)
hotfix: wrong alignment of an internal buffer
v1.4.7 (Dec 16, 2020)
perf: stronger --long mode at high compression levels, by @senhuang42
perf: stronger --patch-from at high compression levels, thanks to --long improvements
perf: faster dictionary compression at medium compression levels, by @felixhandte
perf: small speed & memory usage improvements for ZSTD_compress2(), by @terrelln
perf: improved fast compression speeds with Visual Studio, by @animalize
cli : Set nb of threads with environment variable ZSTD_NBTHREADS, by @senhuang42
cli : accept decompressing files with *.zstd suffix
cli : provide a condensed summary by default when processing multiple files
cli : fix : stdin input no longer confused as user prompt
cli : improve accuracy of several error messages
api : new sequence ingestion API, by @senhuang42
api : shared thread pool: control total nb of threads used by multiple compression jobs, by @marxin
api : new ZSTD_getDictID_fromCDict(), by @LuAPi
api : zlibWrapper only uses public API, and is compatible with dynamic library, by @terrelln
api : fix : multithreaded compression has predictable output even in special cases (see #2327) (issue not accessible from cli)
api : fix : dictionary compression correctly respects dictionary compression level (see #2303) (issue not accessible from cli)
build: fix cmake script when using path with spaces, by @terrelln
build: improved compile-time detection of aarch64/neon platforms, by @bsdimp
build: Fix building on AIX 5.1, by @likema
build: compile paramgrill with cmake on Windows, requested by @mirh
doc : clarify repcode updates in format specification, by @felixhandte
v1.4.6
fix : Always return dstSize_tooSmall when that is the case
fix : Fix ZSTD_initCStream_advanced() with static allocation and no dictionary
perf: Improve small block decompression speed by 20%+, by @terrelln
perf: Reduce compression stack usage by 1 KB, by @terrelln
perf: Improve decompression speed by improving ZSTD_wildcopy, by @helloguo (#2252, #2256)
perf: Improve histogram construction, by @cyan4973 (#2253)
cli : Add --output-dir-mirror option, by @xxie24 (#2219)
cli : Warn when (de)compressing multiple files into a single output, by @senhuang42 (#2279)
cli : Improved progress bar and status summary when (de)compressing multiple files, by @senhuang42 (#2283)
cli : Call stat less often, by @felixhandte (#2262)
cli : Allow --patch-from XXX and --filelist XXX in addition to --patch-from=XXX and --filelist=XXX, by @cyan4973 (#2250)
cli : Allow --patch-from to compress stdin with --stream-size, by @bimbashrestha (#2206)
api : Do not install zbuff.h, since it has long been deprecated, by @cyan4973 (#2166).
api : Fix ZSTD_CCtx_setParameter() with ZSTD_c_compressionLevel to make 0 mean default level, by @i-do-cpp (#2291)
api : Rename ZSTDMT_NBTHREADS_MAX to ZSTDMT_NBWORKERS_MAX, by @marxin (#2228).
build: Install pkg-config file with CMake and MinGW, by @tonytheodore (#2183)
build: Install DLL with CMake on Windows, by @BioDataAnalysis (#2221)
build: Fix DLL install location with CMake, by @xantares and @bimbashrestha (#2186)
build: Add ZSTD_NO_UNUSED_FUNCTIONS macro to hide unused functions
build: Add ZSTD_NO_INTRINSICS macro to avoid explicit intrinsics
build: Add STATIC_BMI2 macro for compile time detection of BMI2 on MSVC, by @Niadb (#2258)
build: Fix -Wcomma warnings, by @cwoffenden
build: Remove distutils requirement for meson build, by @neheb (#2197)
build: Fix cli compilation with uclibc
build: Fix cli compilation without st_mtime, by @ffontaine (#2246)
build: Fix shadowing warnings in library
build: Fix single file library compilation with Enscripten, by @yoshihitoh (#2227)
misc: Improve single file library and include dictBuilder, by @cwoffenden
misc: Allow compression dictionaries with missing symbols
misc: Add freestanding translation script in contrib/freestanding_lib
misc: Collect all of zstd's libc dependencies into zstd_deps.h
doc : Add ZSTD_versionString() to manual, by @animalize
doc : Fix documentation for ZSTD_CCtxParams_setParameter(), by @felixhandte (#2270)
v1.4.5 (May 22, 2020)
fix : Compression ratio regression on huge files (> 3 GB) using high levels (--ultra) and multithreading, by @terrelln
perf: Improved decompression speed: x64 : +10% (clang) / +5% (gcc); ARM : from +15% to +50%, depending on SoC, by @terrelln
perf: Automatically downsizes ZSTD_DCtx when too large for too long (#2069, by @bimbashreshta)
perf: Improved fast compression speed on aarch64 (#2040, ~+3%, by @caoyzh)
perf: Small level 1 compression speed gains (depending on compiler)
cli : New --patch-from command, create and apply patches from files, by @bimbashreshta
cli : New --filelist= : Provide a list of files to operate upon from a file
cli : -b -d command can now benchmark decompression on multiple files
cli : New --no-content-size command
cli : New --show-default-cparams information command
api : ZDICT_finalizeDictionary() is promoted to stable (#2111)
api : new experimental parameter ZSTD_d_stableOutBuffer (#2094)
build: Generate a single-file libzstd library (#2065, by @cwoffenden)
build: Relative includes no longer require -I compiler flags for zstd lib subdirs (#2103, by @felixhandte)
build: zstd now compiles cleanly under -pedantic (#2099)
build: zstd now compiles with make-4.3
build: Support mingw cross-compilation from Linux, by @Ericson2314
build: Meson multi-thread build fix on windows
build: Some misc icc fixes backed by new ci test on travis
misc: bitflip analyzer tool, by @felixhandte
misc: Extend largeNbDicts benchmark to compression
misc: Edit-distance match finder in contrib/
doc : Improved beginner CONTRIBUTING.md docs
doc : New issue templates for zstd
v1.4.4 (Nov 6, 2019)
perf: Improved decompression speed, by > 10%, by @terrelln
perf: Better compression speed when re-using a context, by @felixhandte
perf: Fix compression ratio when compressing large files with small dictionary, by @senhuang42
perf: zstd reference encoder can generate RLE blocks, by @bimbashrestha
perf: minor generic speed optimization, by @davidbolvansky
api: new ability to extract sequences from the parser for analysis, by @bimbashrestha
api: fixed decoding of magic-less frames, by @terrelln
api: fixed ZSTD_initCStream_advanced() performance with fast modes, reported by @QrczakMK
cli: Named pipes support, by @bimbashrestha
cli: short tar's extension support, by @stokito
cli: command --output-dir-flat= , generates target files into requested directory, by @senhuang42
cli: commands --stream-size=# and --size-hint=#, by @nmagerko
cli: command --exclude-compressed, by @shashank0791
cli: faster `-t` test mode
cli: improved some error messages, by @vangyzen
cli: fix command `-D dictionary` on Windows, reported by @artyompetrov
cli: fix rare deadlock condition within dictionary builder, by @terrelln
build: single-file decoder with emscripten compilation script, by @cwoffenden
build: fixed zlibWrapper compilation on Visual Studio, reported by @bluenlive
build: fixed deprecation warning for certain gcc version, reported by @jasonma163
build: fix compilation on old gcc versions, by @cemeyer
build: improved installation directories for cmake script, by Dmitri Shubin
pack: modified pkgconfig, for better integration into openwrt, requested by @neheb
misc: Improved documentation : ZSTD_CLEVEL, DYNAMIC_BMI2, ZSTD_CDict, function deprecation, zstd format
misc: fixed educational decoder : accept larger literals section, and removed UNALIGNED() macro
v1.4.3 (Aug 20, 2019)
bug: Fix Dictionary Compression Ratio Regression by @cyan4973 (#1709)
bug: Fix Buffer Overflow in legacy v0.3 decompression by @felixhandte (#1722)
build: Add support for IAR C/C++ Compiler for Arm by @joseph0918 (#1705)
v1.4.2 (Jul 26, 2019)
bug: Fix bug in zstd-0.5 decoder by @terrelln (#1696)
bug: Fix seekable decompression in-memory API by @iburinoc (#1695)
misc: Validate blocks are smaller than size limit by @vivekmg (#1685)
misc: Restructure source files by @ephiepark (#1679)
v1.4.1 (Jul 20, 2019)
bug: Fix data corruption in niche use cases by @terrelln (#1659)
bug: Fuzz legacy modes, fix uncovered bugs by @terrelln (#1593, #1594, #1595)
bug: Fix out of bounds read by @terrelln (#1590)
perf: Improve decode speed by ~7% @mgrice (#1668)
perf: Slightly improved compression ratio of level 3 and 4 (ZSTD_dfast) by @cyan4973 (#1681)
perf: Slightly faster compression speed when re-using a context by @cyan4973 (#1658)
perf: Improve compression ratio for small windowLog by @cyan4973 (#1624)
perf: Faster compression speed in high compression mode for repetitive data by @terrelln (#1635)
api: Add parameter to generate smaller dictionaries by @tyler-tran (#1656)
cli: Recognize symlinks when built in C99 mode by @felixhandte (#1640)
cli: Expose cpu load indicator for each file on -vv mode by @ephiepark (#1631)
cli: Restrict read permissions on destination files by @chungy (#1644)
cli: zstdgrep: handle -f flag by @felixhandte (#1618)
cli: zstdcat: follow symlinks by @vejnar (#1604)
doc: Remove extra size limit on compressed blocks by @felixhandte (#1689)
doc: Fix typo by @yk-tanigawa (#1633)
doc: Improve documentation on streaming buffer sizes by @cyan4973 (#1629)
build: CMake: support building with LZ4 @leeyoung624 (#1626)
build: CMake: install zstdless and zstdgrep by @leeyoung624 (#1647)
build: CMake: respect existing uninstall target by @j301scott (#1619)
build: Make: skip multithread tests when built without support by @michaelforney (#1620)
build: Make: Fix examples/ test target by @sjnam (#1603)
build: Meson: rename options out of deprecated namespace by @lzutao (#1665)
build: Meson: fix build by @lzutao (#1602)
build: Visual Studio: don't export symbols in static lib by @scharan (#1650)
build: Visual Studio: fix linking by @absotively (#1639)
build: Fix MinGW-W64 build by @myzhang1029 (#1600)
misc: Expand decodecorpus coverage by @ephiepark (#1664)
v1.4.0 (Apr 17, 2019)
perf: Improve level 1 compression speed in most scenarios by 6% by @gbtucker and @terrelln
api: Move the advanced API, including all functions in the staging section, to the stable section
api: Make ZSTD_e_flush and ZSTD_e_end block for maximum forward progress
api: Rename ZSTD_CCtxParam_getParameter to ZSTD_CCtxParams_getParameter
api: Rename ZSTD_CCtxParam_setParameter to ZSTD_CCtxParams_setParameter
api: Don't export ZSTDMT functions from the shared library by default
api: Require ZSTD_MULTITHREAD to be defined to use ZSTDMT
api: Add ZSTD_decompressBound() to provide an upper bound on decompressed size by @shakeelrao
api: Fix ZSTD_decompressDCtx() corner cases with a dictionary
api: Move ZSTD_getDictID_*() functions to the stable section
api: Add ZSTD_c_literalCompressionMode flag to enable or disable literal compression by @terrelln
api: Allow compression parameters to be set when a dictionary is used
api: Allow setting parameters before or after ZSTD_CCtx_loadDictionary() is called
api: Fix ZSTD_estimateCStreamSize_usingCCtxParams()
api: Setting ZSTD_d_maxWindowLog to 0 means use the default
cli: Ensure that a dictionary is not used to compress itself by @shakeelrao
cli: Add --[no-]compress-literals flag to enable or disable literal compression
doc: Update the examples to use the advanced API
doc: Explain how to transition from old streaming functions to the advanced API in the header
build: Improve the Windows release packages
build: Improve CMake build by @hjmjohnson
build: Build fixes for FreeBSD by @lwhsu
build: Remove redundant warnings by @thatsafunnyname
build: Fix tests on OpenBSD by @bket
build: Extend fuzzer build system to work with the new clang engine
build: CMake now creates the libzstd.so.1 symlink
build: Improve Menson build by @lzutao
misc: Fix symbolic link detection on FreeBSD
misc: Use physical core count for -T0 on FreeBSD by @cemeyer
misc: Fix zstd --list on truncated files by @kostmo
misc: Improve logging in debug mode by @felixhandte
misc: Add CirrusCI tests by @lwhsu
misc: Optimize dictionary memory usage in corner cases
misc: Improve the dictionary builder on small or homogeneous data
misc: Fix spelling across the repo by @jsoref
v1.3.8 (Dec 28, 2018)
perf: better decompression speed on large files (+7%) and cold dictionaries (+15%)
perf: slightly better compression ratio at high compression modes
api : finalized advanced API, last stage before "stable" status
api : new --rsyncable mode, by @terrelln
api : support decompression of empty frames into NULL (used to be an error) (#1385)
build: new set of macros to build a minimal size decoder, by @felixhandte
build: fix compilation on MIPS32, reported by @clbr (#1441)
build: fix compilation with multiple -arch flags, by @ryandesign
build: highly upgraded meson build, by @lzutao
build: improved buck support, by @obelisk
build: fix cmake script : can create debug build, by @pitrou
build: Makefile : grep works on both colored consoles and systems without color support
build: fixed zstd-pgo, by @bmwiedemann
cli : support ZSTD_CLEVEL environment variable, by @yijinfb (#1423)
cli : --no-progress flag, preserving final summary (#1371), by @terrelln
cli : ensure destination file is not source file (#1422)
cli : clearer error messages, especially when input file not present
doc : clarified zstd_compression_format.md, by @ulikunitz
misc: fixed zstdgrep, returns 1 on failure, by @lzutao
misc: NEWS renamed as CHANGELOG, in accordance with fboss
v1.3.7 (Oct 20, 2018)
perf: slightly better decompression speed on clang (depending on hardware target)
fix : performance of dictionary compression for small input < 4 KB at levels 9 and 10
build: no longer build backtrace by default in release mode; restrict further automatic mode
build: control backtrace support through build macro BACKTRACE
misc: added man pages for zstdless and zstdgrep, by @samrussell
v1.3.6 (Oct 6, 2018)
perf: much faster dictionary builder, by @jenniferliu
perf: faster dictionary compression on small data when using multiple contexts, by @felixhandte
perf: faster dictionary decompression when using a very large number of dictionaries simultaneously
cli : fix : does no longer overwrite destination when source does not exist (#1082)
cli : new command --adapt, for automatic compression level adaptation
api : fix : block api can be streamed with > 4 GB, reported by @catid
api : reduced ZSTD_DDict size by 2 KB
api : minimum negative compression level is defined, and can be queried using ZSTD_minCLevel().
build: support Haiku target, by @korli
build: Read Legacy format is limited to v0.5+ by default. Can be changed at compile time with macro ZSTD_LEGACY_SUPPORT.
doc : zstd_compression_format.md updated to match wording in IETF RFC 8478
misc: tests/paramgrill, a parameter optimizer, by @GeorgeLu97
v1.3.5 (Jun 29, 2018)
perf: much faster dictionary compression, by @felixhandte
perf: small quality improvement for dictionary generation, by @terrelln
perf: slightly improved high compression levels (notably level 19)
mem : automatic memory release for long duration contexts
cli : fix : overlapLog can be manually set
cli : fix : decoding invalid lz4 frames
api : fix : performance degradation for dictionary compression when using advanced API, by @terrelln
api : change : clarify ZSTD_CCtx_reset() vs ZSTD_CCtx_resetParameters(), by @terrelln
build: select custom libzstd scope through control macros, by @GeorgeLu97
build: OpenBSD patch, by @bket
build: make and make all are compatible with -j
doc : clarify zstd_compression_format.md, updated for IETF RFC process
misc: pzstd compatible with reproducible compilation, by @lamby
v1.3.4 (Mar 27, 2018)
perf: faster speed (especially decoding speed) on recent cpus (haswell+)
perf: much better performance associating --long with multi-threading, by @terrelln
perf: better compression at levels 13-15
cli : asynchronous compression by default, for faster experience (use --single-thread for former behavior)
cli : smoother status report in multi-threading mode
cli : added command --fast=#, for faster compression modes
cli : fix crash when not overwriting existing files, by Pádraig Brady (@pixelb)
api : `nbThreads` becomes `nbWorkers` : 1 triggers asynchronous mode
api : compression levels can be negative, for even more speed
api : ZSTD_getFrameProgression() : get precise progress status of ZSTDMT anytime
api : ZSTDMT can accept new compression parameters during compression
api : implemented all advanced dictionary decompression prototypes
build: improved meson recipe, by Shawn Landden (@shawnl)
build: VS2017 scripts, by @HaydnTrigg
misc: all /contrib projects fixed
misc: added /contrib/docker script by @gyscos
v1.3.3 (Dec 21, 2017)
perf: faster zstd_opt strategy (levels 16-19)
fix : bug #944 : multithreading with shared dictionary and large data, reported by @gsliepen
cli : fix : content size written in header by default
cli : fix : improved LZ4 format support, by @felixhandte
cli : new : hidden command `-S`, to benchmark multiple files while generating one result per file
api : fix : support large skippable frames, by @terrelln
api : fix : streaming interface was adding a useless 3-bytes null block to small frames
api : change : when setting `pledgedSrcSize`, use `ZSTD_CONTENTSIZE_UNKNOWN` macro value to mean "unknown"
build: fix : compilation under rhel6 and centos6, reported by @pixelb
build: added `check` target
v1.3.2 (Oct 10, 2017)
new : long range mode, using --long command, by Stella Lau (@stellamplau)
new : ability to generate and decode magicless frames (#591)
changed : maximum nb of threads reduced to 200, to avoid address space exhaustion in 32-bits mode
fix : multi-threading compression works with custom allocators
fix : ZSTD_sizeof_CStream() was over-evaluating memory usage
fix : a rare compression bug when compression generates very large distances and bunch of other conditions (only possible at --ultra -22)
fix : 32-bits build can now decode large offsets (levels 21+)
cli : added LZ4 frame support by default, by Felix Handte (@felixhandte)
cli : improved --list output
cli : new : can split input file for dictionary training, using command -B#
cli : new : clean operation artefact on Ctrl-C interruption
cli : fix : do not change /dev/null permissions when using command -t with root access, reported by @mike155 (#851)
cli : fix : write file size in header in multiple-files mode
api : added macro ZSTD_COMPRESSBOUND() for static allocation
api : experimental : new advanced decompression API
api : fix : sizeof_CCtx() used to over-estimate
build: fix : no-multithread variant compiles without pool.c dependency, reported by Mitchell Blank Jr (@mitchblank) (#819)
build: better compatibility with reproducible builds, by Bernhard M. Wiedemann (@bmwiedemann) (#818)
example : added streaming_memory_usage
license : changed /examples license to BSD + GPLv2
license : fix a few header files to reflect new license (#825)
v1.3.1 (Aug 21, 2017)
New license : BSD + GPLv2
perf: substantially decreased memory usage in Multi-threading mode, thanks to reports by Tino Reichardt (@mcmilk)
perf: Multi-threading supports up to 256 threads. Cap at 256 when more are requested (#760)
cli : improved and fixed --list command, by @ib (#772)
cli : command -vV to list supported formats, by @ib (#771)
build : fixed binary variants, reported by @svenha (#788)
build : fix Visual compilation for non x86/x64 targets, reported by Greg Slazinski (@GregSlazinski) (#718)
API exp : breaking change : ZSTD_getframeHeader() provides more information
API exp : breaking change : pinned down values of error codes
doc : fixed huffman example, by Ulrich Kunitz (@ulikunitz)
new : contrib/adaptive-compression, I/O driven compression strength, by Paul Cruz (@paulcruz74)
new : contrib/long_distance_matching, statistics by Stella Lau (@stellamplau)
updated : contrib/linux-kernel, by Nick Terrell (@terrelln)
v1.3.0 (Jul 6, 2017)
cli : new : `--list` command, by Paul Cruz
cli : changed : xz/lzma support enabled by default
cli : changed : `-t *` continue processing list after a decompression error
API : added : ZSTD_versionString()
API : promoted to stable status : ZSTD_getFrameContentSize(), by Sean Purcell
API exp : new advanced API : ZSTD_compress_generic(), ZSTD_CCtx_setParameter()
API exp : new : API for static or external allocation : ZSTD_initStatic?Ctx()
API exp : added : ZSTD_decompressBegin_usingDDict(), requested by Guy Riddle (#700)
API exp : clarified memory estimation / measurement functions.
API exp : changed : strongest strategy renamed ZSTD_btultra, fastest strategy ZSTD_fast set to 1
tools : decodecorpus can generate random dictionary-compressed samples, by Paul Cruz
new : contrib/seekable_format, demo and API, by Sean Purcell
changed : contrib/linux-kernel, updated version and license, by Nick Terrell
v1.2.0 (May 5, 2017)
cli : changed : Multithreading enabled by default (use target zstd-nomt or HAVE_THREAD=0 to disable)
cli : new : command -T0 means "detect and use nb of cores", by Sean Purcell
cli : new : zstdmt symlink hardwired to `zstd -T0`
cli : new : command --threads=# (#671)
cli : changed : cover dictionary builder by default, for improved quality, by Nick Terrell
cli : new : commands --train-cover and --train-legacy, to select dictionary algorithm and parameters
cli : experimental targets `zstd4` and `xzstd4`, with support for lz4 format, by Sean Purcell
cli : fix : does not output compressed data on console
cli : fix : ignore symbolic links unless --force specified,
API : breaking change : ZSTD_createCDict_advanced(), only use compressionParameters as argument
API : added : prototypes ZSTD_*_usingCDict_advanced(), for direct control over frameParameters.
API : improved: ZSTDMT_compressCCtx() reduced memory usage
API : fix : ZSTDMT_compressCCtx() now provides srcSize in header (#634)
API : fix : src size stored in frame header is controlled at end of frame
API : fix : enforced consistent rules for pledgedSrcSize==0 (#641)
API : fix : error code "GENERIC" replaced by "dstSizeTooSmall" when appropriate
build: improved cmake script, by @Majlen
build: enabled Multi-threading support for *BSD, by Baptiste Daroussin
tools: updated Paramgrill. Command -O# provides best parameters for sample and speed target.
new : contrib/linux-kernel version, by Nick Terrell
v1.1.4 (Mar 18, 2017)
cli : new : can compress in *.gz format, using --format=gzip command, by Przemyslaw Skibinski
cli : new : advanced benchmark command --priority=rt
cli : fix : write on sparse-enabled file systems in 32-bits mode, by @ds77
cli : fix : --rm remains silent when input is stdin
cli : experimental : xzstd, with support for xz/lzma decoding, by Przemyslaw Skibinski
speed : improved decompression speed in streaming mode for single shot scenarios (+5%)
memory: DDict (decompression dictionary) memory usage down from 150 KB to 20 KB
arch: 32-bits variant able to generate and decode very long matches (>32 MB), by Sean Purcell
API : new : ZSTD_findFrameCompressedSize(), ZSTD_getFrameContentSize(), ZSTD_findDecompressedSize()
API : changed : dropped support of legacy versions <= v0.3 (can be changed by modifying ZSTD_LEGACY_SUPPORT value)
build : new: meson build system in contrib/meson, by Dima Krasner
build : improved cmake script, by @Majlen
build : added -Wformat-security flag, as recommended by Padraig Brady
doc : new : educational decoder, by Sean Purcell
v1.1.3 (Feb 7, 2017)
cli : zstd can decompress .gz files (can be disabled with `make zstd-nogz` or `make HAVE_ZLIB=0`)
cli : new : experimental target `make zstdmt`, with multi-threading support
cli : new : improved dictionary builder "cover" (experimental), by Nick Terrell, based on prior work by Giuseppe Ottaviano.
cli : new : advanced commands for detailed parameters, by Przemyslaw Skibinski
cli : fix zstdless on Mac OS-X, by Andrew Janke
cli : fix #232 "compress non-files"
dictBuilder : improved dictionary generation quality, thanks to Nick Terrell
API : new : lib/compress/ZSTDMT_compress.h multithreading API (experimental)
API : new : ZSTD_create?Dict_byReference(), requested by Bartosz Taudul
API : new : ZDICT_finalizeDictionary()
API : fix : ZSTD_initCStream_usingCDict() properly writes dictID into frame header, by Gregory Szorc (#511)
API : fix : all symbols properly exposed in libzstd, by Nick Terrell
build : support for Solaris target, by Przemyslaw Skibinski
doc : clarified specification, by Sean Purcell
v1.1.2 (Dec 15, 2016)
API : streaming : decompression : changed : automatic implicit reset when chain-decoding new frames without init
API : experimental : added : dictID retrieval functions, and ZSTD_initCStream_srcSize()
API : zbuff : changed : prototypes now generate deprecation warnings
lib : improved : faster decompression speed at ultra compression settings and 32-bits mode
lib : changed : only public ZSTD_ symbols are now exposed
lib : changed : reduced usage of stack memory
lib : fixed : several corner case bugs, by Nick Terrell
cli : new : gzstd, experimental version able to decode .gz files, by Przemyslaw Skibinski
cli : new : preserve file attributes
cli : new : added zstdless and zstdgrep tools
cli : fixed : status displays total amount decoded, even for file consisting of multiple frames (like pzstd)
cli : fixed : zstdcat
zlib_wrapper : added support for gz* functions, by Przemyslaw Skibinski
install : better compatibility with FreeBSD, by Dimitry Andric
source tree : changed : zbuff source files moved to lib/deprecated
v1.1.1 (Nov 2, 2016)
New : command -M#, --memory=, --memlimit=, --memlimit-decompress= to limit allowed memory consumption
New : doc/zstd_manual.html, by Przemyslaw Skibinski
Improved : slightly better compression ratio at --ultra levels (>= 20)
Improved : better memory usage when using streaming compression API, thanks to @Rogier-5 report
Added : API : ZSTD_initCStream_usingCDict(), ZSTD_initDStream_usingDDict() (experimental section)
Added : example/multiple_streaming_compression.c
Changed : zstd_errors.h is now installed within /include (and replaces errors_public.h)
Updated man page
Fixed : zstd-small, zstd-compress and zstd-decompress compilation targets
v1.1.0 (Sep 28, 2016)
New : contrib/pzstd, parallel version of zstd, by Nick Terrell
added : NetBSD install target (#338)
Improved : speed for batches of small files
Improved : speed of zlib wrapper, by Przemyslaw Skibinski
Changed : libzstd on Windows supports legacy formats, by Christophe Chevalier
Fixed : CLI -d output to stdout by default when input is stdin (#322)
Fixed : CLI correctly detects console on Mac OS-X
Fixed : CLI supports recursive mode `-r` on Mac OS-X
Fixed : Legacy decoders use unified error codes, reported by benrg (#341), fixed by Przemyslaw Skibinski
Fixed : compatibility with OpenBSD, reported by Juan Francisco Cantero Hurtado (#319)
Fixed : compatibility with Hurd, by Przemyslaw Skibinski (#365)
Fixed : zstd-pgo, reported by octoploid (#329)
v1.0.0 (Sep 1, 2016)
Change Licensing, all project is now BSD, Copyright Facebook
Small decompression speed improvement
API : Streaming API supports legacy format
API : ZDICT_getDictID(), ZSTD_sizeof_{CCtx, DCtx, CStream, DStream}(), ZSTD_setDStreamParameter()
CLI supports legacy formats v0.4+
Fixed : compression fails on certain huge files, reported by Jesse McGrew
Enhanced documentation, by Przemyslaw Skibinski
v0.8.1 (Aug 18, 2016)
New streaming API
Changed : --ultra now enables levels beyond 19
Changed : -i# now selects benchmark time in second
Fixed : ZSTD_compress* can now compress > 4 GB in a single pass, reported by Nick Terrell
Fixed : speed regression on specific patterns (#272)
Fixed : support for Z_SYNC_FLUSH, by Dmitry Krot (#291)
Fixed : ICC compilation, by Przemyslaw Skibinski
v0.8.0 (Aug 2, 2016)
Improved : better speed on clang and gcc -O2, thanks to Eric Biggers
New : Build on FreeBSD and DragonFly, thanks to JrMarino
Changed : modified API : ZSTD_compressEnd()
Fixed : legacy mode with ZSTD_HEAPMODE=0, by Christopher Bergqvist
Fixed : premature end of frame when zero-sized raw block, reported by Eric Biggers
Fixed : large dictionaries (> 384 KB), reported by Ilona Papava
Fixed : checksum correctly checked in single-pass mode
Fixed : combined --test amd --rm, reported by Andreas M. Nilsson
Modified : minor compression level adaptations
Updated : compression format specification to v0.2.0
changed : zstd.h moved to /lib directory
v0.7.5 (Aug 1, 2016)
Transition version, supporting decoding of v0.8.x
v0.7.4 (Jul 17, 2016)
Added : homebrew for Mac, by Daniel Cade
Added : more examples
Fixed : segfault when using small dictionaries, reported by Felix Handte
Modified : default compression level for CLI is now 3
Updated : specification, to v0.1.1
v0.7.3 (Jul 9, 2016)
New : compression format specification
New : `--` separator, stating that all following arguments are file names. Suggested by Chip Turner.
New : `ZSTD_getDecompressedSize()`
New : OpenBSD target, by Juan Francisco Cantero Hurtado
New : `examples` directory
fixed : dictBuilder using HC levels, reported by Bartosz Taudul
fixed : legacy support from ZSTD_decompress_usingDDict(), reported by Felix Handte
fixed : multi-blocks decoding with intermediate uncompressed blocks, reported by Greg Slazinski
modified : removed "mem.h" and "error_public.h" dependencies from "zstd.h" (experimental section)
modified : legacy functions no longer need magic number
v0.7.2 (Jul 4, 2016)
fixed : ZSTD_decompressBlock() using multiple consecutive blocks. Reported by Greg Slazinski.
fixed : potential segfault on very large files (many gigabytes). Reported by Chip Turner.
fixed : CLI displays system error message when destination file cannot be created (#231). Reported by Chip Turner.
v0.7.1 (Jun 23, 2016)
fixed : ZBUFF_compressEnd() called multiple times with too small `dst` buffer, reported by Christophe Chevalier
fixed : dictBuilder fails if first sample is too small, reported by Руслан Ковалёв
fixed : corruption issue, reported by cj
modified : checksum enabled by default in command line mode
v0.7.0 (Jun 17, 2016)
New : Support for directory compression, using `-r`, thanks to Przemyslaw Skibinski
New : Command `--rm`, to remove source file after successful de/compression
New : Visual build scripts, by Christophe Chevalier
New : Support for Sparse File-systems (do not use space for zero-filled sectors)
New : Frame checksum support
New : Support pass-through mode (when using `-df`)
API : more efficient Dictionary API : `ZSTD_compress_usingCDict()`, `ZSTD_decompress_usingDDict()`
API : create dictionary files from custom content, by Giuseppe Ottaviano
API : support for custom malloc/free functions
New : controllable Dictionary ID
New : Support for skippable frames
v0.6.1 (May 13, 2016)
New : zlib wrapper API, thanks to Przemyslaw Skibinski
New : Ability to compile compressor / decompressor separately
Changed : new lib directory structure
Fixed : Legacy codec v0.5 compatible with dictionary decompression
Fixed : Decoder corruption error (#173)
Fixed : null-string roundtrip (#176)
New : benchmark mode can select directory as input
Experimental : midipix support, VMS support
v0.6.0 (Apr 13, 2016)
Stronger high compression modes, thanks to Przemyslaw Skibinski
API : ZSTD_getFrameParams() provides size of decompressed content
New : highest compression modes require `--ultra` command to fully unleash their capacity
Fixed : zstd cli return error code > 0 and removes dst file artifact when decompression fails, thanks to Chip Turner
v0.5.1 (Feb 18, 2016)
New : Optimal parsing => Very high compression modes, thanks to Przemyslaw Skibinski
Changed : Dictionary builder integrated into libzstd and zstd cli
Changed (!) : zstd cli now uses "multiple input files" as default mode. See `zstd -h`.
Fix : high compression modes for big-endian platforms
New : zstd cli : `-t` | `--test` command
v0.5.0 (Feb 5, 2016)
New : dictionary builder utility
Changed : streaming & dictionary API
Improved : better compression of small data
v0.4.7 (Jan 22, 2016)
Improved : small compression speed improvement in HC mode
Changed : `zstd_decompress.c` has ZSTD_LEGACY_SUPPORT to 0 by default
fix : bt search bug
v0.4.6 (Jan 13, 2016)
fix : fast compression mode on Windows
New : cmake configuration file, thanks to Artyom Dymchenko
Improved : high compression mode on repetitive data
New : block-level API
New : ZSTD_duplicateCCtx()
v0.4.5 (Dec 18, 2015)
new : -m/--multiple : compress/decompress multiple files
v0.4.4 (Dec 14, 2015)
Fixed : high compression modes for Windows 32 bits
new : external dictionary API extended to buffered mode and accessible through command line
new : windows DLL project, thanks to Christophe Chevalier
v0.4.3 (Dec 7, 2015)
new : external dictionary API
new : zstd-frugal
v0.4.2 (Dec 2, 2015)
Generic minor improvements for small blocks
Fixed : big-endian compatibility, by Peter Harris (#85)
v0.4.1 (Dec 1, 2015)
Fixed : ZSTD_LEGACY_SUPPORT=0 build mode (reported by Luben)
removed `zstd.c`
v0.4.0 (Nov 29, 2015)
Command line utility compatible with high compression levels
Removed zstdhc => merged into zstd
Added : ZBUFF API (see zstd_buffered.h)
Rolling buffer support
v0.3.6 (Nov 10, 2015)
small blocks params
v0.3.5 (Nov 9, 2015)
minor generic compression improvements
v0.3.4 (Nov 6, 2015)
Faster fast cLevels
v0.3.3 (Nov 5, 2015)
Small compression ratio improvement
v0.3.2 (Nov 2, 2015)
Fixed Visual Studio
v0.3.1 (Nov 2, 2015)
Small compression ratio improvement
v0.3 (Oct 30, 2015)
HC mode : compression levels 2-26
v0.2.2 (Oct 28, 2015)
Fix : Visual Studio 2013 & 2015 release compilation, by Christophe Chevalier
v0.2.1 (Oct 24, 2015)
Fix : Read errors, advanced fuzzer tests, by Hanno Böck
v0.2.0 (Oct 22, 2015)
**Breaking format change**
Faster decompression speed
Can still decode v0.1 format
v0.1.3 (Oct 15, 2015)
fix uninitialization warning, reported by Evan Nemerson
v0.1.2 (Sep 11, 2015)
frame concatenation support
v0.1.1 (Aug 27, 2015)
fix compression bug
detects write-flush errors
v0.1.0 (Aug 25, 2015)
first release
================================================
FILE: CMakeLists.txt
================================================
cmake_minimum_required(VERSION 3.10)
# Thin wrapper so `cmake -S .` behaves like `cmake -S build/cmake`.
# Policy lives in build/cmake; keep parent project language-less.
project(zstd-superbuild LANGUAGES NONE)
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
message(FATAL_ERROR "In-source builds are not supported. Specify -B <build-dir>.")
endif()
add_subdirectory(build/cmake)
================================================
FILE: CODE_OF_CONDUCT.md
================================================
# Code of Conduct
Facebook has adopted a Code of Conduct that we expect project participants to adhere to.
Please read the [full text](https://code.fb.com/codeofconduct/)
so that you can understand what actions will and will not be tolerated.
================================================
FILE: CONTRIBUTING.md
================================================
# Contributing to Zstandard
We want to make contributing to this project as easy and transparent as
possible.
## Our Development Process
New versions are being developed in the "dev" branch,
or in their own feature branch.
When they are deemed ready for a release, they are merged into "release".
As a consequence, all contributions must stage first through "dev"
or their own feature branch.
## Pull Requests
We actively welcome your pull requests.
1. Fork the repo and create your branch from `dev`.
2. If you've added code that should be tested, add tests.
3. If you've changed APIs, update the documentation.
4. Ensure the test suite passes.
5. Make sure your code lints.
6. If you haven't already, complete the Contributor License Agreement ("CLA").
## Contributor License Agreement ("CLA")
In order to accept your pull request, we need you to submit a CLA. You only need
to do this once to work on any of Facebook's open source projects.
Complete your CLA here: <https://code.facebook.com/cla>
## Workflow
Zstd uses a branch-based workflow for making changes to the codebase. Typically, zstd
will use a new branch per sizable topic. For smaller changes, it is okay to lump multiple
related changes into a branch.
Our contribution process works in three main stages:
1. Local development
* Update:
* Checkout your fork of zstd if you have not already
```
git checkout https://github.com/<username>/zstd
cd zstd
```
* Update your local dev branch
```
git pull https://github.com/facebook/zstd dev
git push origin dev
```
* Topic and development:
* Make a new branch on your fork about the topic you're developing for
```
# branch names should be concise but sufficiently informative
git checkout -b <branch-name>
git push origin <branch-name>
```
* Make commits and push
```
# make some changes =
git add -u && git commit -m <message>
git push origin <branch-name>
```
* Note: run local tests to ensure that your changes didn't break existing functionality
* Quick check
```
make check
```
* Longer check
```
make test
```
2. Code Review and CI tests
* Ensure CI tests pass:
* Before sharing anything to the community, create a pull request in your own fork against the dev branch
and make sure that all GitHub Actions CI tests pass. See the Continuous Integration section below for more information.
* Ensure that static analysis passes on your development machine. See the Static Analysis section
below to see how to do this.
* Create a pull request:
* When you are ready to share you changes to the community, create a pull request from your branch
to facebook:dev. You can do this very easily by clicking 'Create Pull Request' on your fork's home
page.
* From there, select the branch where you made changes as your source branch and facebook:dev
as the destination.
* Examine the diff presented between the two branches to make sure there is nothing unexpected.
* Write a good pull request description:
* While there is no strict template that our contributors follow, we would like them to
sufficiently summarize and motivate the changes they are proposing. We recommend all pull requests,
at least indirectly, address the following points.
* Is this pull request important and why?
* Is it addressing an issue? If so, what issue? (provide links for convenience please)
* Is this a new feature? If so, why is it useful and/or necessary?
* Are there background references and documents that reviewers should be aware of to properly assess this change?
* Note: make sure to point out any design and architectural decisions that you made and the rationale behind them.
* Note: if you have been working with a specific user and would like them to review your work, make sure you mention them using (@<username>)
* Submit the pull request and iterate with feedback.
3. Merge and Release
* Getting approval:
* You will have to iterate on your changes with feedback from other collaborators to reach a point
where your pull request can be safely merged.
* To avoid too many comments on style and convention, make sure that you have a
look at our style section below before creating a pull request.
* Eventually, someone from the zstd team will approve your pull request and not long after merge it into
the dev branch.
* Housekeeping:
* Most PRs are linked with one or more Github issues. If this is the case for your PR, make sure
the corresponding issue is mentioned. If your change 'fixes' or completely addresses the
issue at hand, then please indicate this by requesting that an issue be closed by commenting.
* Just because your changes have been merged does not mean the topic or larger issue is complete. Remember
that the change must make it to an official zstd release for it to be meaningful. We recommend
that contributors track the activity on their pull request and corresponding issue(s) page(s) until
their change makes it to the next release of zstd. Users will often discover bugs in your code or
suggest ways to refine and improve your initial changes even after the pull request is merged.
## Static Analysis
Static analysis is a process for examining the correctness or validity of a program without actually
executing it. It usually helps us find many simple bugs. Zstd uses clang's `scan-build` tool for
static analysis. You can install it by following the instructions for your OS on https://clang-analyzer.llvm.org/scan-build.
Once installed, you can ensure that our static analysis tests pass on your local development machine
by running:
```
make staticAnalyze
```
In general, you can use `scan-build` to static analyze any build script. For example, to static analyze
just `contrib/largeNbDicts` and nothing else, you can run:
```
scan-build make -C contrib/largeNbDicts largeNbDicts
```
### Pitfalls of static analysis
`scan-build` is part of our regular CI suite. Other static analyzers are not.
It can be useful to look at additional static analyzers once in a while (and we do), but it's not a good idea to multiply the nb of analyzers run continuously at each commit and PR. The reasons are :
- Static analyzers are full of false positive. The signal to noise ratio is actually pretty low.
- A good CI policy is "zero-warning tolerance". That means that all issues must be solved, including false positives. This quickly becomes a tedious workload.
- Multiple static analyzers will feature multiple kind of false positives, sometimes applying to the same code but in different ways leading to :
+ tortuous code, trying to please multiple constraints, hurting readability and therefore maintenance. Sometimes, such complexity introduce other more subtle bugs, that are just out of scope of the analyzers.
+ sometimes, these constraints are mutually exclusive : if one try to solve one, the other static analyzer will complain, they can't be both happy at the same time.
- As if that was not enough, the list of false positives change with each version. It's hard enough to follow one static analyzer, but multiple ones with their own update agenda, this quickly becomes a massive velocity reducer.
This is different from running a static analyzer once in a while, looking at the output, and __cherry picking__ a few warnings that seem helpful, either because they detected a genuine risk of bug, or because it helps expressing the code in a way which is more readable or more difficult to misuse. These kinds of reports can be useful, and are accepted.
## Continuous Integration
CI tests run every time a pull request (PR) is created or updated. The exact tests
that get run will depend on the destination branch you specify. Some tests take
longer to run than others. Currently, our CI is set up to run a short
series of tests when creating a PR to the dev branch and a longer series of tests
when creating a PR to the release branch. You can look in the configuration files
of the respective CI platform for more information on what gets run when.
Most people will just want to create a PR with the destination set to their local dev
branch of zstd. You can then find the status of the tests on the PR's page. You can also
re-run tests and cancel running tests from the PR page or from the respective CI's dashboard.
Almost all of zstd's CI runs on GitHub Actions (configured at `.github/workflows`), which will automatically run on PRs to your
own fork. A small number of tests run on other services (e.g. Travis CI, Circle CI, Appveyor).
These require work to set up on your local fork, and (at least for Travis CI) cost money.
Therefore, if the PR on your local fork passes GitHub Actions, feel free to submit a PR
against the main repo.
### Third-party CI
A small number of tests cannot run on GitHub Actions, or have yet to be migrated.
For these, we use a variety of third-party services (listed below). It is not necessary to set
these up on your fork in order to contribute to zstd; however, we do link to instructions for those
who want earlier signal.
| Service | Purpose | Setup Links | Config Path |
|-----------|------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------|
| Travis CI | Used for testing on non-x86 architectures such as PowerPC | https://docs.travis-ci.com/user/tutorial/#to-get-started-with-travis-ci-using-github <br> https://github.com/marketplace/travis-ci | `.travis.yml` |
| AppVeyor | Used for some Windows testing (e.g. cygwin, mingw) | https://www.appveyor.com/blog/2018/10/02/github-apps-integration/ <br> https://github.com/marketplace/appveyor | `appveyor.yml` |
| Cirrus CI | Used for testing on FreeBSD | https://github.com/marketplace/cirrus-ci/ | `.cirrus.yml` |
| Circle CI | Historically was used to provide faster signal,<br/> but we may be able to migrate these to Github Actions | https://circleci.com/docs/2.0/getting-started/#setting-up-circleci <br> https://youtu.be/Js3hMUsSZ2c <br> https://circleci.com/docs/2.0/enable-checks/ | `.circleci/config.yml` |
Note: the instructions linked above mostly cover how to set up a repository with CI from scratch.
The general idea should be the same for setting up CI on your fork of zstd, but you may have to
follow slightly different steps. In particular, please ignore any instructions related to setting up
config files (since zstd already has configs for each of these services).
## Performance
Performance is extremely important for zstd and we only merge pull requests whose performance
landscape and corresponding trade-offs have been adequately analyzed, reproduced, and presented.
This high bar for performance means that every PR which has the potential to
impact performance takes a very long time for us to properly review. That being said, we
always welcome contributions to improve performance (or worsen performance for the trade-off of
something else). Please keep the following in mind before submitting a performance related PR:
1. Zstd isn't as old as gzip but it has been around for time now and its evolution is
very well documented via past Github issues and pull requests. It may be the case that your
particular performance optimization has already been considered in the past. Please take some
time to search through old issues and pull requests using keywords specific to your
would-be PR. Of course, just because a topic has already been discussed (and perhaps rejected
on some grounds) in the past, doesn't mean it isn't worth bringing up again. But even in that case,
it will be helpful for you to have context from that topic's history before contributing.
2. The distinction between noise and actual performance gains can unfortunately be very subtle
especially when microbenchmarking extremely small wins or losses. The only remedy to getting
something subtle merged is extensive benchmarking. You will be doing us a great favor if you
take the time to run extensive, long-duration, and potentially cross-(os, platform, process, etc)
benchmarks on your end before submitting a PR. Of course, you will not be able to benchmark
your changes on every single processor and os out there (and neither will we) but do that best
you can:) We've added some things to think about when benchmarking below in the Benchmarking
Performance section which might be helpful for you.
3. Optimizing performance for a certain OS, processor vendor, compiler, or network system is a perfectly
legitimate thing to do as long as it does not harm the overall performance health of Zstd.
This is a hard balance to strike but please keep in mind other aspects of Zstd when
submitting changes that are clang-specific, windows-specific, etc.
## Benchmarking Performance
Performance microbenchmarking is a tricky subject but also essential for Zstd. We value empirical
testing over theoretical speculation. This guide it not perfect but for most scenarios, it
is a good place to start.
### Stability
Unfortunately, the most important aspect in being able to benchmark reliably is to have a stable
benchmarking machine. A virtual machine, a machine with shared resources, or your laptop
will typically not be stable enough to obtain reliable benchmark results. If you can get your
hands on a desktop, this is usually a better scenario.
Of course, benchmarking can be done on non-hyper-stable machines as well. You will just have to
do a little more work to ensure that you are in fact measuring the changes you've made and not
noise. Here are some things you can do to make your benchmarks more stable:
1. The most simple thing you can do to drastically improve the stability of your benchmark is
to run it multiple times and then aggregate the results of those runs. As a general rule of
thumb, the smaller the change you are trying to measure, the more samples of benchmark runs
you will have to aggregate over to get reliable results. Here are some additional things to keep in
mind when running multiple trials:
* How you aggregate your samples are important. You might be tempted to use the mean of your
results. While this is certainly going to be a more stable number than a raw single sample
benchmark number, you might have more luck by taking the median. The mean is not robust to
outliers whereas the median is. Better still, you could simply take the fastest speed your
benchmark achieved on each run since that is likely the fastest your process will be
capable of running your code. In our experience, this (aggregating by just taking the sample
with the fastest running time) has been the most stable approach.
* The more samples you have, the more stable your benchmarks should be. You can verify
your improved stability by looking at the size of your confidence intervals as you
increase your sample count. These should get smaller and smaller. Eventually hopefully
smaller than the performance win you are expecting.
* Most processors will take some time to get `hot` when running anything. The observations
you collect during that time period will very different from the true performance number. Having
a very large number of sample will help alleviate this problem slightly but you can also
address is directly by simply not including the first `n` iterations of your benchmark in
your aggregations. You can determine `n` by simply looking at the results from each iteration
and then hand picking a good threshold after which the variance in results seems to stabilize.
2. You cannot really get reliable benchmarks if your host machine is simultaneously running
another cpu/memory-intensive application in the background. If you are running benchmarks on your
personal laptop for instance, you should close all applications (including your code editor and
browser) before running your benchmarks. You might also have invisible background applications
running. You can see what these are by looking at either Activity Monitor on Mac or Task Manager
on Windows. You will get more stable benchmark results of you end those processes as well.
* If you have multiple cores, you can even run your benchmark on a reserved core to prevent
pollution from other OS and user processes. There are a number of ways to do this depending
on your OS:
* On linux boxes, you have use https://github.com/lpechacek/cpuset.
* On Windows, you can "Set Processor Affinity" using https://www.thewindowsclub.com/processor-affinity-windows
* On Mac, you can try to use their dedicated affinity API https://developer.apple.com/library/archive/releasenotes/Performance/RN-AffinityAPI/#//apple_ref/doc/uid/TP40006635-CH1-DontLinkElementID_2
3. To benchmark, you will likely end up writing a separate c/c++ program that will link libzstd.
Dynamically linking your library will introduce some added variation (not a large amount but
definitely some). Statically linking libzstd will be more stable. Static libraries should
be enabled by default when building zstd.
4. Use a profiler with a good high resolution timer. See the section below on profiling for
details on this.
5. Disable frequency scaling, turbo boost and address space randomization (this will vary by OS)
6. Try to avoid storage. On some systems you can use tmpfs. Putting the program, inputs and outputs on
tmpfs avoids touching a real storage system, which can have a pretty big variability.
Also check our LLVM's guide on benchmarking here: https://llvm.org/docs/Benchmarking.html
### Zstd benchmark
The fastest signal you can get regarding your performance changes is via the in-build zstd cli
bench option. You can run Zstd as you typically would for your scenario using some set of options
and then additionally also specify the `-b#` option. Doing this will run our benchmarking pipeline
for that options you have just provided. If you want to look at the internals of how this
benchmarking script works, you can check out programs/benchzstd.c
For example: say you have made a change that you believe improves the speed of zstd level 1. The
very first thing you should use to assess whether you actually achieved any sort of improvement
is `zstd -b`. You might try to do something like this. Note: you can use the `-i` option to
specify a running time for your benchmark in seconds (default is 3 seconds).
Usually, the longer the running time, the more stable your results will be.
```
$ git checkout <commit-before-your-change>
$ make && cp zstd zstd-old
$ git checkout <commit-after-your-change>
$ make && cp zstd zstd-new
$ zstd-old -i5 -b1 <your-test-data>
1<your-test-data> : 8990 -> 3992 (2.252), 302.6 MB/s , 626.4 MB/s
$ zstd-new -i5 -b1 <your-test-data>
1<your-test-data> : 8990 -> 3992 (2.252), 302.8 MB/s , 628.4 MB/s
```
Unless your performance win is large enough to be visible despite the intrinsic noise
on your computer, benchzstd alone will likely not be enough to validate the impact of your
changes. For example, the results of the example above indicate that effectively nothing
changed but there could be a small <3% improvement that the noise on the host machine
obscured. So unless you see a large performance win (10-15% consistently) using just
this method of evaluation will not be sufficient.
### Profiling
There are a number of great profilers out there. We're going to briefly mention how you can
profile your code using `instruments` on mac, `perf` on linux and `visual studio profiler`
on Windows.
Say you have an idea for a change that you think will provide some good performance gains
for level 1 compression on Zstd. Typically this means, you have identified a section of
code that you think can be made to run faster.
The first thing you will want to do is make sure that the piece of code is actually taking up
a notable amount of time to run. It is usually not worth optimizing something which accounts for less than
0.0001% of the total running time. Luckily, there are tools to help with this.
Profilers will let you see how much time your code spends inside a particular function.
If your target code snippet is only part of a function, it might be worth trying to
isolate that snippet by moving it to its own function (this is usually not necessary but
might be).
Most profilers (including the profilers discussed below) will generate a call graph of
functions for you. Your goal will be to find your function of interest in this call graph
and then inspect the time spent inside of it. You might also want to look at the annotated
assembly which most profilers will provide you with.
#### Instruments
We will once again consider the scenario where you think you've identified a piece of code
whose performance can be improved upon. Follow these steps to profile your code using
Instruments.
1. Open Instruments
2. Select `Time Profiler` from the list of standard templates
3. Close all other applications except for your instruments window and your terminal
4. Run your benchmarking script from your terminal window
* You will want a benchmark that runs for at least a few seconds (5 seconds will
usually be long enough). This way the profiler will have something to work with
and you will have ample time to attach your profiler to this process:)
* I will just use benchzstd as my benchmarmking script for this example:
```
$ zstd -b1 -i5 <my-data> # this will run for 5 seconds
```
5. Once you run your benchmarking script, switch back over to instruments and attach your
process to the time profiler. You can do this by:
* Clicking on the `All Processes` drop down in the top left of the toolbar.
* Selecting your process from the dropdown. In my case, it is just going to be labeled
`zstd`
* Hitting the bright red record circle button on the top left of the toolbar
6. You profiler will now start collecting metrics from your benchmarking script. Once
you think you have collected enough samples (usually this is the case after 3 seconds of
recording), stop your profiler.
7. Make sure that in toolbar of the bottom window, `profile` is selected.
8. You should be able to see your call graph.
* If you don't see the call graph or an incomplete call graph, make sure you have compiled
zstd and your benchmarking script using debug flags. On mac and linux, this just means
you will have to supply the `-g` flag alone with your build script. You might also
have to provide the `-fno-omit-frame-pointer` flag
9. Dig down the graph to find your function call and then inspect it by double clicking
the list item. You will be able to see the annotated source code and the assembly side by
side.
#### Perf
This wiki has a pretty detailed tutorial on getting started working with perf so we'll
leave you to check that out of you're getting started:
https://perf.wiki.kernel.org/index.php/Tutorial
Some general notes on perf:
* Use `perf stat -r # <bench-program>` to quickly get some relevant timing and
counter statistics. Perf uses a high resolution timer and this is likely one
of the first things your team will run when assessing your PR.
* Perf has a long list of hardware counters that can be viewed with `perf --list`.
When measuring optimizations, something worth trying is to make sure the hardware
counters you expect to be impacted by your change are in fact being so. For example,
if you expect the L1 cache misses to decrease with your change, you can look at the
counter `L1-dcache-load-misses`
* Perf hardware counters will not work on a virtual machine.
#### Visual Studio
Build Zstd with symbols first (for example `cmake -B build -S build/cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo && ninja -C build zstd`) so the profiler resolves call stacks.
* Launch Visual Studio’s Performance Profiler (`Alt+F2`), enable CPU Usage (optionally Instrumentation), and point it at the `programs/zstd` benchmark you want to run.
* If you prefer to start the benchmark from a terminal, use “Attach to running process” to latch onto it mid-run; keep frame pointers (`-fno-omit-frame-pointer`) for clean stacks.
* When you stop the capture, review the call tree, hot path, and annotated source panes
* Microsoft’s [Performance Profiling docs](https://learn.microsoft.com/en-us/visualstudio/profiling/?view=vs-2022) cover deeper sampling, ETW, and collection options if required.
## Issues
We use GitHub issues to track public bugs. Please ensure your description is
clear and has sufficient instructions to be able to reproduce the issue.
Facebook has a [bounty program](https://www.facebook.com/whitehat/) for the safe
disclosure of security bugs. In those cases, please go through the process
outlined on that page and do not file a public issue.
## Coding Style
It's a pretty long topic, which is difficult to summarize in a single paragraph.
As a rule of thumbs, try to imitate the coding style of
similar lines of codes around your contribution.
The following is a non-exhaustive list of rules employed in zstd code base:
### C90
This code base is following strict C90 standard,
with 2 extensions : 64-bit `long long` types, and variadic macros.
This rule is applied strictly to code within `lib/` and `programs/`.
Sub-project in `contrib/` are allowed to use other conventions.
### C++ direct compatibility : symbol mangling
All public symbol declarations must be wrapped in `extern “C” { … }`,
so that this project can be compiled as C++98 code,
and linked into C++ applications.
### Minimal Frugal
This design requirement is fundamental to preserve the portability of the code base.
#### Dependencies
- Reduce dependencies to the minimum possible level.
Any dependency should be considered “bad” by default,
and only tolerated because it provides a service in a better way than can be achieved locally.
The only external dependencies this repository tolerates are
standard C libraries, and in rare cases, system level headers.
- Within `lib/`, this policy is even more drastic.
The only external dependencies allowed are `<assert.h>`, `<stdlib.h>`, `<string.h>`,
and even then, not directly.
In particular, no function shall ever allocate on heap directly,
and must use instead `ZSTD_malloc()` and equivalent.
Other accepted non-symbol headers are `<stddef.h>` and `<limits.h>`.
- Within the project, there is a strict hierarchy of dependencies that must be respected.
`programs/` is allowed to depend on `lib/`, but only its public API.
Within `lib/`, `lib/common` doesn't depend on any other directory.
`lib/compress` and `lib/decompress` shall not depend on each other.
`lib/dictBuilder` can depend on `lib/common` and `lib/compress`, but not `lib/decompress`.
#### Resources
- Functions in `lib/` must use very little stack space,
several dozens of bytes max.
Everything larger must use the heap allocator,
or require a scratch buffer to be emplaced manually.
### Naming
* All public symbols are prefixed with `ZSTD_`
+ private symbols, with a scope limited to their own unit, are free of this restriction.
However, since `libzstd` source code can be amalgamated,
each symbol name must attempt to be (and remain) unique.
Avoid too generic names that could become ground for future collisions.
This generally implies usage of some form of prefix.
* For symbols (functions and variables), naming convention is `PREFIX_camelCase`.
+ In some advanced cases, one can also find :
- `PREFIX_prefix2_camelCase`
- `PREFIX_camelCase_extendedQualifier`
* Multi-words names generally consist of an action followed by object:
- for example : `ZSTD_createCCtx()`
* Prefer positive actions
- `goBackward` rather than `notGoForward`
* Type names (`struct`, etc.) follow similar convention,
except that they are allowed and even invited to start by an Uppercase letter.
Example : `ZSTD_CCtx`, `ZSTD_CDict`
* Macro names are all Capital letters.
The same composition rules (`PREFIX_NAME_QUALIFIER`) apply.
* File names are all lowercase letters.
The convention is `snake_case`.
File names **must** be unique across the entire code base,
even when they stand in clearly separated directories.
### Qualifiers
* This code base is `const` friendly, if not `const` fanatical.
Any variable that can be `const` (aka. read-only) **must** be `const`.
Any pointer which content will not be modified must be `const`.
This property is then controlled at compiler level.
`const` variables are an important signal to readers that this variable isn't modified.
Conversely, non-const variables are a signal to readers to watch out for modifications later on in the function.
* If a function must be inlined, mention it explicitly,
using project's own portable macros, such as `FORCE_INLINE_ATTR`,
defined in `lib/common/compiler.h`.
### Debugging
* **Assertions** are welcome, and should be used very liberally,
to control any condition the code expects for its correct execution.
These assertion checks will be run in debug builds, and disabled in production.
* For traces, this project provides its own debug macros,
in particular `DEBUGLOG(level, ...)`, defined in `lib/common/debug.h`.
### Code documentation
* Avoid code documentation that merely repeats what the code is already stating.
Whenever applicable, prefer employing the code as the primary way to convey explanations.
Example 1 : `int nbTokens = n;` instead of `int i = n; /* i is a nb of tokens *./`.
Example 2 : `assert(size > 0);` instead of `/* here, size should be positive */`.
* At declaration level, the documentation explains how to use the function or variable
and when applicable why it's needed, of the scenarios where it can be useful.
* At implementation level, the documentation explains the general outline of the algorithm employed,
and when applicable why this specific choice was preferred.
### General layout
* 4 spaces for indentation rather than tabs
* Code documentation shall directly precede function declaration or implementation
* Function implementations and its code documentation should be preceded and followed by an empty line
## License
By contributing to Zstandard, you agree that your contributions will be licensed
under both the [LICENSE](LICENSE) file and the [COPYING](COPYING) file in the root directory of this source tree.
================================================
FILE: COPYING
================================================
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.
================================================
FILE: LICENSE
================================================
BSD License
For Zstandard software
Copyright (c) Meta Platforms, Inc. and affiliates. All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name Facebook, nor Meta, nor the names of its contributors may
be used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
================================================
FILE: Makefile
================================================
# ################################################################
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under both the BSD-style license (found in the
# LICENSE file in the root directory of this source tree) and the GPLv2 (found
# in the COPYING file in the root directory of this source tree).
# You may select, at your option, one of the above-listed licenses.
# ################################################################
# verbose mode (print commands) on V=1 or VERBOSE=1
Q = $(if $(filter 1,$(V) $(VERBOSE)),,@)
PRGDIR = programs
ZSTDDIR = lib
BUILDIR = build
ZWRAPDIR = zlibWrapper
TESTDIR = tests
FUZZDIR = $(TESTDIR)/fuzz
# Define nul output
VOID = /dev/null
# When cross-compiling from linux to windows, you might
# need to specify this as "Windows." Fedora build fails
# without it.
#
# Note: mingw-w64 build from linux to windows does not
# fail on other tested distros (ubuntu, debian) even
# without manually specifying the TARGET_SYSTEM.
TARGET_SYSTEM ?= $(OS)
CP ?= cp
ifneq (,$(filter Windows%,$(TARGET_SYSTEM)))
EXT =.exe
else
EXT =
endif
## default: Build lib-release and zstd-release
.PHONY: default
default: lib-release zstd-release
.PHONY: all
all: allmost examples manual contrib
.PHONY: allmost
allmost: allzstd zlibwrapper
# skip zwrapper, can't build that on alternate architectures without the proper zlib installed
.PHONY: allzstd
allzstd: lib
$(Q)$(MAKE) -C $(PRGDIR) all
$(Q)$(MAKE) -C $(TESTDIR) all
.PHONY: all32
all32:
$(MAKE) -C $(PRGDIR) zstd32
$(MAKE) -C $(TESTDIR) all32
.PHONY: lib lib-release lib-mt lib-nomt
lib lib-release lib-mt lib-nomt:
$(Q)$(MAKE) -C $(ZSTDDIR) $@
.PHONY: zstd zstd-release
zstd zstd-release:
$(Q)$(MAKE) -C $(PRGDIR) $@
$(Q)ln -sf $(PRGDIR)/zstd$(EXT) zstd$(EXT)
.PHONY: zstdmt
zstdmt:
$(Q)$(MAKE) -C $(PRGDIR) $@
$(Q)$(CP) $(PRGDIR)/zstd$(EXT) ./zstdmt$(EXT)
.PHONY: zlibwrapper
zlibwrapper: lib
$(MAKE) -C $(ZWRAPDIR) all
## test: run long-duration tests
.PHONY: test
DEBUGLEVEL ?= 1
test: MOREFLAGS += -g -Werror
test:
DEBUGLEVEL=$(DEBUGLEVEL) MOREFLAGS="$(MOREFLAGS)" $(MAKE) -j -C $(PRGDIR) allVariants
$(MAKE) -C $(TESTDIR) $@
ZSTD=../../programs/zstd $(MAKE) -C doc/educational_decoder $@
## check: run basic tests for `zstd` cli
.PHONY: check
check:
$(Q)$(MAKE) -C $(TESTDIR) $@
.PHONY: automated_benchmarking
automated_benchmarking:
$(MAKE) -C $(TESTDIR) $@
.PHONY: benchmarking
benchmarking: automated_benchmarking
## examples: build all examples in `examples/` directory
.PHONY: examples
examples: lib
$(MAKE) -C examples all
## manual: generate API documentation in html format
.PHONY: manual
manual:
$(MAKE) -C contrib/gen_html $@
## man: generate man page
.PHONY: man
man:
$(MAKE) -C programs $@
## contrib: build all supported projects in `/contrib` directory
.PHONY: contrib
contrib: lib
$(MAKE) -C contrib/pzstd all
$(MAKE) -C contrib/seekable_format/examples all
$(MAKE) -C contrib/seekable_format/tests test
$(MAKE) -C contrib/largeNbDicts all
$(MAKE) -C contrib/externalSequenceProducer all
cd build/single_file_libs/ ; ./build_decoder_test.sh
cd build/single_file_libs/ ; ./build_library_test.sh
.PHONY: cleanTabs
cleanTabs:
cd contrib; ./cleanTabs
.PHONY: clean
clean:
$(Q)$(MAKE) -C $(ZSTDDIR) $@ > $(VOID)
$(Q)$(MAKE) -C $(PRGDIR) $@ > $(VOID)
$(Q)$(MAKE) -C $(TESTDIR) $@ > $(VOID)
$(Q)$(MAKE) -C $(ZWRAPDIR) $@ > $(VOID)
$(Q)$(MAKE) -C examples/ $@ > $(VOID)
$(Q)$(MAKE) -C contrib/gen_html $@ > $(VOID)
$(Q)$(MAKE) -C contrib/pzstd $@ > $(VOID)
$(Q)$(MAKE) -C contrib/seekable_format/examples $@ > $(VOID)
$(Q)$(MAKE) -C contrib/seekable_format/tests $@ > $(VOID)
$(Q)$(MAKE) -C contrib/largeNbDicts $@ > $(VOID)
$(Q)$(MAKE) -C contrib/externalSequenceProducer $@ > $(VOID)
$(Q)$(RM) zstd$(EXT) zstdmt$(EXT) tmp*
$(Q)$(RM) -r lz4 cmakebuild mesonbuild install
@echo Cleaning completed
LIBZSTD_MK_DIR = $(ZSTDDIR)
include $(LIBZSTD_MK_DIR)/install_oses.mk # UNAME, INSTALL_OS_LIST
#------------------------------------------------------------------------------
# make install is validated only for Linux, macOS, Hurd and some BSD targets
#------------------------------------------------------------------------------
ifneq (,$(filter $(INSTALL_OS_LIST),$(UNAME)))
HOST_OS = POSIX
MKDIR ?= mkdir -p
HAVE_COLORNEVER = $(shell echo a | egrep --color=never a > /dev/null 2> /dev/null && echo 1 || echo 0)
EGREP_OPTIONS ?=
ifeq ($(HAVE_COLORNEVER), 1)
EGREP_OPTIONS += --color=never
endif
EGREP = egrep $(EGREP_OPTIONS)
# Print a two column output of targets and their description. To add a target description, put a
# comment in the Makefile with the format "## <TARGET>: <DESCRIPTION>". For example:
#
## list: Print all targets and their descriptions (if provided)
.PHONY: list
list:
$(Q)TARGETS=$$($(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null \
| awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' \
| $(EGREP) -v -e '^[^[:alnum:]]' | sort); \
{ \
printf "Target Name\tDescription\n"; \
printf "%0.s-" {1..16}; printf "\t"; printf "%0.s-" {1..40}; printf "\n"; \
for target in $$TARGETS; do \
line=$$($(EGREP) "^##[[:space:]]+$$target:" $(lastword $(MAKEFILE_LIST))); \
description=$$(echo $$line | awk '{i=index($$0,":"); print substr($$0,i+1)}' | xargs); \
printf "$$target\t$$description\n"; \
done \
} | column -t -s $$'\t'
.PHONY: install armtest usan asan uasan msan asan32
install:
$(Q)$(MAKE) -C $(ZSTDDIR) $@
$(Q)$(MAKE) -C $(PRGDIR) $@
.PHONY: uninstall
uninstall:
$(Q)$(MAKE) -C $(ZSTDDIR) $@
$(Q)$(MAKE) -C $(PRGDIR) $@
.PHONY: travis-install
travis-install:
$(MAKE) install PREFIX=~/install_test_dir
.PHONY: clangbuild-darwin-fat
clangbuild-darwin-fat: clean
clang -v
CXX=clang++ CC=clang CFLAGS+="-Werror -Wconversion -Wno-sign-conversion -Wdocumentation -arch arm64" $(MAKE) zstd-release
mv programs/zstd programs/zstd_arm64
CXX=clang++ CC=clang CFLAGS+="-Werror -Wconversion -Wno-sign-conversion -Wdocumentation -arch x86_64" $(MAKE) zstd-release
mv programs/zstd programs/zstd_x64
lipo -create programs/zstd_x64 programs/zstd_arm64 -output programs/zstd
.PHONY: gcc5build gcc6build gcc7build clangbuild m32build armbuild aarch64build ppcbuild ppc64build
gcc5build: clean
gcc-5 -v
CC=gcc-5 $(MAKE) all MOREFLAGS="-Werror $(MOREFLAGS)"
gcc6build: clean
gcc-6 -v
CC=gcc-6 $(MAKE) all MOREFLAGS="-Werror $(MOREFLAGS)"
gcc7build: clean
gcc-7 -v
CC=gcc-7 $(MAKE) all MOREFLAGS="-Werror $(MOREFLAGS)"
clangbuild: clean
clang -v
CXX=clang++ CC=clang CFLAGS="-Werror -Wconversion -Wno-sign-conversion -Wdocumentation" $(MAKE) all
m32build: clean
gcc -v
$(MAKE) all32
armbuild: clean
CC=arm-linux-gnueabi-gcc CFLAGS="-Werror" $(MAKE) allzstd
aarch64build: clean
CC=aarch64-linux-gnu-gcc CFLAGS="-Werror -O0" $(MAKE) allzstd
ppcbuild: clean
CC=powerpc-linux-gnu-gcc CFLAGS="-m32 -Wno-attributes -Werror" $(MAKE) -j allzstd
ppc64build: clean
CC=powerpc-linux-gnu-gcc CFLAGS="-m64 -Werror" $(MAKE) -j allzstd
.PHONY: armfuzz aarch64fuzz ppcfuzz ppc64fuzz
armfuzz: clean
CC=arm-linux-gnueabi-gcc QEMU_SYS=qemu-arm-static MOREFLAGS="-static $(MOREFLAGS)" FUZZER_FLAGS="--no-big-tests $(FUZZER_FLAGS)" $(MAKE) -C $(TESTDIR) fuzztest
aarch64fuzz: clean
ld -v
CC=aarch64-linux-gnu-gcc QEMU_SYS=qemu-aarch64-static MOREFLAGS="-static $(MOREFLAGS)" FUZZER_FLAGS="--no-big-tests $(FUZZER_FLAGS)" $(MAKE) -C $(TESTDIR) fuzztest
ppcfuzz: clean
CC=powerpc-linux-gnu-gcc QEMU_SYS=qemu-ppc-static MOREFLAGS="-static $(MOREFLAGS)" FUZZER_FLAGS="--no-big-tests $(FUZZER_FLAGS)" $(MAKE) -C $(TESTDIR) fuzztest
ppc64fuzz: clean
CC=powerpc-linux-gnu-gcc QEMU_SYS=qemu-ppc64-static MOREFLAGS="-m64 -static $(MOREFLAGS)" FUZZER_FLAGS="--no-big-tests $(FUZZER_FLAGS)" $(MAKE) -C $(TESTDIR) fuzztest
.PHONY: cxxtest gcc5test gcc6test armtest aarch64test ppctest ppc64test
cxxtest: CXXFLAGS += -Wall -Wextra -Wundef -Wshadow -Wcast-align -Werror
cxxtest: clean
$(MAKE) -C $(PRGDIR) all CC="$(CXX) -Wno-deprecated" CFLAGS="$(CXXFLAGS)" # adding -Wno-deprecated to avoid clang++ warning on dealing with C files directly
gcc5test: clean
gcc-5 -v
$(MAKE) all CC=gcc-5 MOREFLAGS="-Werror $(MOREFLAGS)"
gcc6test: clean
gcc-6 -v
$(MAKE) all CC=gcc-6 MOREFLAGS="-Werror $(MOREFLAGS)"
armtest: clean
$(MAKE) -C $(TESTDIR) datagen # use native, faster
$(MAKE) -C $(TESTDIR) test CC=arm-linux-gnueabi-gcc QEMU_SYS=qemu-arm-static ZSTDRTTEST= MOREFLAGS="-Werror -static $(MOREFLAGS)" FUZZER_FLAGS="--no-big-tests $(FUZZER_FLAGS)"
aarch64test:
$(MAKE) -C $(TESTDIR) datagen # use native, faster
$(MAKE) -C $(TESTDIR) test CC=aarch64-linux-gnu-gcc QEMU_SYS=qemu-aarch64-static ZSTDRTTEST= MOREFLAGS="-Werror -static $(MOREFLAGS)" FUZZER_FLAGS="--no-big-tests $(FUZZER_FLAGS)"
ppctest: clean
$(MAKE) -C $(TESTDIR) datagen # use native, faster
$(MAKE) -C $(TESTDIR) test CC=powerpc-linux-gnu-gcc QEMU_SYS=qemu-ppc-static ZSTDRTTEST= MOREFLAGS="-Werror -Wno-attributes -static $(MOREFLAGS)" FUZZER_FLAGS="--no-big-tests $(FUZZER_FLAGS)"
ppc64test: clean
$(MAKE) -C $(TESTDIR) datagen # use native, faster
$(MAKE) -C $(TESTDIR) test CC=powerpc-linux-gnu-gcc QEMU_SYS=qemu-ppc64-static ZSTDRTTEST= MOREFLAGS="-m64 -static $(MOREFLAGS)" FUZZER_FLAGS="--no-big-tests $(FUZZER_FLAGS)"
.PHONY: arm-ppc-compilation
arm-ppc-compilation:
$(MAKE) -C $(PRGDIR) clean zstd CC=arm-linux-gnueabi-gcc QEMU_SYS=qemu-arm-static ZSTDRTTEST= MOREFLAGS="-Werror -static $(MOREFLAGS)"
$(MAKE) -C $(PRGDIR) clean zstd CC=aarch64-linux-gnu-gcc QEMU_SYS=qemu-aarch64-static ZSTDRTTEST= MOREFLAGS="-Werror -static $(MOREFLAGS)"
$(MAKE) -C $(PRGDIR) clean zstd CC=powerpc-linux-gnu-gcc QEMU_SYS=qemu-ppc-static ZSTDRTTEST= MOREFLAGS="-Werror -Wno-attributes -static $(MOREFLAGS)"
$(MAKE) -C $(PRGDIR) clean zstd CC=powerpc-linux-gnu-gcc QEMU_SYS=qemu-ppc64-static ZSTDRTTEST= MOREFLAGS="-m64 -static $(MOREFLAGS)"
regressiontest:
$(MAKE) -C $(FUZZDIR) regressiontest
uasanregressiontest:
$(MAKE) -C $(FUZZDIR) regressiontest CC=clang CXX=clang++ CFLAGS="-O3 -fsanitize=address,undefined -Werror" CXXFLAGS="-O3 -fsanitize=address,undefined -Werror"
msanregressiontest:
$(MAKE) -C $(FUZZDIR) regressiontest CC=clang CXX=clang++ CFLAGS="-O3 -fsanitize=memory -Werror" CXXFLAGS="-O3 -fsanitize=memory -Werror"
update_regressionResults : REGRESS_RESULTS_DIR := /tmp/regress_results_dir/
update_regressionResults:
$(MAKE) -j -C programs zstd
$(MAKE) -j -C tests/regression test
$(RM) -r $(REGRESS_RESULTS_DIR)
$(MKDIR) $(REGRESS_RESULTS_DIR)
./tests/regression/test \
--cache tests/regression/cache \
--output $(REGRESS_RESULTS_DIR)/results.csv \
--zstd programs/zstd
echo "Showing results differences"
! diff tests/regression/results.csv $(REGRESS_RESULTS_DIR)/results.csv
echo "Updating results.csv"
$(CP) $(REGRESS_RESULTS_DIR)/results.csv tests/regression/results.csv
# run UBsan with -fsanitize-recover=pointer-overflow
# this only works with recent compilers such as gcc 8+
usan: clean
$(MAKE) test CC=clang MOREFLAGS="-g -fno-sanitize-recover=all -fsanitize=undefined -Werror $(MOREFLAGS)"
asan: clean
$(MAKE) test CC=clang MOREFLAGS="-g -fsanitize=address -Werror $(MOREFLAGS)"
asan-%: clean
LDFLAGS=-fuse-ld=gold MOREFLAGS="-g -fno-sanitize-recover=all -fsanitize=address -Werror $(MOREFLAGS)" $(MAKE) -C $(TESTDIR) $*
msan: clean
$(MAKE) test CC=clang MOREFLAGS="-g -fsanitize=memory -fno-omit-frame-pointer -Werror $(MOREFLAGS)" HAVE_LZMA=0 # datagen.c fails this test for no obvious reason
msan-%:
$(MAKE) clean
LDFLAGS=-fuse-ld=gold MOREFLAGS="-g -fno-sanitize-recover=all -fsanitize=memory -fno-omit-frame-pointer -Werror $(MOREFLAGS)" FUZZER_FLAGS="--no-big-tests $(FUZZER_FLAGS)" $(MAKE) -j -C $(TESTDIR) HAVE_LZMA=0 $*
asan32: clean
$(MAKE) -C $(TESTDIR) test32 CC=clang MOREFLAGS="-g -fsanitize=address $(MOREFLAGS)"
uasan: clean
$(MAKE) test CC=clang MOREFLAGS="-g -fno-sanitize-recover=all -fsanitize=address,undefined -Werror $(MOREFLAGS)"
uasan-%: clean
LDFLAGS=-fuse-ld=gold MOREFLAGS="-g -fno-sanitize-recover=all -fsanitize=address,undefined -Werror $(MOREFLAGS)" $(MAKE) -C $(TESTDIR) $*
tsan-%: clean
LDFLAGS=-fuse-ld=gold MOREFLAGS="-g -fno-sanitize-recover=all -fsanitize=thread -Werror $(MOREFLAGS)" $(MAKE) -C $(TESTDIR) $* FUZZER_FLAGS="--no-big-tests $(FUZZER_FLAGS)"
.PHONY: apt-install
apt-install:
# TODO: uncomment once issue 3011 is resolved and remove hack from Github Actions .yml
# sudo apt-get update
sudo apt-get -yq --no-install-suggests --no-install-recommends --force-yes install $(APT_PACKAGES)
.PHONY: apt-add-repo
apt-add-repo:
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt-get update -y -qq
.PHONY: ppcinstall arminstall valgrindinstall libc6install gcc6install gcc7install gcc8install gpp6install clang38install
ppcinstall:
APT_PACKAGES="qemu-system-ppc qemu-user-static gcc-powerpc-linux-gnu" $(MAKE) apt-install
arminstall:
APT_PACKAGES="qemu-system-arm qemu-user-static gcc-arm-linux-gnueabi libc6-dev-armel-cross gcc-aarch64-linux-gnu libc6-dev-arm64-cross" $(MAKE) apt-install
valgrindinstall:
APT_PACKAGES="valgrind" $(MAKE) apt-install
libc6install:
APT_PACKAGES="libc6-dev-i386 gcc-multilib" $(MAKE) apt-install
gcc6install: apt-add-repo
APT_PACKAGES="libc6-dev-i386 gcc-multilib gcc-6 gcc-6-multilib" $(MAKE) apt-install
gcc7install: apt-add-repo
APT_PACKAGES="libc6-dev-i386 gcc-multilib gcc-7 gcc-7-multilib" $(MAKE) apt-install
gcc8install: apt-add-repo
APT_PACKAGES="libc6-dev-i386 gcc-multilib gcc-8 gcc-8-multilib" $(MAKE) apt-install
gpp6install: apt-add-repo
APT_PACKAGES="libc6-dev-i386 g++-multilib gcc-6 g++-6 g++-6-multilib" $(MAKE) apt-install
clang38install:
APT_PACKAGES="clang-3.8" $(MAKE) apt-install
endif
ifneq (,$(filter MSYS%,$(shell sh -c 'MSYSTEM="MSYS" uname') ))
HOST_OS = MSYS
endif
#------------------------------------------------------------------------
# target specific tests
#------------------------------------------------------------------------
ifneq (,$(filter MSYS POSIX,$(HOST_OS)))
CMAKE ?= cmake
CMAKE_PARAMS = -DZSTD_BUILD_CONTRIB:BOOL=ON -DZSTD_BUILD_STATIC:BOOL=ON -DZSTD_BUILD_TESTS:BOOL=ON -DZSTD_ZLIB_SUPPORT:BOOL=ON -DZSTD_LZMA_SUPPORT:BOOL=ON
ifneq (,$(filter MSYS%,$(shell sh -c 'MSYSTEM="MSYS" uname')))
CMAKE_PARAMS = -G"MSYS Makefiles" -DZSTD_MULTITHREAD_SUPPORT:BOOL=OFF -DZSTD_BUILD_STATIC:BOOL=ON -DZSTD_BUILD_TESTS:BOOL=ON
endif
.PHONY: cmakebuild
cmakebuild:
$(CMAKE) --version
$(RM) -r cmakebuild install
$(MKDIR) cmakebuild install
cd cmakebuild; $(CMAKE) -Wdev -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS="-Werror -O0" -DCMAKE_INSTALL_PREFIX=install $(CMAKE_PARAMS) ../build/cmake
$(CMAKE) --build cmakebuild --target install -- -j V=1
cd cmakebuild; ctest -V -L Medium
MESON ?= meson
NINJA ?= ninja
.PHONY: mesonbuild
mesonbuild:
$(MESON) setup \
--buildtype=debugoptimized \
-Db_lundef=false \
-Dauto_features=enabled \
-Dbin_programs=true \
-Dbin_tests=true \
-Dbin_contrib=true \
-Ddefault_library=both \
build/meson mesonbuild
$(NINJA) -C mesonbuild/
$(MESON) test -C mesonbuild/ --print-errorlogs
$(MESON) install -C mesonbuild --destdir staging/
.PHONY: c89build gnu90build c99build gnu99build c11build bmix64build bmix32build bmi32build staticAnalyze
c89build: clean
$(CC) -v
CFLAGS="-std=c89 -Werror -Wno-attributes -Wpedantic -Wno-long-long -Wno-variadic-macros -O0" $(MAKE) lib zstd
gnu90build: clean
$(CC) -v
CFLAGS="-std=gnu90 -Werror -O0" $(MAKE) allmost
c99build: clean
$(CC) -v
CFLAGS="-std=c99 -Werror -O0" $(MAKE) allmost
gnu99build: clean
$(CC) -v
CFLAGS="-std=gnu99 -Werror -O0" $(MAKE) allmost
c11build: clean
$(CC) -v
CFLAGS="-std=c11 -Werror -O0" $(MAKE) allmost
bmix64build: clean
$(CC) -v
CFLAGS="-O3 -mbmi -Werror" $(MAKE) -C $(TESTDIR) test
bmix32build: clean
$(CC) -v
CFLAGS="-O3 -mbmi -mx32 -Werror" $(MAKE) -C $(TESTDIR) test
bmi32build: clean
$(CC) -v
CFLAGS="-O3 -mbmi -m32 -Werror" $(MAKE) -C $(TESTDIR) test
# static analyzer test uses clang's scan-build
# does not analyze zlibWrapper, due to detected issues in zlib source code
staticAnalyze: SCANBUILD ?= scan-build
staticAnalyze:
$(CC) -v
CC=$(CC) CPPFLAGS=-g $(SCANBUILD) --status-bugs -v $(MAKE) zstd
endif
================================================
FILE: Package.swift
================================================
// swift-tools-version:5.0
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "zstd",
platforms: [
.macOS(.v10_10), .iOS(.v9), .tvOS(.v9)
],
products: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
.library(
name: "libzstd",
targets: [ "libzstd" ])
],
dependencies: [
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages this package depends on.
.target(
name: "libzstd",
path: "lib",
sources: [ "common", "compress", "decompress", "dictBuilder" ],
publicHeadersPath: ".",
cSettings: [
.headerSearchPath(".")
])
],
swiftLanguageVersions: [.v5],
cLanguageStandard: .gnu11,
cxxLanguageStandard: .gnucxx14
)
================================================
FILE: README.md
================================================
<p align="center"><img src="https://raw.githubusercontent.com/facebook/zstd/dev/doc/images/zstd_logo86.png" alt="Zstandard"></p>
__Zstandard__, or `zstd` as short version, is a fast lossless compression algorithm,
targeting real-time compression scenarios at zlib-level and better compression ratios.
It's backed by a very fast entropy stage, provided by [Huff0 and FSE library](https://github.com/Cyan4973/FiniteStateEntropy).
Zstandard's format is stable and documented in [RFC8878](https://datatracker.ietf.org/doc/html/rfc8878). Multiple independent implementations are already available.
This repository represents the reference implementation, provided as an open-source dual [BSD](LICENSE) OR [GPLv2](COPYING) licensed **C** library,
and a command line utility producing and decoding `.zst`, `.gz`, `.xz` and `.lz4` files.
Should your project require another programming language,
a list of known ports and bindings is provided on [Zstandard homepage](https://facebook.github.io/zstd/#other-languages).
**Development branch status:**
[![Build Status][travisDevBadge]][travisLink]
[![Build status][CircleDevBadge]][CircleLink]
[![Build status][CirrusDevBadge]][CirrusLink]
[![Fuzzing Status][OSSFuzzBadge]][OSSFuzzLink]
[travisDevBadge]: https://api.travis-ci.com/facebook/zstd.svg?branch=dev "Continuous Integration test suite"
[travisLink]: https://travis-ci.com/facebook/zstd
[CircleDevBadge]: https://circleci.com/gh/facebook/zstd/tree/dev.svg?style=shield "Short test suite"
[CircleLink]: https://circleci.com/gh/facebook/zstd
[CirrusDevBadge]: https://api.cirrus-ci.com/github/facebook/zstd.svg?branch=dev
[CirrusLink]: https://cirrus-ci.com/github/facebook/zstd
[OSSFuzzBadge]: https://oss-fuzz-build-logs.storage.googleapis.com/badges/zstd.svg
[OSSFuzzLink]: https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:zstd
## Benchmarks
For reference, several fast compression algorithms were tested and compared
on a desktop featuring a Core i7-9700K CPU @ 4.9GHz
and running Ubuntu 24.04 (`Linux 6.8.0-53-generic`),
using [lzbench], an open-source in-memory benchmark by @inikep
compiled with [gcc] 14.2.0,
on the [Silesia compression corpus].
[lzbench]: https://github.com/inikep/lzbench
[Silesia compression corpus]: https://sun.aei.polsl.pl//~sdeor/index.php?page=silesia
[gcc]: https://gcc.gnu.org/
| Compressor name | Ratio | Compression| Decompress.|
| --------------- | ------| -----------| ---------- |
| **zstd 1.5.7 -1** | 2.896 | 510 MB/s | 1550 MB/s |
| brotli 1.1.0 -1 | 2.883 | 290 MB/s | 425 MB/s |
| [zlib] 1.3.1 -1 | 2.743 | 105 MB/s | 390 MB/s |
| **zstd 1.5.7 --fast=1** | 2.439 | 545 MB/s | 1850 MB/s |
| quicklz 1.5.0 -1 | 2.238 | 520 MB/s | 750 MB/s |
| **zstd 1.5.7 --fast=4** | 2.146 | 665 MB/s | 2050 MB/s |
| lzo1x 2.10 -1 | 2.106 | 650 MB/s | 780 MB/s |
| [lz4] 1.10.0 | 2.101 | 675 MB/s | 3850 MB/s |
| snappy 1.2.1 | 2.089 | 520 MB/s | 1500 MB/s |
| lzf 3.6 -1 | 2.077 | 410 MB/s | 820 MB/s |
[zlib]: https://www.zlib.net/
[lz4]: https://lz4.github.io/lz4/
The negative compression levels, specified with `--fast=#`,
offer faster compression and decompression speed
at the cost of compression ratio.
Zstd can also offer stronger compression ratios at the cost of compression speed.
Speed vs Compression trade-off is configurable by small increments.
Decompression speed is preserved and remains roughly the same at all settings,
a property shared by most LZ compression algorithms, such as [zlib] or lzma.
The following tests were run
on a server running Linux Debian (`Linux version 4.14.0-3-amd64`)
with a Core i7-6700K CPU @ 4.0GHz,
using [lzbench], an open-source in-memory benchmark by @inikep
compiled with [gcc] 7.3.0,
on the [Silesia compression corpus].
Compression Speed vs Ratio | Decompression Speed
---------------------------|--------------------
 | 
A few other algorithms can produce higher compression ratios at slower speeds, falling outside of the graph.
For a larger picture including slow modes, [click on this link](doc/images/DCspeed5.png).
## The case for Small Data compression
Previous charts provide results applicable to typical file and stream scenarios (several MB). Small data comes with different perspectives.
The smaller the amount of data to compress, the more difficult it is to compress. This problem is common to all compression algorithms, and reason is, compression algorithms learn from past data how to compress future data. But at the beginning of a new data set, there is no "past" to build upon.
To solve this situation, Zstd offers a __training mode__, which can be used to tune the algorithm for a selected type of data.
Training Zstandard is achieved by providing it with a few samples (one file per sample). The result of this training is stored in a file called "dictionary", which must be loaded before compression and decompression.
Using this dictionary, the compression ratio achievable on small data improves dramatically.
The following example uses the `github-users` [sample set](https://github.com/facebook/zstd/releases/tag/v1.1.3), created from [github public API](https://developer.github.com/v3/users/#get-all-users).
It consists of roughly 10K records weighing about 1KB each.
Compression Ratio | Compression Speed | Decompression Speed
------------------|-------------------|--------------------
 |  | 
These compression gains are achieved while simultaneously providing _faster_ compression and decompression speeds.
Training works if there is some correlation in a family of small data samples. The more data-specific a dictionary is, the more efficient it is (there is no _universal dictionary_).
Hence, deploying one dictionary per type of data will provide the greatest benefits.
Dictionary gains are mostly effective in the first few KB. Then, the compression algorithm will gradually use previously decoded content to better compress the rest of the file.
### Dictionary compression How To:
1. Create the dictionary
`zstd --train FullPathToTrainingSet/* -o dictionaryName`
2. Compress with dictionary
`zstd -D dictionaryName FILE`
3. Decompress with dictionary
`zstd -D dictionaryName --decompress FILE.zst`
## Build instructions
`make` is the main build system of this project.
It is the reference, and other build systems are periodically updated to stay compatible.
However, small drifts and feature differences can be present, since perfect synchronization is difficult.
For this reason, when your build system allows it, prefer employing `make`.
### Makefile
Assuming your system supports standard `make` (or `gmake`),
just invoking `make` in root directory generates `zstd` cli at root,
and also generates `libzstd` into `lib/`.
Other standard targets include:
- `make install` : install zstd cli, library and man pages
- `make check` : run `zstd`, test its essential behavior on local platform
The `Makefile` follows the [GNU Standard Makefile conventions](https://www.gnu.org/prep/standards/html_node/Makefile-Conventions.html),
allowing staged install, standard compilation flags, directory variables and command variables.
For advanced use cases, specialized flags which control binary generation and installation paths are documented
in [`lib/README.md`](lib/README.md#modular-build) for the `libzstd` library
and in [`programs/README.md`](programs/README.md#compilation-variables) for the `zstd` CLI.
### cmake
A `cmake` project generator is available for generating Makefiles or other build scripts
to create the `zstd` binary as well as `libzstd` dynamic and static libraries.
The repository root now contains a minimal `CMakeLists.txt` that forwards to `build/cmake`,
so you can configure the project with a standard `cmake -S .` invocation,
while the historical `cmake -S build/cmake` entry point remains fully supported.
```bash
cmake -S . -B build-cmake
cmake --build build-cmake
```
By default, `CMAKE_BUILD_TYPE` is set to `Release`.
#### Support for Fat (Universal2) Output
`zstd` can be built and installed with support for both Apple Silicon (M1/M2) as well as Intel by using CMake's Universal2 support.
To perform a Fat/Universal2 build and install use the following commands:
```bash
cmake -S . -B build-cmake-debug -G Ninja -DCMAKE_OSX_ARCHITECTURES="x86_64;x86_64h;arm64"
cd build-cmake-debug
ninja
sudo ninja install
```
### Meson
A Meson project is provided within [`build/meson`](build/meson). Follow
build instructions in that directory.
You can also take a look at [`.travis.yml`](.travis.yml) file for an
example about how Meson is used to build this project.
Note that default build type is **release**.
### VCPKG
You can build and install zstd [vcpkg](https://github.com/Microsoft/vcpkg/) dependency manager:
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
./bootstrap-vcpkg.sh
./vcpkg integrate install
./vcpkg install zstd
The zstd port in vcpkg is kept up to date by Microsoft team members and community contributors.
If the version is out of date, please [create an issue or pull request](https://githu
gitextract_qen600gb/
├── .buckconfig
├── .buckversion
├── .cirrus.yml
├── .gitattributes
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ ├── bug_report.md
│ │ └── feature_request.md
│ ├── dependabot.yml
│ └── workflows/
│ ├── android-ndk-build.yml
│ ├── cmake-tests.yml
│ ├── commit.yml
│ ├── dev-long-tests.yml
│ ├── dev-short-tests.yml
│ ├── nightly.yml
│ ├── publish-release-artifacts.yml
│ ├── release_check.yml
│ ├── scorecards.yml
│ └── windows-artifacts.yml
├── .gitignore
├── CHANGELOG
├── CMakeLists.txt
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── COPYING
├── LICENSE
├── Makefile
├── Package.swift
├── README.md
├── SECURITY.md
├── TESTING.md
├── contrib/
│ ├── VS2005/
│ │ ├── README.md
│ │ ├── fullbench/
│ │ │ └── fullbench.vcproj
│ │ ├── fuzzer/
│ │ │ └── fuzzer.vcproj
│ │ ├── zstd/
│ │ │ └── zstd.vcproj
│ │ ├── zstd.sln
│ │ └── zstdlib/
│ │ └── zstdlib.vcproj
│ ├── cleanTabs
│ ├── diagnose_corruption/
│ │ ├── .gitignore
│ │ ├── Makefile
│ │ └── check_flipped_bits.c
│ ├── docker/
│ │ ├── Dockerfile
│ │ └── README.md
│ ├── freestanding_lib/
│ │ └── freestanding.py
│ ├── linux-kernel/
│ │ ├── .gitignore
│ │ ├── Makefile
│ │ ├── README.md
│ │ ├── btrfs-benchmark.sh
│ │ ├── btrfs-extract-benchmark.sh
│ │ ├── decompress_sources.h
│ │ ├── linux.mk
│ │ ├── linux_zstd.h
│ │ ├── mem.h
│ │ ├── squashfs-benchmark.sh
│ │ ├── test/
│ │ │ ├── Makefile
│ │ │ ├── include/
│ │ │ │ └── linux/
│ │ │ │ ├── compiler.h
│ │ │ │ ├── errno.h
│ │ │ │ ├── kernel.h
│ │ │ │ ├── limits.h
│ │ │ │ ├── math64.h
│ │ │ │ ├── module.h
│ │ │ │ ├── printk.h
│ │ │ │ ├── stddef.h
│ │ │ │ ├── swab.h
│ │ │ │ ├── types.h
│ │ │ │ ├── unaligned.h
│ │ │ │ └── xxhash.h
│ │ │ ├── macro-test.sh
│ │ │ ├── static_test.c
│ │ │ └── test.c
│ │ ├── zstd_common_module.c
│ │ ├── zstd_compress_module.c
│ │ ├── zstd_decompress_module.c
│ │ └── zstd_deps.h
│ ├── match_finders/
│ │ ├── README.md
│ │ ├── zstd_edist.c
│ │ └── zstd_edist.h
│ ├── premake/
│ │ ├── premake4.lua
│ │ └── zstd.lua
│ ├── recovery/
│ │ ├── Makefile
│ │ └── recover_directory.c
│ ├── seekable_format/
│ │ ├── README.md
│ │ ├── examples/
│ │ │ ├── .gitignore
│ │ │ ├── Makefile
│ │ │ ├── parallel_compression.c
│ │ │ ├── parallel_processing.c
│ │ │ ├── seekable_compression.c
│ │ │ ├── seekable_decompression.c
│ │ │ └── seekable_decompression_mem.c
│ │ ├── tests/
│ │ │ ├── .gitignore
│ │ │ ├── Makefile
│ │ │ └── seekable_tests.c
│ │ ├── zstd_seekable.h
│ │ ├── zstd_seekable_compression_format.md
│ │ ├── zstdseek_compress.c
│ │ └── zstdseek_decompress.c
│ ├── seqBench/
│ │ ├── Makefile
│ │ └── seqBench.c
│ └── snap/
│ └── snapcraft.yaml
├── doc/
│ ├── README.md
│ ├── decompressor_errata.md
│ ├── decompressor_permissive.md
│ ├── educational_decoder/
│ │ ├── .gitignore
│ │ ├── Makefile
│ │ ├── README.md
│ │ ├── harness.c
│ │ ├── zstd_decompress.c
│ │ └── zstd_decompress.h
│ ├── zstd_compression_format.md
│ └── zstd_manual.html
├── examples/
│ ├── .gitignore
│ ├── Makefile
│ ├── README.md
│ ├── common.h
│ ├── dictionary_compression.c
│ ├── dictionary_decompression.c
│ ├── multiple_simple_compression.c
│ ├── multiple_streaming_compression.c
│ ├── simple_compression.c
│ ├── simple_decompression.c
│ ├── streaming_compression.c
│ ├── streaming_compression_thread_pool.c
│ ├── streaming_decompression.c
│ └── streaming_memory_usage.c
├── lib/
│ ├── .gitignore
│ ├── BUCK
│ ├── Makefile
│ ├── README.md
│ ├── common/
│ │ ├── allocations.h
│ │ ├── bits.h
│ │ ├── bitstream.h
│ │ ├── compiler.h
│ │ ├── cpu.h
│ │ ├── debug.c
│ │ ├── debug.h
│ │ ├── entropy_common.c
│ │ ├── error_private.c
│ │ ├── error_private.h
│ │ ├── fse.h
│ │ ├── fse_decompress.c
│ │ ├── huf.h
│ │ ├── mem.h
│ │ ├── pool.c
│ │ ├── pool.h
│ │ ├── portability_macros.h
│ │ ├── threading.c
│ │ ├── threading.h
│ │ ├── xxhash.c
│ │ ├── xxhash.h
│ │ ├── zstd_common.c
│ │ ├── zstd_deps.h
│ │ ├── zstd_internal.h
│ │ └── zstd_trace.h
│ ├── compress/
│ │ ├── clevels.h
│ │ ├── fse_compress.c
│ │ ├── hist.c
│ │ ├── hist.h
│ │ ├── huf_compress.c
│ │ ├── zstd_compress.c
│ │ ├── zstd_compress_internal.h
│ │ ├── zstd_compress_literals.c
│ │ ├── zstd_compress_literals.h
│ │ ├── zstd_compress_sequences.c
│ │ ├── zstd_compress_sequences.h
│ │ ├── zstd_compress_superblock.c
│ │ ├── zstd_compress_superblock.h
│ │ ├── zstd_cwksp.h
│ │ ├── zstd_double_fast.c
│ │ ├── zstd_double_fast.h
│ │ ├── zstd_fast.c
│ │ ├── zstd_fast.h
│ │ ├── zstd_lazy.c
│ │ ├── zstd_lazy.h
│ │ ├── zstd_ldm.c
│ │ ├── zstd_ldm.h
│ │ ├── zstd_ldm_geartab.h
│ │ ├── zstd_opt.c
│ │ ├── zstd_opt.h
│ │ ├── zstd_preSplit.c
│ │ ├── zstd_preSplit.h
│ │ ├── zstdmt_compress.c
│ │ └── zstdmt_compress.h
│ ├── decompress/
│ │ ├── huf_decompress.c
│ │ ├── huf_decompress_amd64.S
│ │ ├── zstd_ddict.c
│ │ ├── zstd_ddict.h
│ │ ├── zstd_decompress.c
│ │ ├── zstd_decompress_block.c
│ │ ├── zstd_decompress_block.h
│ │ └── zstd_decompress_internal.h
│ ├── deprecated/
│ │ ├── zbuff.h
│ │ ├── zbuff_common.c
│ │ ├── zbuff_compress.c
│ │ └── zbuff_decompress.c
│ ├── dictBuilder/
│ │ ├── cover.c
│ │ ├── cover.h
│ │ ├── divsufsort.c
│ │ ├── divsufsort.h
│ │ ├── fastcover.c
│ │ └── zdict.c
│ ├── dll/
│ │ └── example/
│ │ ├── Makefile
│ │ ├── README.md
│ │ ├── build_package.bat
│ │ ├── fullbench-dll.sln
│ │ └── fullbench-dll.vcxproj
│ ├── install_oses.mk
│ ├── legacy/
│ │ ├── zstd_legacy.h
│ │ ├── zstd_v01.c
│ │ ├── zstd_v01.h
│ │ ├── zstd_v02.c
│ │ ├── zstd_v02.h
│ │ ├── zstd_v03.c
│ │ ├── zstd_v03.h
│ │ ├── zstd_v04.c
│ │ ├── zstd_v04.h
│ │ ├── zstd_v05.c
│ │ ├── zstd_v05.h
│ │ ├── zstd_v06.c
│ │ ├── zstd_v06.h
│ │ ├── zstd_v07.c
│ │ └── zstd_v07.h
│ ├── libzstd.mk
│ ├── libzstd.pc.in
│ ├── module.modulemap
│ ├── zdict.h
│ ├── zstd.h
│ └── zstd_errors.h
├── programs/
│ ├── .gitignore
│ ├── BUCK
│ ├── Makefile
│ ├── README.md
│ ├── benchfn.c
│ ├── benchfn.h
│ ├── benchzstd.c
│ ├── benchzstd.h
│ ├── datagen.c
│ ├── datagen.h
│ ├── dibio.c
│ ├── dibio.h
│ ├── fileio.c
│ ├── fileio.h
│ ├── fileio_asyncio.c
│ ├── fileio_asyncio.h
│ ├── fileio_common.h
│ ├── fileio_types.h
│ ├── lorem.c
│ ├── lorem.h
│ ├── platform.h
│ ├── timefn.c
│ ├── timefn.h
│ ├── util.c
│ ├── util.h
│ ├── windres/
│ │ ├── verrsrc.h
│ │ ├── zstd.rc
│ │ ├── zstd32.res
│ │ └── zstd64.res
│ ├── zstd.1
│ ├── zstd.1.md
│ ├── zstdcli.c
│ ├── zstdcli_trace.c
│ ├── zstdcli_trace.h
│ ├── zstdgrep
│ ├── zstdgrep.1
│ ├── zstdgrep.1.md
│ ├── zstdless
│ ├── zstdless.1
│ └── zstdless.1.md
├── tests/
│ ├── .gitignore
│ ├── DEPRECATED-test-zstd-speed.py
│ ├── Makefile
│ ├── README.md
│ ├── automated_benchmarking.py
│ ├── checkTag.c
│ ├── check_size.py
│ ├── cli-tests/
│ │ ├── .gitignore
│ │ ├── README.md
│ │ ├── basic/
│ │ │ ├── args.sh
│ │ │ ├── args.sh.exit
│ │ │ ├── args.sh.stderr.glob
│ │ │ ├── help.sh
│ │ │ ├── help.sh.stdout.glob
│ │ │ ├── memlimit.sh
│ │ │ ├── memlimit.sh.stderr.exact
│ │ │ ├── memlimit.sh.stdout.exact
│ │ │ ├── output_dir.sh
│ │ │ ├── output_dir.sh.stderr.exact
│ │ │ ├── output_dir.sh.stdout.exact
│ │ │ ├── version.sh
│ │ │ └── version.sh.stdout.glob
│ │ ├── bin/
│ │ │ ├── cmp_size
│ │ │ ├── datagen
│ │ │ ├── die
│ │ │ ├── println
│ │ │ ├── zstd
│ │ │ ├── zstdgrep
│ │ │ └── zstdless
│ │ ├── cltools/
│ │ │ ├── setup
│ │ │ ├── zstdgrep.sh
│ │ │ ├── zstdgrep.sh.exit
│ │ │ ├── zstdgrep.sh.stderr.exact
│ │ │ ├── zstdgrep.sh.stdout.glob
│ │ │ ├── zstdless.sh
│ │ │ ├── zstdless.sh.stderr.exact
│ │ │ └── zstdless.sh.stdout.glob
│ │ ├── common/
│ │ │ ├── format.sh
│ │ │ ├── mtime.sh
│ │ │ ├── permissions.sh
│ │ │ └── platform.sh
│ │ ├── compression/
│ │ │ ├── adapt.sh
│ │ │ ├── basic.sh
│ │ │ ├── compress-literals.sh
│ │ │ ├── format.sh
│ │ │ ├── golden.sh
│ │ │ ├── gzip-compat.sh
│ │ │ ├── levels.sh
│ │ │ ├── levels.sh.stderr.exact
│ │ │ ├── long-distance-matcher.sh
│ │ │ ├── multi-threaded.sh
│ │ │ ├── multi-threaded.sh.stderr.exact
│ │ │ ├── multiple-files.sh
│ │ │ ├── multiple-files.sh.stdout.exact
│ │ │ ├── row-match-finder.sh
│ │ │ ├── setup
│ │ │ ├── stream-size.sh
│ │ │ ├── verbose-wlog.sh
│ │ │ ├── verbose-wlog.sh.stderr.glob
│ │ │ ├── verbose-wlog.sh.stdout.glob
│ │ │ ├── window-resize.sh
│ │ │ ├── window-resize.sh.stderr.ignore
│ │ │ └── window-resize.sh.stdout.glob
│ │ ├── decompression/
│ │ │ ├── detectErrors.sh
│ │ │ ├── golden.sh
│ │ │ ├── pass-through.sh
│ │ │ ├── pass-through.sh.stderr.exact
│ │ │ └── pass-through.sh.stdout.exact
│ │ ├── determinism/
│ │ │ ├── basic.sh
│ │ │ ├── basic.sh.stderr.exact
│ │ │ ├── basic.sh.stdout.exact
│ │ │ ├── multithread.sh
│ │ │ ├── multithread.sh.stderr.exact
│ │ │ ├── multithread.sh.stdout.exact
│ │ │ ├── reuse.sh
│ │ │ ├── reuse.sh.stderr.exact
│ │ │ ├── reuse.sh.stdout.exact
│ │ │ ├── setup
│ │ │ └── setup_once
│ │ ├── dict-builder/
│ │ │ ├── empty-input.sh
│ │ │ ├── empty-input.sh.stderr.exact
│ │ │ ├── no-inputs.sh
│ │ │ ├── no-inputs.sh.exit
│ │ │ └── no-inputs.sh.stderr.exact
│ │ ├── dictionaries/
│ │ │ ├── dictionary-mismatch.sh
│ │ │ ├── dictionary-mismatch.sh.stderr.exact
│ │ │ ├── golden.sh
│ │ │ ├── setup
│ │ │ └── setup_once
│ │ ├── file-handling/
│ │ │ ├── directory-mirror.sh
│ │ │ ├── directory-mirror.sh.stderr.exact
│ │ │ └── directory-mirror.sh.stdout.exact
│ │ ├── file-stat/
│ │ │ ├── compress-file-to-dir-without-write-perm.sh
│ │ │ ├── compress-file-to-dir-without-write-perm.sh.stderr.exact
│ │ │ ├── compress-file-to-file.sh
│ │ │ ├── compress-file-to-file.sh.stderr.glob
│ │ │ ├── compress-file-to-stdout.sh
│ │ │ ├── compress-file-to-stdout.sh.stderr.exact
│ │ │ ├── compress-stdin-to-file.sh
│ │ │ ├── compress-stdin-to-file.sh.stderr.glob
│ │ │ ├── compress-stdin-to-stdout.sh
│ │ │ ├── compress-stdin-to-stdout.sh.stderr.exact
│ │ │ ├── decompress-file-to-file.sh
│ │ │ ├── decompress-file-to-file.sh.stderr.glob
│ │ │ ├── decompress-file-to-stdout.sh
│ │ │ ├── decompress-file-to-stdout.sh.stderr.exact
│ │ │ ├── decompress-stdin-to-file.sh
│ │ │ ├── decompress-stdin-to-file.sh.stderr.glob
│ │ │ ├── decompress-stdin-to-stdout.sh
│ │ │ └── decompress-stdin-to-stdout.sh.stderr.exact
│ │ ├── progress/
│ │ │ ├── no-progress.sh
│ │ │ ├── no-progress.sh.stderr.glob
│ │ │ ├── progress.sh
│ │ │ └── progress.sh.stderr.glob
│ │ ├── run.py
│ │ └── zstd-symlinks/
│ │ ├── setup
│ │ ├── zstdcat.sh
│ │ └── zstdcat.sh.stdout.exact
│ ├── datagencli.c
│ ├── decodecorpus.c
│ ├── dict-files/
│ │ └── zero-weight-dict
│ ├── external_matchfinder.c
│ ├── external_matchfinder.h
│ ├── fullbench.c
│ ├── fuzz/
│ │ ├── .gitignore
│ │ ├── Makefile
│ │ ├── README.md
│ │ ├── block_decompress.c
│ │ ├── block_round_trip.c
│ │ ├── decompress_cross_format.c
│ │ ├── decompress_dstSize_tooSmall.c
│ │ ├── dictionary_decompress.c
│ │ ├── dictionary_loader.c
│ │ ├── dictionary_round_trip.c
│ │ ├── dictionary_stream_round_trip.c
│ │ ├── fse_read_ncount.c
│ │ ├── fuzz.h
│ │ ├── fuzz.py
│ │ ├── fuzz_data_producer.c
│ │ ├── fuzz_data_producer.h
│ │ ├── fuzz_helpers.c
│ │ ├── fuzz_helpers.h
│ │ ├── fuzz_third_party_seq_prod.h
│ │ ├── generate_sequences.c
│ │ ├── huf_decompress.c
│ │ ├── huf_round_trip.c
│ │ ├── raw_dictionary_round_trip.c
│ │ ├── regression_driver.c
│ │ ├── seekable_roundtrip.c
│ │ ├── seq_prod_fuzz_example/
│ │ │ ├── Makefile
│ │ │ ├── README.md
│ │ │ └── example_seq_prod.c
│ │ ├── sequence_compression_api.c
│ │ ├── simple_compress.c
│ │ ├── simple_decompress.c
│ │ ├── simple_round_trip.c
│ │ ├── stream_decompress.c
│ │ ├── stream_round_trip.c
│ │ ├── zstd_frame_info.c
│ │ ├── zstd_helpers.c
│ │ └── zstd_helpers.h
│ ├── fuzzer.c
│ ├── golden-compression/
│ │ ├── PR-3517-block-splitter-corruption-test
│ │ ├── http
│ │ ├── huffman-compressed-larger
│ │ └── large-literal-and-match-lengths
│ ├── golden-decompression-errors/
│ │ ├── .gitignore
│ │ ├── off0.bin.zst
│ │ ├── truncated_huff_state.zst
│ │ └── zeroSeq_extraneous.zst
│ ├── golden-dictionaries/
│ │ └── http-dict-missing-symbols
│ ├── gzip/
│ │ ├── Makefile
│ │ ├── gzip-env.sh
│ │ ├── helin-segv.sh
│ │ ├── help-version.sh
│ │ ├── hufts.sh
│ │ ├── init.cfg
│ │ ├── init.sh
│ │ ├── keep.sh
│ │ ├── list.sh
│ │ ├── memcpy-abuse.sh
│ │ ├── mixed.sh
│ │ ├── null-suffix-clobber.sh
│ │ ├── stdin.sh
│ │ ├── test-driver.sh
│ │ ├── trailing-nul.sh
│ │ ├── unpack-invalid.sh
│ │ ├── z-suffix.sh
│ │ ├── zdiff.sh
│ │ ├── zgrep-context.sh
│ │ ├── zgrep-f.sh
│ │ ├── zgrep-signal.sh
│ │ └── znew-k.sh
│ ├── invalidDictionaries.c
│ ├── largeDictionary.c
│ ├── legacy.c
│ ├── libzstd_builds.sh
│ ├── longmatch.c
│ ├── loremOut.c
│ ├── loremOut.h
│ ├── paramgrill.c
│ ├── playTests.sh
│ ├── poolTests.c
│ ├── rateLimiter.py
│ ├── regression/
│ │ ├── .gitignore
│ │ ├── Makefile
│ │ ├── README.md
│ │ ├── config.c
│ │ ├── config.h
│ │ ├── data.c
│ │ ├── data.h
│ │ ├── levels.h
│ │ ├── method.c
│ │ ├── method.h
│ │ ├── result.c
│ │ ├── result.h
│ │ ├── results.csv
│ │ └── test.c
│ ├── roundTripCrash.c
│ ├── seqgen.c
│ ├── seqgen.h
│ ├── test-license.py
│ ├── test-variants.sh
│ ├── test-zstd-versions.py
│ ├── test_process_substitution.bash
│ └── zstreamtest.c
└── zlibWrapper/
├── .gitignore
├── BUCK
├── Makefile
├── README.md
├── examples/
│ ├── example.c
│ ├── example_original.c
│ ├── fitblk.c
│ ├── fitblk_original.c
│ ├── minigzip.c
│ └── zwrapbench.c
├── gzclose.c
├── gzcompatibility.h
├── gzguts.h
├── gzlib.c
├── gzread.c
├── gzwrite.c
├── zstd_zlibwrapper.c
└── zstd_zlibwrapper.h
Showing preview only (380K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (4125 symbols across 201 files)
FILE: contrib/diagnose_corruption/check_flipped_bits.c
type stuff_t (line 22) | typedef struct {
function free_stuff (line 44) | static void free_stuff(stuff_t* stuff) {
function usage (line 52) | static void usage(void) {
function print_summary (line 62) | static void print_summary(stuff_t* stuff) {
type stat (line 76) | struct stat
function ZSTD_DDict (line 125) | static ZSTD_DDict* readDict(const char* filename, char **buf, size_t* si...
function ZSTD_DDict (line 144) | static ZSTD_DDict* readDictByID(stuff_t *stuff, int32_t dict_id, char **...
function init_stuff (line 191) | static int init_stuff(stuff_t* stuff, int argc, char *argv[]) {
function test_decompress (line 276) | static int test_decompress(stuff_t* stuff) {
function perturb_bits (line 331) | static int perturb_bits(stuff_t* stuff) {
function perturb_bytes (line 355) | static int perturb_bytes(stuff_t* stuff) {
function main (line 378) | int main(int argc, char* argv[]) {
FILE: contrib/freestanding_lib/freestanding.py
class FileLines (line 41) | class FileLines(object):
method __init__ (line 42) | def __init__(self, filename):
method write (line 47) | def write(self):
class PartialPreprocessor (line 52) | class PartialPreprocessor(object):
method __init__ (line 61) | def __init__(self, defs: [(str, Optional[str])], replaces: [(str, str)...
method _log (line 97) | def _log(self, *args, **kwargs):
method _strip_comments (line 100) | def _strip_comments(self, line):
method _fixup_indentation (line 115) | def _fixup_indentation(self, macro, replace: [str]):
method _handle_if_block (line 149) | def _handle_if_block(self, macro, idx, is_true, prepend):
method _preprocess_once (line 261) | def _preprocess_once(self):
method preprocess (line 414) | def preprocess(self, filename):
class Freestanding (line 428) | class Freestanding(object):
method __init__ (line 429) | def __init__(
method _dst_lib_file_paths (line 451) | def _dst_lib_file_paths(self):
method _log (line 460) | def _log(self, *args, **kwargs):
method _copy_file (line 463) | def _copy_file(self, lib_path):
method _copy_source_lib (line 479) | def _copy_source_lib(self):
method _copy_zstd_deps (line 497) | def _copy_zstd_deps(self):
method _copy_mem (line 502) | def _copy_mem(self):
method _hardwire_preprocessor (line 507) | def _hardwire_preprocessor(self, name: str, value: Optional[str] = Non...
method _hardwire_defines (line 517) | def _hardwire_defines(self):
method _remove_excludes (line 523) | def _remove_excludes(self):
method _rewrite_include (line 554) | def _rewrite_include(self, original, rewritten):
method _rewrite_includes (line 568) | def _rewrite_includes(self):
method _replace_xxh64_prefix (line 573) | def _replace_xxh64_prefix(self):
method _parse_sed (line 604) | def _parse_sed(self, sed):
method _process_sed (line 614) | def _process_sed(self, sed):
method _process_seds (line 639) | def _process_seds(self):
method _process_spdx (line 644) | def _process_spdx(self):
method go (line 667) | def go(self):
function parse_optional_pair (line 679) | def parse_optional_pair(defines: [str]) -> [(str, Optional[str])]:
function parse_pair (line 692) | def parse_pair(rewritten_includes: [str]) -> [(str, str)]:
function main (line 704) | def main(name, args):
FILE: contrib/linux-kernel/linux_zstd.h
type ZSTD_ErrorCode (line 48) | typedef ZSTD_ErrorCode zstd_error_code;
type ZSTD_customMem (line 90) | typedef ZSTD_customMem zstd_custom_mem;
type ZSTD_dictLoadMethod_e (line 96) | typedef ZSTD_dictLoadMethod_e zstd_dict_load_method;
type ZSTD_dictContentType_e (line 102) | typedef ZSTD_dictContentType_e zstd_dict_content_type;
type ZSTD_strategy (line 111) | typedef ZSTD_strategy zstd_strategy;
type ZSTD_compressionParameters (line 130) | typedef ZSTD_compressionParameters zstd_compression_parameters;
type ZSTD_frameParameters (line 143) | typedef ZSTD_frameParameters zstd_frame_parameters;
type ZSTD_parameters (line 150) | typedef ZSTD_parameters zstd_parameters;
type ZSTD_CCtx (line 175) | typedef ZSTD_CCtx zstd_cctx;
type ZSTD_cParameter (line 176) | typedef ZSTD_cParameter zstd_cparameter;
type ZSTD_CDict (line 264) | typedef ZSTD_CDict zstd_cdict;
type ZSTD_DCtx (line 311) | typedef ZSTD_DCtx zstd_dctx;
type ZSTD_DDict (line 353) | typedef ZSTD_DDict zstd_ddict;
type ZSTD_inBuffer (line 425) | typedef ZSTD_inBuffer zstd_in_buffer;
type ZSTD_outBuffer (line 436) | typedef ZSTD_outBuffer zstd_out_buffer;
type ZSTD_CStream (line 440) | typedef ZSTD_CStream zstd_cstream;
type ZSTD_DStream (line 545) | typedef ZSTD_DStream zstd_dstream;
type ZSTD_sequenceProducer_F (line 625) | typedef ZSTD_sequenceProducer_F zstd_sequence_producer_f;
type ZSTD_FrameHeader (line 645) | typedef ZSTD_FrameHeader zstd_frame_header;
type ZSTD_Sequence (line 668) | typedef ZSTD_Sequence zstd_sequence;
FILE: contrib/linux-kernel/mem.h
type BYTE (line 33) | typedef uint8_t BYTE;
type U8 (line 34) | typedef uint8_t U8;
type S8 (line 35) | typedef int8_t S8;
type U16 (line 36) | typedef uint16_t U16;
type S16 (line 37) | typedef int16_t S16;
type U32 (line 38) | typedef uint32_t U32;
type S32 (line 39) | typedef int32_t S32;
type U64 (line 40) | typedef uint64_t U64;
type S64 (line 41) | typedef int64_t S64;
function MEM_32bits (line 91) | MEM_STATIC unsigned MEM_32bits(void)
function MEM_64bits (line 96) | MEM_STATIC unsigned MEM_64bits(void)
function MEM_isLittleEndian (line 107) | MEM_STATIC unsigned MEM_isLittleEndian(void)
function MEM_STATIC (line 112) | MEM_STATIC U16 MEM_read16(const void *memPtr)
function MEM_STATIC (line 117) | MEM_STATIC U32 MEM_read32(const void *memPtr)
function MEM_STATIC (line 122) | MEM_STATIC U64 MEM_read64(const void *memPtr)
function MEM_STATIC (line 127) | MEM_STATIC size_t MEM_readST(const void *memPtr)
function MEM_STATIC (line 132) | MEM_STATIC void MEM_write16(void *memPtr, U16 value)
function MEM_STATIC (line 137) | MEM_STATIC void MEM_write32(void *memPtr, U32 value)
function MEM_STATIC (line 142) | MEM_STATIC void MEM_write64(void *memPtr, U64 value)
function MEM_STATIC (line 149) | MEM_STATIC U16 MEM_readLE16(const void *memPtr)
function MEM_STATIC (line 154) | MEM_STATIC void MEM_writeLE16(void *memPtr, U16 val)
function MEM_STATIC (line 159) | MEM_STATIC U32 MEM_readLE24(const void *memPtr)
function MEM_STATIC (line 164) | MEM_STATIC void MEM_writeLE24(void *memPtr, U32 val)
function MEM_STATIC (line 170) | MEM_STATIC U32 MEM_readLE32(const void *memPtr)
function MEM_STATIC (line 175) | MEM_STATIC void MEM_writeLE32(void *memPtr, U32 val32)
function MEM_STATIC (line 180) | MEM_STATIC U64 MEM_readLE64(const void *memPtr)
function MEM_STATIC (line 185) | MEM_STATIC void MEM_writeLE64(void *memPtr, U64 val64)
function MEM_STATIC (line 190) | MEM_STATIC size_t MEM_readLEST(const void *memPtr)
function MEM_STATIC (line 198) | MEM_STATIC void MEM_writeLEST(void *memPtr, size_t val)
function MEM_STATIC (line 208) | MEM_STATIC U32 MEM_readBE32(const void *memPtr)
function MEM_STATIC (line 213) | MEM_STATIC void MEM_writeBE32(void *memPtr, U32 val32)
function MEM_STATIC (line 218) | MEM_STATIC U64 MEM_readBE64(const void *memPtr)
function MEM_STATIC (line 223) | MEM_STATIC void MEM_writeBE64(void *memPtr, U64 val64)
function MEM_STATIC (line 228) | MEM_STATIC size_t MEM_readBEST(const void *memPtr)
function MEM_STATIC (line 236) | MEM_STATIC void MEM_writeBEST(void *memPtr, size_t val)
function MEM_STATIC (line 244) | MEM_STATIC U32 MEM_swap32(U32 in)
function MEM_STATIC (line 249) | MEM_STATIC U64 MEM_swap64(U64 in)
function MEM_STATIC (line 254) | MEM_STATIC size_t MEM_swapST(size_t in)
FILE: contrib/linux-kernel/test/include/linux/unaligned.h
function _isLittleEndian (line 19) | static unsigned _isLittleEndian(void)
function _swap16 (line 27) | static uint16_t _swap16(uint16_t in)
function _swap32 (line 32) | static uint32_t _swap32(uint32_t in)
function _swap64 (line 37) | static uint64_t _swap64(uint64_t in)
function get_unaligned_le16 (line 43) | static uint16_t get_unaligned_le16(const void* memPtr)
function get_unaligned_le32 (line 51) | static uint32_t get_unaligned_le32(const void* memPtr)
function get_unaligned_le64 (line 59) | static uint64_t get_unaligned_le64(const void* memPtr)
function put_unaligned_le16 (line 67) | static void put_unaligned_le16(uint16_t value, void* memPtr)
function put_unaligned_le32 (line 73) | static void put_unaligned_le32(uint32_t value, void* memPtr)
function put_unaligned_le64 (line 79) | static void put_unaligned_le64(uint64_t value, void* memPtr)
function get_unaligned_be32 (line 86) | static uint32_t get_unaligned_be32(const void* memPtr)
function get_unaligned_be64 (line 94) | static uint64_t get_unaligned_be64(const void* memPtr)
function put_unaligned_be32 (line 102) | static void put_unaligned_be32(uint32_t value, void* memPtr)
function put_unaligned_be64 (line 108) | static void put_unaligned_be64(uint64_t value, void* memPtr)
FILE: contrib/linux-kernel/test/include/linux/xxhash.h
function xxhash (line 124) | static inline unsigned long xxhash(const void *input, size_t length,
type xxh32_state (line 146) | struct xxh32_state {
type xxh64_state (line 160) | struct xxh64_state {
type xxh32_state (line 178) | struct xxh32_state
type xxh32_state (line 191) | struct xxh32_state
type xxh32_state (line 204) | struct xxh32_state
type xxh64_state (line 212) | struct xxh64_state
type xxh64_state (line 224) | struct xxh64_state
type xxh64_state (line 237) | struct xxh64_state
type xxh32_state (line 249) | struct xxh32_state
type xxh32_state (line 249) | struct xxh32_state
type xxh64_state (line 257) | struct xxh64_state
type xxh64_state (line 257) | struct xxh64_state
function XXH_API (line 335) | XXH_API void xxh32_copy_state(struct xxh32_state *dst, const struct xxh3...
function XXH_API (line 340) | XXH_API void xxh64_copy_state(struct xxh64_state *dst, const struct xxh6...
function xxh32_round (line 348) | static uint32_t xxh32_round(uint32_t seed, const uint32_t input)
function XXH_API (line 356) | XXH_API uint32_t xxh32(const void *input, const size_t len, const uint32...
function xxh64_round (line 409) | static uint64_t xxh64_round(uint64_t acc, const uint64_t input)
function xxh64_merge_round (line 417) | static uint64_t xxh64_merge_round(uint64_t acc, uint64_t val)
function XXH_API (line 425) | XXH_API uint64_t xxh64(const void *input, const size_t len, const uint64...
function XXH_API (line 494) | XXH_API void xxh32_reset(struct xxh32_state *statePtr, const uint32_t seed)
function XXH_API (line 507) | XXH_API void xxh64_reset(struct xxh64_state *statePtr, const uint64_t seed)
function XXH_API (line 520) | XXH_API int xxh32_update(struct xxh32_state *state, const void *input, c...
function XXH_API (line 588) | XXH_API uint32_t xxh32_digest(const struct xxh32_state *state)
function XXH_API (line 625) | XXH_API int xxh64_update(struct xxh64_state *state, const void *input, c...
function XXH_API (line 691) | XXH_API uint64_t xxh64_digest(const struct xxh64_state *state)
FILE: contrib/linux-kernel/test/static_test.c
function test_decompress_unzstd (line 31) | static void test_decompress_unzstd(void) {
function main (line 49) | int main(void) {
FILE: contrib/linux-kernel/test/test.c
type test_data_t (line 25) | typedef struct {
function test_data_t (line 33) | static test_data_t create_test_data(void) {
function free_test_data (line 47) | static void free_test_data(test_data_t const *data) {
function test_btrfs (line 56) | static void test_btrfs(test_data_t const *data) {
function test_decompress_unzstd (line 145) | static void test_decompress_unzstd(test_data_t const *data) {
function test_f2fs (line 176) | static void test_f2fs(void) {
function use (line 185) | static void __attribute__((noinline)) use(void *x) {
function fill_stack (line 189) | static void __attribute__((noinline)) fill_stack(void) {
function set_stack (line 193) | static void __attribute__((noinline)) set_stack(void) {
function check_stack (line 200) | static void __attribute__((noinline)) check_stack(void) {
function test_stack_usage (line 212) | static void test_stack_usage(test_data_t const *data) {
function main (line 221) | int main(void) {
FILE: contrib/linux-kernel/zstd_compress_module.c
function zstd_cctx_init (line 28) | static size_t zstd_cctx_init(zstd_cctx *cctx, const zstd_parameters *par...
function zstd_min_clevel (line 58) | int zstd_min_clevel(void)
function zstd_max_clevel (line 64) | int zstd_max_clevel(void)
function zstd_default_clevel (line 70) | int zstd_default_clevel(void)
function zstd_compress_bound (line 76) | size_t zstd_compress_bound(size_t src_size)
function zstd_parameters (line 82) | zstd_parameters zstd_get_params(int level,
function zstd_compression_parameters (line 89) | zstd_compression_parameters zstd_get_cparams(int level,
function zstd_cctx_set_param (line 96) | size_t zstd_cctx_set_param(zstd_cctx *cctx, ZSTD_cParameter param, int v...
function zstd_cctx_workspace_bound (line 102) | size_t zstd_cctx_workspace_bound(const zstd_compression_parameters *cpar...
function dummy_external_sequence_producer (line 109) | static size_t dummy_external_sequence_producer(
function init_cctx_params_from_compress_params (line 126) | static void init_cctx_params_from_compress_params(
function zstd_cctx_workspace_bound_with_ext_seq_prod (line 136) | size_t zstd_cctx_workspace_bound_with_ext_seq_prod(const zstd_compressio...
function zstd_cstream_workspace_bound_with_ext_seq_prod (line 145) | size_t zstd_cstream_workspace_bound_with_ext_seq_prod(const zstd_compres...
function zstd_cctx (line 154) | zstd_cctx *zstd_init_cctx(void *workspace, size_t workspace_size)
function zstd_cctx (line 162) | zstd_cctx *zstd_create_cctx_advanced(zstd_custom_mem custom_mem)
function zstd_free_cctx (line 168) | size_t zstd_free_cctx(zstd_cctx *cctx)
function zstd_cdict (line 174) | zstd_cdict *zstd_create_cdict_byreference(const void *dict, size_t dict_...
function zstd_free_cdict (line 183) | size_t zstd_free_cdict(zstd_cdict *cdict)
function zstd_compress_cctx (line 189) | size_t zstd_compress_cctx(zstd_cctx *cctx, void *dst, size_t dst_capacity,
function zstd_compress_using_cdict (line 197) | size_t zstd_compress_using_cdict(zstd_cctx *cctx, void *dst,
function zstd_cstream_workspace_bound (line 206) | size_t zstd_cstream_workspace_bound(const zstd_compression_parameters *c...
function zstd_cstream (line 212) | zstd_cstream *zstd_init_cstream(const zstd_parameters *parameters,
function zstd_reset_cstream (line 235) | size_t zstd_reset_cstream(zstd_cstream *cstream,
function zstd_compress_stream (line 246) | size_t zstd_compress_stream(zstd_cstream *cstream, zstd_out_buffer *output,
function zstd_flush_stream (line 253) | size_t zstd_flush_stream(zstd_cstream *cstream, zstd_out_buffer *output)
function zstd_end_stream (line 259) | size_t zstd_end_stream(zstd_cstream *cstream, zstd_out_buffer *output)
function zstd_register_sequence_producer (line 265) | void zstd_register_sequence_producer(
function zstd_compress_sequences_and_literals (line 274) | size_t zstd_compress_sequences_and_literals(zstd_cctx *cctx, void* dst, ...
FILE: contrib/linux-kernel/zstd_decompress_module.c
function zstd_is_error (line 21) | unsigned int zstd_is_error(size_t code)
function zstd_error_code (line 27) | zstd_error_code zstd_get_error_code(size_t code)
function zstd_dctx_workspace_bound (line 41) | size_t zstd_dctx_workspace_bound(void)
function zstd_dctx (line 47) | zstd_dctx *zstd_create_dctx_advanced(zstd_custom_mem custom_mem)
function zstd_free_dctx (line 53) | size_t zstd_free_dctx(zstd_dctx *dctx)
function zstd_ddict (line 59) | zstd_ddict *zstd_create_ddict_byreference(const void *dict, size_t dict_...
function zstd_free_ddict (line 68) | size_t zstd_free_ddict(zstd_ddict *ddict)
function zstd_dctx (line 74) | zstd_dctx *zstd_init_dctx(void *workspace, size_t workspace_size)
function zstd_decompress_dctx (line 82) | size_t zstd_decompress_dctx(zstd_dctx *dctx, void *dst, size_t dst_capac...
function zstd_decompress_using_ddict (line 89) | size_t zstd_decompress_using_ddict(zstd_dctx *dctx,
function zstd_dstream_workspace_bound (line 98) | size_t zstd_dstream_workspace_bound(size_t max_window_size)
function zstd_dstream (line 104) | zstd_dstream *zstd_init_dstream(size_t max_window_size, void *workspace,
function zstd_reset_dstream (line 114) | size_t zstd_reset_dstream(zstd_dstream *dstream)
function zstd_decompress_stream (line 120) | size_t zstd_decompress_stream(zstd_dstream *dstream, zstd_out_buffer *ou...
function zstd_find_frame_compressed_size (line 127) | size_t zstd_find_frame_compressed_size(const void *src, size_t src_size)
function zstd_get_frame_header (line 133) | size_t zstd_get_frame_header(zstd_frame_header *header, const void *src,
FILE: contrib/linux-kernel/zstd_deps.h
function ZSTD_div64 (line 68) | static uint64_t ZSTD_div64(uint64_t dividend, uint32_t divisor) {
FILE: contrib/match_finders/zstd_edist.c
type ZSTD_eDist_match (line 49) | typedef struct {
type ZSTD_eDist_state (line 55) | typedef struct {
type ZSTD_eDist_partition (line 70) | typedef struct {
function ZSTD_eDist_diag (line 81) | static void ZSTD_eDist_diag(ZSTD_eDist_state* state,
function ZSTD_eDist_insertMatch (line 325) | static void ZSTD_eDist_insertMatch(ZSTD_eDist_state* state,
function ZSTD_eDist_compare (line 334) | static int ZSTD_eDist_compare(ZSTD_eDist_state* state,
function ZSTD_eDist_matchComp (line 390) | static int ZSTD_eDist_matchComp(const void* p, const void* q)
function ZSTD_eDist_combineMatches (line 401) | static void ZSTD_eDist_combineMatches(ZSTD_eDist_state* state)
function ZSTD_eDist_convertMatchesToSequences (line 440) | static size_t ZSTD_eDist_convertMatchesToSequences(ZSTD_Sequence* sequen...
function ZSTD_eDist_hamingDist (line 466) | static size_t ZSTD_eDist_hamingDist(const BYTE* const a,
function ZSTD_eDist_levenshteinDist (line 480) | static size_t ZSTD_eDist_levenshteinDist(const BYTE* const s,
function ZSTD_eDist_validateMatches (line 507) | static void ZSTD_eDist_validateMatches(ZSTD_eDist_match* matches,
function ZSTD_eDist_genSequences (line 529) | size_t ZSTD_eDist_genSequences(ZSTD_Sequence* sequences,
FILE: contrib/recovery/recover_directory.c
function usage (line 29) | static void usage(char const *program) {
type ZstdFrames (line 40) | typedef struct {
function ZstdFrames (line 47) | static ZstdFrames readFile(char const *fileName) {
function computePadding (line 84) | static int computePadding(size_t numFrames) {
function main (line 88) | int main(int argc, char **argv) {
FILE: contrib/seekable_format/examples/parallel_compression.c
function FILE (line 41) | static FILE* fopen_orDie(const char *filename, const char *instruction)
function fread_orDie (line 50) | static size_t fread_orDie(void* buffer, size_t sizeToRead, FILE* file)
function fwrite_orDie (line 60) | static size_t fwrite_orDie(const void* buffer, size_t sizeToWrite, FILE*...
function fclose_orDie (line 69) | static size_t fclose_orDie(FILE* file)
type state (line 77) | struct state {
type job (line 86) | struct job {
function addPending_inmutex (line 99) | static void addPending_inmutex(struct state* state, struct job* job)
function flushFrame (line 108) | static void flushFrame(struct state* state, struct job* job)
function flushPending_inmutex (line 120) | static void flushPending_inmutex(struct state* state)
function finishFrame (line 131) | static void finishFrame(struct job* job)
function compressFrame (line 140) | static void compressFrame(void* opaque)
function openInOut_orDie (line 171) | static void openInOut_orDie(const char* fname, FILE** fin, FILE** fout) {
function compressFile_orDie (line 182) | static void compressFile_orDie(const char* fname, int cLevel, unsigned f...
function main (line 237) | int main(int argc, const char** argv) {
FILE: contrib/seekable_format/examples/parallel_processing.c
function FILE (line 54) | static FILE* fopen_orDie(const char *filename, const char *instruction)
function fread_orDie (line 63) | static size_t fread_orDie(void* buffer, size_t sizeToRead, FILE* file)
function fwrite_orDie (line 73) | static size_t fwrite_orDie(const void* buffer, size_t sizeToWrite, FILE*...
function fclose_orDie (line 82) | static size_t fclose_orDie(FILE* file)
function fseek_orDie (line 90) | static void fseek_orDie(FILE* file, long int offset, int origin) {
type sum_job (line 99) | struct sum_job {
function sumFrame (line 105) | static void sumFrame(void* opaque)
function sumFile_orDie (line 135) | static void sumFile_orDie(const char* fname, int nbThreads)
function main (line 173) | int main(int argc, const char** argv)
FILE: contrib/seekable_format/examples/seekable_compression.c
function FILE (line 27) | static FILE* fopen_orDie(const char *filename, const char *instruction)
function fread_orDie (line 36) | static size_t fread_orDie(void* buffer, size_t sizeToRead, FILE* file)
function fwrite_orDie (line 46) | static size_t fwrite_orDie(const void* buffer, size_t sizeToWrite, FILE*...
function fclose_orDie (line 55) | static size_t fclose_orDie(FILE* file)
function compressFile_orDie (line 63) | static void compressFile_orDie(const char* fname, const char* outName, i...
function main (line 116) | int main(int argc, const char** argv)
FILE: contrib/seekable_format/examples/seekable_decompression.c
function FILE (line 41) | static FILE* fopen_orDie(const char *filename, const char *instruction)
function fread_orDie (line 50) | static size_t fread_orDie(void* buffer, size_t sizeToRead, FILE* file)
function fwrite_orDie (line 60) | static size_t fwrite_orDie(const void* buffer, size_t sizeToWrite, FILE*...
function fclose_orDie (line 69) | static size_t fclose_orDie(FILE* file)
function fseek_orDie (line 77) | static void fseek_orDie(FILE* file, long int offset, int origin) {
function decompressFile_orDie (line 87) | static void decompressFile_orDie(const char* fname, off_t startOffset, o...
function main (line 122) | int main(int argc, const char** argv)
FILE: contrib/seekable_format/examples/seekable_decompression_mem.c
function FILE (line 43) | static FILE* fopen_orDie(const char *filename, const char *instruction)
function fread_orDie (line 52) | static size_t fread_orDie(void* buffer, size_t sizeToRead, FILE* file)
function fwrite_orDie (line 62) | static size_t fwrite_orDie(const void* buffer, size_t sizeToWrite, FILE*...
function fclose_orDie (line 71) | static size_t fclose_orDie(FILE* file)
function fseek_orDie (line 79) | static void fseek_orDie(FILE* file, long int offset, int origin) {
function decompressFile_orDie (line 89) | static void decompressFile_orDie(const char* fname, off_t startOffset, o...
function main (line 128) | int main(int argc, const char** argv)
FILE: contrib/seekable_format/tests/seekable_tests.c
type buffWrapperWithTotal_t (line 12) | typedef struct {
function readBuffWithTotal (line 19) | static int readBuffWithTotal(void* opaque, void* buffer, size_t n)
function seekBuffWithTotal (line 30) | static int seekBuffWithTotal(void* opaque, long long offset, int origin)
function main (line 57) | int main(int argc, const char** argv)
FILE: contrib/seekable_format/zstd_seekable.h
type ZSTD_seekable_CStream (line 30) | typedef struct ZSTD_seekable_CStream_s ZSTD_seekable_CStream;
type ZSTD_seekable (line 31) | typedef struct ZSTD_seekable_s ZSTD_seekable;
type ZSTD_seekTable (line 32) | typedef struct ZSTD_seekTable_s ZSTD_seekTable;
type ZSTD_frameLog (line 114) | typedef struct ZSTD_frameLog_s ZSTD_frameLog;
type ZSTD_seekable_customFile (line 215) | typedef struct {
FILE: contrib/seekable_format/zstdseek_compress.c
type framelogEntry_t (line 34) | typedef struct {
type ZSTD_frameLog_s (line 40) | struct ZSTD_frameLog_s {
type ZSTD_seekable_CStream_s (line 52) | struct ZSTD_seekable_CStream_s {
function ZSTD_seekable_frameLog_allocVec (line 66) | static size_t ZSTD_seekable_frameLog_allocVec(ZSTD_frameLog* fl)
function ZSTD_seekable_frameLog_freeVec (line 77) | static size_t ZSTD_seekable_frameLog_freeVec(ZSTD_frameLog* fl)
function ZSTD_frameLog (line 83) | ZSTD_frameLog* ZSTD_seekable_createFrameLog(int checksumFlag)
function ZSTD_seekable_freeFrameLog (line 101) | size_t ZSTD_seekable_freeFrameLog(ZSTD_frameLog* fl)
function ZSTD_seekable_CStream (line 108) | ZSTD_seekable_CStream* ZSTD_seekable_createCStream(void)
function ZSTD_seekable_freeCStream (line 129) | size_t ZSTD_seekable_freeCStream(ZSTD_seekable_CStream* zcs)
function ZSTD_seekable_initCStream (line 138) | size_t ZSTD_seekable_initCStream(ZSTD_seekable_CStream* zcs,
function ZSTD_seekable_logFrame (line 167) | size_t ZSTD_seekable_logFrame(ZSTD_frameLog* fl,
function ZSTD_seekable_endFrame (line 197) | size_t ZSTD_seekable_endFrame(ZSTD_seekable_CStream* zcs, ZSTD_outBuffer...
function ZSTD_seekable_compressStream (line 228) | size_t ZSTD_seekable_compressStream(ZSTD_seekable_CStream* zcs, ZSTD_out...
function ZSTD_seekable_seekTableSize (line 268) | static inline size_t ZSTD_seekable_seekTableSize(const ZSTD_frameLog* fl)
function ZSTD_stwrite32 (line 278) | static inline size_t ZSTD_stwrite32(ZSTD_frameLog* fl,
function ZSTD_seekable_writeSeekTable (line 297) | size_t ZSTD_seekable_writeSeekTable(ZSTD_frameLog* fl, ZSTD_outBuffer* o...
function ZSTD_seekable_endStream (line 353) | size_t ZSTD_seekable_endStream(ZSTD_seekable_CStream* zcs, ZSTD_outBuffe...
FILE: contrib/seekable_format/zstdseek_decompress.c
function LONG_SEEK (line 91) | static int LONG_SEEK(FILE* file, __int64 offset, int origin) {
function ZSTD_seekable_read_FILE (line 139) | static int ZSTD_seekable_read_FILE(void* opaque, void* buffer, size_t n)
function ZSTD_seekable_seek_FILE (line 148) | static int ZSTD_seekable_seek_FILE(void* opaque, long long offset, int o...
type buffWrapper_t (line 155) | typedef struct {
function ZSTD_seekable_read_buff (line 161) | static int ZSTD_seekable_read_buff(void* opaque, void* buffer, size_t n)
function ZSTD_seekable_seek_buff (line 171) | static int ZSTD_seekable_seek_buff(void* opaque, long long offset, int o...
type seekEntry_t (line 197) | typedef struct {
type ZSTD_seekTable_s (line 203) | struct ZSTD_seekTable_s {
type ZSTD_seekable_s (line 212) | struct ZSTD_seekable_s {
function ZSTD_seekable (line 230) | ZSTD_seekable* ZSTD_seekable_create(void)
function ZSTD_seekable_free (line 247) | size_t ZSTD_seekable_free(ZSTD_seekable* zs)
function ZSTD_seekTable (line 256) | ZSTD_seekTable* ZSTD_seekTable_create_fromSeekable(const ZSTD_seekable* zs)
function ZSTD_seekTable_free (line 279) | size_t ZSTD_seekTable_free(ZSTD_seekTable* st)
function ZSTD_seekable_offsetToFrameIndex (line 291) | unsigned ZSTD_seekable_offsetToFrameIndex(const ZSTD_seekable* zs, unsig...
function ZSTD_seekTable_offsetToFrameIndex (line 296) | unsigned ZSTD_seekTable_offsetToFrameIndex(const ZSTD_seekTable* st, uns...
function ZSTD_seekable_getNumFrames (line 317) | unsigned ZSTD_seekable_getNumFrames(const ZSTD_seekable* zs)
function ZSTD_seekTable_getNumFrames (line 322) | unsigned ZSTD_seekTable_getNumFrames(const ZSTD_seekTable* st)
function ZSTD_seekable_getFrameCompressedOffset (line 328) | unsigned long long ZSTD_seekable_getFrameCompressedOffset(const ZSTD_see...
function ZSTD_seekTable_getFrameCompressedOffset (line 333) | unsigned long long ZSTD_seekTable_getFrameCompressedOffset(const ZSTD_se...
function ZSTD_seekable_getFrameDecompressedOffset (line 339) | unsigned long long ZSTD_seekable_getFrameDecompressedOffset(const ZSTD_s...
function ZSTD_seekTable_getFrameDecompressedOffset (line 344) | unsigned long long ZSTD_seekTable_getFrameDecompressedOffset(const ZSTD_...
function ZSTD_seekable_getFrameCompressedSize (line 350) | size_t ZSTD_seekable_getFrameCompressedSize(const ZSTD_seekable* zs, uns...
function ZSTD_seekTable_getFrameCompressedSize (line 355) | size_t ZSTD_seekTable_getFrameCompressedSize(const ZSTD_seekTable* st, u...
function ZSTD_seekable_getFrameDecompressedSize (line 362) | size_t ZSTD_seekable_getFrameDecompressedSize(const ZSTD_seekable* zs, u...
function ZSTD_seekTable_getFrameDecompressedSize (line 367) | size_t ZSTD_seekTable_getFrameDecompressedSize(const ZSTD_seekTable* st,...
function ZSTD_seekable_loadSeekTable (line 374) | static size_t ZSTD_seekable_loadSeekTable(ZSTD_seekable* zs)
function ZSTD_seekable_initBuff (line 458) | size_t ZSTD_seekable_initBuff(ZSTD_seekable* zs, const void* src, size_t...
function ZSTD_seekable_initFile (line 467) | size_t ZSTD_seekable_initFile(ZSTD_seekable* zs, FILE* src)
function ZSTD_seekable_initAdvanced (line 474) | size_t ZSTD_seekable_initAdvanced(ZSTD_seekable* zs, ZSTD_seekable_custo...
function ZSTD_seekable_decompress (line 489) | size_t ZSTD_seekable_decompress(ZSTD_seekable* zs, void* dst, size_t len...
function ZSTD_seekable_decompressFrame (line 584) | size_t ZSTD_seekable_decompressFrame(ZSTD_seekable* zs, void* dst, size_...
FILE: contrib/seqBench/seqBench.c
function main (line 8) | int main(int argc, char *argv[]) {
FILE: doc/educational_decoder/harness.c
type u8 (line 16) | typedef unsigned char u8;
type buffer_s (line 29) | typedef struct {
function freeBuffer (line 34) | static void freeBuffer(buffer_s b) { free(b.address); }
function buffer_s (line 36) | static buffer_s read_file(const char *path)
function write_file (line 56) | static void write_file(const char* path, const u8* ptr, size_t size)
function main (line 70) | int main(int argc, char **argv)
FILE: doc/educational_decoder/zstd_decompress.c
type u8 (line 60) | typedef uint8_t u8;
type u16 (line 61) | typedef uint16_t u16;
type u32 (line 62) | typedef uint32_t u32;
type u64 (line 63) | typedef uint64_t u64;
type i8 (line 65) | typedef int8_t i8;
type i16 (line 66) | typedef int16_t i16;
type i32 (line 67) | typedef int32_t i32;
type i64 (line 68) | typedef int64_t i64;
type ostream_t (line 82) | typedef struct {
type istream_t (line 87) | typedef struct {
type HUF_dtable (line 161) | typedef struct {
type FSE_dtable (line 209) | typedef struct {
type frame_header_t (line 266) | typedef struct {
type frame_context_t (line 283) | typedef struct {
type dictionary_s (line 306) | struct dictionary_s {
type sequence_command_t (line 325) | typedef struct {
function ZSTD_decompress (line 384) | size_t ZSTD_decompress(void *const dst, const size_t dst_len,
function ZSTD_decompress_with_dict (line 393) | size_t ZSTD_decompress_with_dict(void *const dst, const size_t dst_len,
function decode_frame (line 427) | static void decode_frame(ostream_t *const out, istream_t *const in,
function decode_data_frame (line 445) | static void decode_data_frame(ostream_t *const out, istream_t *const in,
function init_frame_context (line 464) | static void init_frame_context(frame_context_t *const context,
function free_frame_context (line 482) | static void free_frame_context(frame_context_t *const context) {
function parse_frame_header (line 492) | static void parse_frame_header(frame_header_t *const header,
function decompress_data (line 585) | static void decompress_data(frame_context_t *const ctx, ostream_t *const...
function decompress_block (line 663) | static void decompress_block(frame_context_t *const ctx, ostream_t *cons...
function decode_literals (line 701) | static size_t decode_literals(frame_context_t *const ctx, istream_t *con...
function decode_literals_simple (line 734) | static size_t decode_literals_simple(istream_t *const in, u8 **const lit...
function decode_literals_compressed (line 790) | static size_t decode_literals_compressed(frame_context_t *const ctx,
function decode_huf_table (line 868) | static void decode_huf_table(HUF_dtable *const dtable, istream_t *const ...
function fse_decode_hufweights (line 915) | static void fse_decode_hufweights(ostream_t *weights, istream_t *const in,
type sequence_states_t (line 935) | typedef struct {
type seq_part_t (line 946) | typedef enum {
type seq_mode_t (line 952) | typedef enum {
function decode_sequences (line 1005) | static size_t decode_sequences(frame_context_t *const ctx, istream_t *in,
function decompress_sequences (line 1048) | static void decompress_sequences(frame_context_t *const ctx, istream_t *in,
function sequence_command_t (line 1128) | static sequence_command_t decode_sequence(sequence_states_t *const states,
function decode_seq_table (line 1177) | static void decode_seq_table(FSE_dtable *const table, istream_t *const in,
function execute_sequences (line 1234) | static void execute_sequences(frame_context_t *const ctx, ostream_t *con...
function u32 (line 1270) | static u32 copy_literals(const size_t literal_length, istream_t *litstream,
function compute_offset (line 1287) | static size_t compute_offset(sequence_command_t seq, u64 *const offset_h...
function execute_match_copy (line 1335) | static void execute_match_copy(frame_context_t *const ctx, size_t offset,
function ZSTD_get_decompressed_size (line 1378) | size_t ZSTD_get_decompressed_size(const void *src, const size_t src_len) {
function dictionary_t (line 1405) | dictionary_t* create_dictionary(void) {
function free_dictionary (line 1414) | void free_dictionary(dictionary_t *const dict) {
function parse_dictionary (line 1435) | void parse_dictionary(dictionary_t *const dict, const void *src,
function init_dictionary_content (line 1489) | static void init_dictionary_content(dictionary_t *const dict,
function HUF_copy_dtable (line 1503) | static void HUF_copy_dtable(HUF_dtable *const dst,
function FSE_copy_dtable (line 1523) | static void FSE_copy_dtable(FSE_dtable *const dst, const FSE_dtable *con...
function frame_context_apply_dict (line 1547) | static void frame_context_apply_dict(frame_context_t *const ctx,
function frame_context_apply_dict (line 1583) | static void frame_context_apply_dict(frame_context_t *const ctx,
function u64 (line 1595) | static inline u64 IO_read_bits(istream_t *const in, const int num_bits) {
function IO_rewind_bits (line 1617) | static inline void IO_rewind_bits(istream_t *const in, int num_bits) {
function IO_align_stream (line 1637) | static inline void IO_align_stream(istream_t *const in) {
function IO_write_byte (line 1649) | static inline void IO_write_byte(ostream_t *const out, u8 symb) {
function IO_istream_len (line 1661) | static inline size_t IO_istream_len(const istream_t *const in) {
function u8 (line 1667) | static inline const u8 *IO_get_read_ptr(istream_t *const in, size_t len) {
function u8 (line 1681) | static inline u8 *IO_get_write_ptr(ostream_t *const out, size_t len) {
function IO_advance_input (line 1693) | static inline void IO_advance_input(istream_t *const in, size_t len) {
function ostream_t (line 1706) | static inline ostream_t IO_make_ostream(u8 *out, size_t len) {
function istream_t (line 1711) | static inline istream_t IO_make_istream(const u8 *in, size_t len) {
function istream_t (line 1718) | static inline istream_t IO_make_sub_istream(istream_t *const in, size_t ...
function u64 (line 1729) | static inline u64 read_bits_LE(const u8 *src, const int num_bits,
function u64 (line 1759) | static inline u64 STREAM_read_bits(const u8 *const src, const int bits,
function highest_set_bit (line 1783) | static inline int highest_set_bit(const u64 num) {
function u8 (line 1794) | static inline u8 HUF_decode_symbol(const HUF_dtable *const dtable,
function HUF_init_state (line 1809) | static inline void HUF_init_state(const HUF_dtable *const dtable,
function HUF_decompress_1stream (line 1817) | static size_t HUF_decompress_1stream(const HUF_dtable *const dtable,
function HUF_decompress_4stream (line 1866) | static size_t HUF_decompress_4stream(const HUF_dtable *const dtable,
function HUF_init_dtable (line 1899) | static void HUF_init_dtable(HUF_dtable *const table, const u8 *const bits,
function HUF_init_dtable_usingweights (line 1963) | static void HUF_init_dtable_usingweights(HUF_dtable *const table,
function HUF_free_dtable (line 2004) | static void HUF_free_dtable(HUF_dtable *const dtable) {
function u8 (line 2016) | static inline u8 FSE_peek_symbol(const FSE_dtable *const dtable,
function FSE_update_state (line 2023) | static inline void FSE_update_state(const FSE_dtable *const dtable,
function u8 (line 2032) | static inline u8 FSE_decode_symbol(const FSE_dtable *const dtable,
function FSE_init_state (line 2040) | static inline void FSE_init_state(const FSE_dtable *const dtable,
function FSE_decompress_interleaved2 (line 2048) | static size_t FSE_decompress_interleaved2(const FSE_dtable *const dtable,
function FSE_init_dtable (line 2109) | static void FSE_init_dtable(FSE_dtable *const dtable,
function FSE_decode_header (line 2197) | static void FSE_decode_header(FSE_dtable *const dtable, istream_t *const...
function FSE_init_dtable_rle (line 2300) | static void FSE_init_dtable_rle(FSE_dtable *const dtable, const u8 symb) {
function FSE_free_dtable (line 2317) | static void FSE_free_dtable(FSE_dtable *const dtable) {
FILE: doc/educational_decoder/zstd_decompress.h
type dictionary_t (line 18) | typedef struct dictionary_s dictionary_t;
FILE: examples/common.h
type COMMON_ErrorCode (line 38) | typedef enum {
function HEADER_FUNCTION (line 82) | HEADER_FUNCTION size_t fsize_orDie(const char *filename)
function HEADER_FUNCTION (line 110) | HEADER_FUNCTION FILE* fopen_orDie(const char *filename, const char *inst...
function HEADER_FUNCTION (line 122) | HEADER_FUNCTION void fclose_orDie(FILE* file)
function HEADER_FUNCTION (line 137) | HEADER_FUNCTION size_t fread_orDie(void* buffer, size_t sizeToRead, FILE...
function HEADER_FUNCTION (line 157) | HEADER_FUNCTION size_t fwrite_orDie(const void* buffer, size_t sizeToWri...
function HEADER_FUNCTION (line 173) | HEADER_FUNCTION void* malloc_orDie(size_t size)
function HEADER_FUNCTION (line 191) | HEADER_FUNCTION size_t loadFile_orDie(const char* fileName, void* buffer...
function HEADER_FUNCTION (line 215) | HEADER_FUNCTION void* mallocAndLoadFile_orDie(const char* fileName, size...
function HEADER_FUNCTION (line 232) | HEADER_FUNCTION void saveFile_orDie(const char* fileName, const void* bu...
FILE: examples/dictionary_compression.c
function ZSTD_CDict (line 28) | static ZSTD_CDict* createCDict_orDie(const char* dictFileName, int cLevel)
function compress (line 40) | static void compress(const char* fname, const char* oname, const ZSTD_CD...
function main (line 80) | int main(int argc, const char** argv)
FILE: examples/dictionary_decompression.c
function ZSTD_DDict (line 19) | static ZSTD_DDict* createDict_orDie(const char* dictFileName)
function decompress (line 30) | static void decompress(const char* fname, const ZSTD_DDict* ddict)
function main (line 78) | int main(int argc, const char** argv)
FILE: examples/multiple_simple_compression.c
type resources (line 17) | typedef struct {
function resources (line 29) | static resources createResources_orDie(int argc, const char** argv, char...
function freeResources (line 57) | static void freeResources(resources ress, char *outFilename)
function compressFile_orDie (line 66) | static void compressFile_orDie(resources ress, const char* fname, const ...
function main (line 83) | int main(int argc, const char** argv)
FILE: examples/multiple_streaming_compression.c
type resources (line 23) | typedef struct {
function resources (line 31) | static resources createResources_orDie(int cLevel)
function freeResources (line 50) | static void freeResources(resources ress)
function compressFile_orDie (line 57) | static void compressFile_orDie(resources ress, const char* fname, const ...
function main (line 95) | int main(int argc, const char** argv)
FILE: examples/simple_compression.c
function compress_orDie (line 17) | static void compress_orDie(const char* fname, const char* oname)
function main (line 51) | int main(int argc, const char** argv)
FILE: examples/simple_decompression.c
function decompress (line 16) | static void decompress(const char* fname)
function main (line 49) | int main(int argc, const char** argv)
FILE: examples/streaming_compression.c
function compressFile_orDie (line 18) | static void compressFile_orDie(const char* fname, const char* outName, i...
function main (line 114) | int main(int argc, const char** argv)
FILE: examples/streaming_compression_thread_pool.c
type compress_args_t (line 19) | typedef struct compress_args
function main (line 129) | int main(int argc, const char** argv)
FILE: examples/streaming_decompression.c
function decompressFile_orDie (line 17) | static void decompressFile_orDie(const char* fname)
function main (line 85) | int main(int argc, const char** argv)
FILE: examples/streaming_memory_usage.c
function readU32FromChar (line 32) | static unsigned readU32FromChar(const char** stringPtr)
function main (line 48) | int main(int argc, char const *argv[]) {
FILE: lib/common/allocations.h
function MEM_STATIC (line 26) | MEM_STATIC void* ZSTD_customMalloc(size_t size, ZSTD_customMem customMem)
function MEM_STATIC (line 33) | MEM_STATIC void* ZSTD_customCalloc(size_t size, ZSTD_customMem customMem)
function MEM_STATIC (line 49) | MEM_STATIC void ZSTD_customFree(void* ptr, ZSTD_customMem customMem)
FILE: lib/common/bits.h
function ZSTD_countTrailingZeros32_fallback (line 16) | MEM_STATIC unsigned ZSTD_countTrailingZeros32_fallback(U32 val)
function ZSTD_countTrailingZeros32 (line 28) | MEM_STATIC unsigned ZSTD_countTrailingZeros32(U32 val)
function ZSTD_countLeadingZeros32_fallback (line 52) | MEM_STATIC unsigned ZSTD_countLeadingZeros32_fallback(U32 val)
function ZSTD_countLeadingZeros32 (line 69) | MEM_STATIC unsigned ZSTD_countLeadingZeros32(U32 val)
function ZSTD_countTrailingZeros64 (line 93) | MEM_STATIC unsigned ZSTD_countTrailingZeros64(U64 val)
function ZSTD_countLeadingZeros64 (line 125) | MEM_STATIC unsigned ZSTD_countLeadingZeros64(U64 val)
function ZSTD_NbCommonBytes (line 157) | MEM_STATIC unsigned ZSTD_NbCommonBytes(size_t val)
function ZSTD_highbit32 (line 174) | MEM_STATIC unsigned ZSTD_highbit32(U32 val) /* compress, dictBuilder, ...
function MEM_STATIC (line 184) | MEM_STATIC
function MEM_STATIC (line 191) | MEM_STATIC
function MEM_STATIC (line 198) | MEM_STATIC
FILE: lib/common/bitstream.h
type BitContainerType (line 51) | typedef size_t BitContainerType;
type BIT_CStream_t (line 56) | typedef struct {
type BIT_DStream_t (line 90) | typedef struct {
type BIT_DStream_status (line 98) | typedef enum { BIT_DStream_unfinished = 0, /* fully refilled */
function MEM_STATIC (line 150) | MEM_STATIC size_t BIT_initCStream(BIT_CStream_t* bitC,
function FORCE_INLINE_TEMPLATE (line 162) | FORCE_INLINE_TEMPLATE BitContainerType BIT_getLowerBits(BitContainerType...
function MEM_STATIC (line 180) | MEM_STATIC void BIT_addBits(BIT_CStream_t* bitC,
function MEM_STATIC (line 193) | MEM_STATIC void BIT_addBitsFast(BIT_CStream_t* bitC,
function MEM_STATIC (line 205) | MEM_STATIC void BIT_flushBitsFast(BIT_CStream_t* bitC)
function MEM_STATIC (line 221) | MEM_STATIC void BIT_flushBits(BIT_CStream_t* bitC)
function MEM_STATIC (line 236) | MEM_STATIC size_t BIT_closeCStream(BIT_CStream_t* bitC)
function MEM_STATIC (line 254) | MEM_STATIC size_t BIT_initDStream(BIT_DStream_t* bitD, const void* srcBu...
function FORCE_INLINE_TEMPLATE (line 302) | FORCE_INLINE_TEMPLATE BitContainerType BIT_getUpperBits(BitContainerType...
function FORCE_INLINE_TEMPLATE (line 307) | FORCE_INLINE_TEMPLATE BitContainerType BIT_getMiddleBits(BitContainerTyp...
function FORCE_INLINE_TEMPLATE (line 330) | FORCE_INLINE_TEMPLATE BitContainerType BIT_lookBits(const BIT_DStream_t*...
function MEM_STATIC (line 346) | MEM_STATIC BitContainerType BIT_lookBitsFast(const BIT_DStream_t* bitD, ...
function FORCE_INLINE_TEMPLATE (line 353) | FORCE_INLINE_TEMPLATE void BIT_skipBits(BIT_DStream_t* bitD, U32 nbBits)
function FORCE_INLINE_TEMPLATE (line 362) | FORCE_INLINE_TEMPLATE BitContainerType BIT_readBits(BIT_DStream_t* bitD,...
function MEM_STATIC (line 371) | MEM_STATIC BitContainerType BIT_readBitsFast(BIT_DStream_t* bitD, unsign...
function MEM_STATIC (line 384) | MEM_STATIC BIT_DStream_status BIT_reloadDStream_internal(BIT_DStream_t* ...
function MEM_STATIC (line 400) | MEM_STATIC BIT_DStream_status BIT_reloadDStreamFast(BIT_DStream_t* bitD)
function FORCE_INLINE_TEMPLATE (line 412) | FORCE_INLINE_TEMPLATE BIT_DStream_status BIT_reloadDStream(BIT_DStream_t...
function BIT_endOfDStream (line 449) | MEM_STATIC unsigned BIT_endOfDStream(const BIT_DStream_t* DStream)
FILE: lib/common/compiler.h
function MEM_STATIC (line 292) | MEM_STATIC int ZSTD_isPower2(size_t u) {
function ZSTD_wrappedPtrDiff (line 366) | ptrdiff_t ZSTD_wrappedPtrDiff(unsigned char const* lhs, unsigned char co...
function MEM_STATIC (line 402) | MEM_STATIC
FILE: lib/common/cpu.h
type ZSTD_cpuid_t (line 25) | typedef struct {
function ZSTD_cpuid (line 32) | ZSTD_cpuid(void) {
FILE: lib/common/entropy_common.c
function FSE_versionNumber (line 27) | unsigned FSE_versionNumber(void) { return FSE_VERSION_NUMBER; }
function FSE_isError (line 31) | unsigned FSE_isError(size_t code) { return ERR_isError(code); }
function HUF_isError (line 34) | unsigned HUF_isError(size_t code) { return ERR_isError(code); }
function FORCE_INLINE_TEMPLATE (line 41) | FORCE_INLINE_TEMPLATE
function FSE_readNCount_body_default (line 190) | static size_t FSE_readNCount_body_default(
function BMI2_TARGET_ATTRIBUTE (line 198) | BMI2_TARGET_ATTRIBUTE static size_t FSE_readNCount_body_bmi2(
function FSE_readNCount_bmi2 (line 206) | size_t FSE_readNCount_bmi2(
function FSE_readNCount (line 219) | size_t FSE_readNCount(
function HUF_readStats (line 234) | size_t HUF_readStats(BYTE* huffWeight, size_t hwSize, U32* rankStats,
function FORCE_INLINE_TEMPLATE (line 242) | FORCE_INLINE_TEMPLATE size_t
function HUF_readStats_body_default (line 309) | static size_t HUF_readStats_body_default(BYTE* huffWeight, size_t hwSize...
function BMI2_TARGET_ATTRIBUTE (line 318) | static BMI2_TARGET_ATTRIBUTE size_t HUF_readStats_body_bmi2(BYTE* huffWe...
function HUF_readStats_wksp (line 327) | size_t HUF_readStats_wksp(BYTE* huffWeight, size_t hwSize, U32* rankStats,
FILE: lib/common/error_private.h
type ZSTD_ErrorCode (line 41) | typedef ZSTD_ErrorCode ERR_enum;
function ERR_isError (line 52) | ERR_STATIC unsigned ERR_isError(size_t code) { return (code > ERROR(maxC...
function ERR_STATIC (line 54) | ERR_STATIC ERR_enum ERR_getErrorCode(size_t code) { if (!ERR_isError(cod...
function ERR_STATIC (line 72) | ERR_STATIC const char* ERR_getErrorName(size_t code)
function _force_has_format_string (line 87) | void _force_has_format_string(const char *format, ...) {
FILE: lib/common/fse.h
type FSE_CTable (line 118) | typedef unsigned FSE_CTable;
type FSE_DTable (line 194) | typedef unsigned FSE_DTable;
type FSE_repeat (line 278) | typedef enum {
type FSE_CState_t (line 291) | typedef struct {
type FSE_DState_t (line 351) | typedef struct {
type FSE_symbolCompressionTransform (line 423) | typedef struct {
function MEM_STATIC (line 428) | MEM_STATIC void FSE_initCState(FSE_CState_t* statePtr, const FSE_CTable*...
function MEM_STATIC (line 443) | MEM_STATIC void FSE_initCState2(FSE_CState_t* statePtr, const FSE_CTable...
function MEM_STATIC (line 454) | MEM_STATIC void FSE_encodeSymbol(BIT_CStream_t* bitC, FSE_CState_t* stat...
function MEM_STATIC (line 463) | MEM_STATIC void FSE_flushCState(BIT_CStream_t* bitC, const FSE_CState_t*...
function MEM_STATIC (line 475) | MEM_STATIC U32 FSE_getMaxNbBits(const void* symbolTTPtr, U32 symbolValue)
function MEM_STATIC (line 485) | MEM_STATIC U32 FSE_bitCost(const void* symbolTTPtr, U32 tableLog, U32 sy...
type FSE_DTableHeader (line 505) | typedef struct {
type FSE_decode_t (line 510) | typedef struct
function MEM_STATIC (line 517) | MEM_STATIC void FSE_initDState(FSE_DState_t* DStatePtr, BIT_DStream_t* b...
function MEM_STATIC (line 526) | MEM_STATIC BYTE FSE_peekSymbol(const FSE_DState_t* DStatePtr)
function MEM_STATIC (line 532) | MEM_STATIC void FSE_updateState(FSE_DState_t* DStatePtr, BIT_DStream_t* ...
function MEM_STATIC (line 540) | MEM_STATIC BYTE FSE_decodeSymbol(FSE_DState_t* DStatePtr, BIT_DStream_t*...
function MEM_STATIC (line 553) | MEM_STATIC BYTE FSE_decodeSymbolFast(FSE_DState_t* DStatePtr, BIT_DStrea...
function FSE_endOfDState (line 564) | MEM_STATIC unsigned FSE_endOfDState(const FSE_DState_t* DStatePtr)
FILE: lib/common/fse_decompress.c
function FSE_buildDTable_internal (line 58) | static size_t FSE_buildDTable_internal(FSE_DTable* dt, const short* norm...
function FSE_buildDTable_wksp (line 161) | size_t FSE_buildDTable_wksp(FSE_DTable* dt, const short* normalizedCount...
function FORCE_INLINE_TEMPLATE (line 173) | FORCE_INLINE_TEMPLATE size_t FSE_decompress_usingDTable_generic(
type FSE_DecompressWksp (line 238) | typedef struct {
function FORCE_INLINE_TEMPLATE (line 243) | FORCE_INLINE_TEMPLATE size_t FSE_decompress_wksp_body(
function FSE_decompress_wksp_body_default (line 292) | static size_t FSE_decompress_wksp_body_default(void* dst, size_t dstCapa...
function BMI2_TARGET_ATTRIBUTE (line 298) | BMI2_TARGET_ATTRIBUTE static size_t FSE_decompress_wksp_body_bmi2(void* ...
function FSE_decompress_wksp_bmi2 (line 304) | size_t FSE_decompress_wksp_bmi2(void* dst, size_t dstCapacity, const voi...
FILE: lib/common/huf.h
type HUF_CElt (line 57) | typedef size_t HUF_CElt;
type U32 (line 64) | typedef U32 HUF_DTable;
type HUF_flags_e (line 80) | typedef enum {
type HUF_repeat (line 139) | typedef enum {
type HUF_CTableHeader (line 200) | typedef struct {
FILE: lib/common/mem.h
type BYTE (line 42) | typedef uint8_t BYTE;
type U8 (line 43) | typedef uint8_t U8;
type S8 (line 44) | typedef int8_t S8;
type U16 (line 45) | typedef uint16_t U16;
type S16 (line 46) | typedef int16_t S16;
type U32 (line 47) | typedef uint32_t U32;
type S32 (line 48) | typedef int32_t S32;
type U64 (line 49) | typedef uint64_t U64;
type S64 (line 50) | typedef int64_t S64;
type BYTE (line 56) | typedef unsigned char BYTE;
type U8 (line 57) | typedef unsigned char U8;
type S8 (line 58) | typedef signed char S8;
type U16 (line 62) | typedef unsigned short U16;
type S16 (line 63) | typedef signed short S16;
type U32 (line 67) | typedef unsigned int U32;
type S32 (line 68) | typedef signed int S32;
type U64 (line 71) | typedef unsigned long long U64;
type S64 (line 72) | typedef signed long long S64;
function MEM_32bits (line 137) | MEM_STATIC unsigned MEM_32bits(void) { return sizeof(size_t)==4; }
function MEM_64bits (line 138) | MEM_STATIC unsigned MEM_64bits(void) { return sizeof(size_t)==8; }
function MEM_isLittleEndian (line 140) | MEM_STATIC unsigned MEM_isLittleEndian(void)
function MEM_STATIC (line 166) | MEM_STATIC U16 MEM_read16(const void* memPtr) { return *(const U16*) mem...
function MEM_STATIC (line 167) | MEM_STATIC U32 MEM_read32(const void* memPtr) { return *(const U32*) mem...
function MEM_STATIC (line 168) | MEM_STATIC U64 MEM_read64(const void* memPtr) { return *(const U64*) mem...
function MEM_STATIC (line 169) | MEM_STATIC size_t MEM_readST(const void* memPtr) { return *(const size_t...
function MEM_STATIC (line 171) | MEM_STATIC void MEM_write16(void* memPtr, U16 value) { *(U16*)memPtr = v...
function MEM_STATIC (line 172) | MEM_STATIC void MEM_write32(void* memPtr, U32 value) { *(U32*)memPtr = v...
function MEM_STATIC (line 173) | MEM_STATIC void MEM_write64(void* memPtr, U64 value) { *(U64*)memPtr = v...
type __attribute__ (line 177) | typedef __attribute__((aligned(1)))
type __attribute__ (line 178) | typedef __attribute__((aligned(1)))
type __attribute__ (line 179) | typedef __attribute__((aligned(1)))
type __attribute__ (line 180) | typedef __attribute__((aligned(1)))
function MEM_STATIC (line 182) | MEM_STATIC U16 MEM_read16(const void* ptr) { return *(const unalign16*)p...
function MEM_STATIC (line 183) | MEM_STATIC U32 MEM_read32(const void* ptr) { return *(const unalign32*)p...
function MEM_STATIC (line 184) | MEM_STATIC U64 MEM_read64(const void* ptr) { return *(const unalign64*)p...
function MEM_STATIC (line 185) | MEM_STATIC size_t MEM_readST(const void* ptr) { return *(const unalignAr...
function MEM_STATIC (line 187) | MEM_STATIC void MEM_write16(void* memPtr, U16 value) { *(unalign16*)memP...
function MEM_STATIC (line 188) | MEM_STATIC void MEM_write32(void* memPtr, U32 value) { *(unalign32*)memP...
function MEM_STATIC (line 189) | MEM_STATIC void MEM_write64(void* memPtr, U64 value) { *(unalign64*)memP...
function MEM_STATIC (line 196) | MEM_STATIC U16 MEM_read16(const void* memPtr)
function MEM_STATIC (line 201) | MEM_STATIC U32 MEM_read32(const void* memPtr)
function MEM_STATIC (line 206) | MEM_STATIC U64 MEM_read64(const void* memPtr)
function MEM_STATIC (line 211) | MEM_STATIC size_t MEM_readST(const void* memPtr)
function MEM_STATIC (line 216) | MEM_STATIC void MEM_write16(void* memPtr, U16 value)
function MEM_STATIC (line 221) | MEM_STATIC void MEM_write32(void* memPtr, U32 value)
function MEM_STATIC (line 226) | MEM_STATIC void MEM_write64(void* memPtr, U64 value)
function MEM_STATIC (line 233) | MEM_STATIC U32 MEM_swap32_fallback(U32 in)
function MEM_STATIC (line 241) | MEM_STATIC U32 MEM_swap32(U32 in)
function MEM_STATIC (line 255) | MEM_STATIC U64 MEM_swap64_fallback(U64 in)
function MEM_STATIC (line 267) | MEM_STATIC U64 MEM_swap64(U64 in)
function MEM_STATIC (line 279) | MEM_STATIC size_t MEM_swapST(size_t in)
function MEM_STATIC (line 289) | MEM_STATIC U16 MEM_readLE16(const void* memPtr)
function MEM_STATIC (line 299) | MEM_STATIC void MEM_writeLE16(void* memPtr, U16 val)
function MEM_STATIC (line 310) | MEM_STATIC U32 MEM_readLE24(const void* memPtr)
function MEM_STATIC (line 315) | MEM_STATIC void MEM_writeLE24(void* memPtr, U32 val)
function MEM_STATIC (line 321) | MEM_STATIC U32 MEM_readLE32(const void* memPtr)
function MEM_STATIC (line 329) | MEM_STATIC void MEM_writeLE32(void* memPtr, U32 val32)
function MEM_STATIC (line 337) | MEM_STATIC U64 MEM_readLE64(const void* memPtr)
function MEM_STATIC (line 345) | MEM_STATIC void MEM_writeLE64(void* memPtr, U64 val64)
function MEM_STATIC (line 353) | MEM_STATIC size_t MEM_readLEST(const void* memPtr)
function MEM_STATIC (line 361) | MEM_STATIC void MEM_writeLEST(void* memPtr, size_t val)
function MEM_STATIC (line 371) | MEM_STATIC U32 MEM_readBE32(const void* memPtr)
function MEM_STATIC (line 379) | MEM_STATIC void MEM_writeBE32(void* memPtr, U32 val32)
function MEM_STATIC (line 387) | MEM_STATIC U64 MEM_readBE64(const void* memPtr)
function MEM_STATIC (line 395) | MEM_STATIC void MEM_writeBE64(void* memPtr, U64 val64)
function MEM_STATIC (line 403) | MEM_STATIC size_t MEM_readBEST(const void* memPtr)
function MEM_STATIC (line 411) | MEM_STATIC void MEM_writeBEST(void* memPtr, size_t val)
function MEM_STATIC (line 420) | MEM_STATIC void MEM_check(void) { DEBUG_STATIC_ASSERT((sizeof(size_t)==4...
FILE: lib/common/pool.c
type POOL_job (line 29) | typedef struct POOL_job_s {
type POOL_ctx_s (line 34) | struct POOL_ctx_s {
function POOL_ctx (line 107) | POOL_ctx* ZSTD_createThreadPool(size_t numThreads) {
function POOL_ctx (line 111) | POOL_ctx* POOL_create(size_t numThreads, size_t queueSize) {
function POOL_ctx (line 115) | POOL_ctx* POOL_create_advanced(size_t numThreads, size_t queueSize,
function POOL_join (line 163) | static void POOL_join(POOL_ctx* ctx) {
function POOL_free (line 178) | void POOL_free(POOL_ctx *ctx) {
function POOL_joinJobs (line 192) | void POOL_joinJobs(POOL_ctx* ctx) {
function ZSTD_freeThreadPool (line 200) | void ZSTD_freeThreadPool (ZSTD_threadPool* pool) {
function POOL_sizeof (line 204) | size_t POOL_sizeof(const POOL_ctx* ctx) {
function POOL_resize_internal (line 213) | static int POOL_resize_internal(POOL_ctx* ctx, size_t numThreads)
function POOL_resize (line 241) | int POOL_resize(POOL_ctx* ctx, size_t numThreads)
function isQueueFull (line 258) | static int isQueueFull(POOL_ctx const* ctx) {
function POOL_add_internal (line 268) | static void
function POOL_add (line 283) | void POOL_add(POOL_ctx* ctx, POOL_function function, void* opaque)
function POOL_tryAdd (line 296) | int POOL_tryAdd(POOL_ctx* ctx, POOL_function function, void* opaque)
type POOL_ctx_s (line 318) | struct POOL_ctx_s {
function POOL_ctx (line 323) | POOL_ctx* POOL_create(size_t numThreads, size_t queueSize) {
function POOL_ctx (line 327) | POOL_ctx*
function POOL_free (line 336) | void POOL_free(POOL_ctx* ctx) {
function POOL_joinJobs (line 341) | void POOL_joinJobs(POOL_ctx* ctx){
function POOL_resize (line 346) | int POOL_resize(POOL_ctx* ctx, size_t numThreads) {
function POOL_add (line 351) | void POOL_add(POOL_ctx* ctx, POOL_function function, void* opaque) {
function POOL_tryAdd (line 356) | int POOL_tryAdd(POOL_ctx* ctx, POOL_function function, void* opaque) {
function POOL_sizeof (line 362) | size_t POOL_sizeof(const POOL_ctx* ctx) {
FILE: lib/common/pool.h
type POOL_ctx (line 19) | typedef struct POOL_ctx_s POOL_ctx;
FILE: lib/common/threading.c
type ZSTD_thread_params_t (line 37) | typedef struct {
function worker (line 45) | static unsigned __stdcall worker(void *arg)
function ZSTD_pthread_create (line 70) | int ZSTD_pthread_create(ZSTD_pthread_t* thread, const void* unused,
function ZSTD_pthread_join (line 114) | int ZSTD_pthread_join(ZSTD_pthread_t thread)
function ZSTD_pthread_mutex_init (line 140) | int ZSTD_pthread_mutex_init(ZSTD_pthread_mutex_t* mutex, pthread_mutexat...
function ZSTD_pthread_mutex_destroy (line 156) | int ZSTD_pthread_mutex_destroy(ZSTD_pthread_mutex_t* mutex)
function ZSTD_pthread_cond_init (line 168) | int ZSTD_pthread_cond_init(ZSTD_pthread_cond_t* cond, pthread_condattr_t...
function ZSTD_pthread_cond_destroy (line 184) | int ZSTD_pthread_cond_destroy(ZSTD_pthread_cond_t* cond)
FILE: lib/common/threading.h
type HANDLE (line 60) | typedef HANDLE ZSTD_pthread_t;
type ZSTD_pthread_mutex_t (line 124) | typedef int ZSTD_pthread_mutex_t;
type ZSTD_pthread_cond_t (line 130) | typedef int ZSTD_pthread_cond_t;
FILE: lib/common/xxhash.h
type XXH_errorcode (line 560) | typedef enum {
type XXH32_hash_t (line 575) | typedef uint32_t XXH32_hash_t;
type XXH32_hash_t (line 585) | typedef uint32_t XXH32_hash_t;
type XXH32_hash_t (line 590) | typedef unsigned int XXH32_hash_t;
type XXH32_hash_t (line 592) | typedef unsigned long XXH32_hash_t;
type XXH32_state_t (line 644) | typedef struct XXH32_state_s XXH32_state_t;
type XXH32_canonical_t (line 735) | typedef struct {
type XXH64_hash_t (line 850) | typedef uint64_t XXH64_hash_t;
type XXH64_hash_t (line 859) | typedef uint64_t XXH64_hash_t;
type XXH64_hash_t (line 864) | typedef unsigned long XXH64_hash_t;
type XXH64_hash_t (line 867) | typedef unsigned long long XXH64_hash_t;
type XXH64_state_t (line 913) | typedef struct XXH64_state_s XXH64_state_t;
type XXH64_canonical_t (line 1004) | typedef struct { unsigned char digest[sizeof(XXH64_hash_t)]; } XXH64_can...
type XXH3_state_t (line 1201) | typedef struct XXH3_state_s XXH3_state_t;
type XXH128_hash_t (line 1330) | typedef struct {
type XXH128_canonical_t (line 1547) | typedef struct { unsigned char digest[sizeof(XXH128_hash_t)]; } XXH128_c...
type XXH32_state_s (line 1619) | struct XXH32_state_s {
type XXH64_state_s (line 1643) | struct XXH64_state_s {
type XXH3_state_s (line 1718) | struct XXH3_state_s {
function XXH_CONSTF (line 2315) | static XXH_CONSTF void* XXH_malloc(size_t s) { (void)s; return NULL; }
function XXH_free (line 2316) | static void XXH_free(void* p) { (void)p; }
function XXH_MALLOCF (line 2337) | static XXH_MALLOCF void* XXH_malloc(size_t s) { return malloc(s); }
function XXH_free (line 2343) | static void XXH_free(void* p) { free(p); }
type xxh_u8 (line 2487) | typedef uint8_t xxh_u8;
type xxh_u8 (line 2489) | typedef unsigned char xxh_u8;
type XXH32_hash_t (line 2491) | typedef XXH32_hash_t xxh_u32;
function xxh_u32 (line 2567) | static xxh_u32 XXH_read32(const void* memPtr) { return *(const xxh_u32*)...
type unalign (line 2579) | typedef union { xxh_u32 u32; } __attribute__((packed)) unalign;
function xxh_u32 (line 2581) | static xxh_u32 XXH_read32(const void* ptr)
function xxh_u32 (line 2593) | static xxh_u32 XXH_read32(const void* memPtr)
function XXH_isLittleEndian (line 2640) | static int XXH_isLittleEndian(void)
function xxh_u32 (line 2751) | static xxh_u32 XXH_swap32 (xxh_u32 x)
type XXH_alignment (line 2769) | typedef enum {
function XXH_FORCE_INLINE (line 2781) | XXH_FORCE_INLINE xxh_u32 XXH_readLE32(const void* memPtr)
function XXH_FORCE_INLINE (line 2790) | XXH_FORCE_INLINE xxh_u32 XXH_readBE32(const void* memPtr)
function XXH_FORCE_INLINE (line 2800) | XXH_FORCE_INLINE xxh_u32 XXH_readLE32(const void* ptr)
function xxh_u32 (line 2805) | static xxh_u32 XXH_readBE32(const void* ptr)
function XXH_FORCE_INLINE (line 2811) | XXH_FORCE_INLINE xxh_u32
function XXH_versionNumber (line 2826) | XXH_PUBLIC_API unsigned XXH_versionNumber (void) { return XXH_VERSION_NU...
function xxh_u32 (line 2866) | static xxh_u32 XXH32_round(xxh_u32 acc, xxh_u32 input)
function xxh_u32 (line 2923) | static xxh_u32 XXH32_avalanche(xxh_u32 hash)
function XXH_PUREF (line 2950) | static XXH_PUREF xxh_u32
function xxh_u32 (line 3039) | xxh_u32
function XXH_PUBLIC_API (line 3073) | XXH_PUBLIC_API XXH32_hash_t XXH32 (const void* input, size_t len, XXH32_...
function XXH_PUBLIC_API (line 3096) | XXH_PUBLIC_API XXH32_state_t* XXH32_createState(void)
function XXH_PUBLIC_API (line 3101) | XXH_PUBLIC_API XXH_errorcode XXH32_freeState(XXH32_state_t* statePtr)
function XXH_PUBLIC_API (line 3108) | XXH_PUBLIC_API void XXH32_copyState(XXH32_state_t* dstState, const XXH32...
function XXH_PUBLIC_API (line 3114) | XXH_PUBLIC_API XXH_errorcode XXH32_reset(XXH32_state_t* statePtr, XXH32_...
function XXH_PUBLIC_API (line 3127) | XXH_PUBLIC_API XXH_errorcode
function XXH_PUBLIC_API (line 3182) | XXH_PUBLIC_API XXH32_hash_t XXH32_digest(const XXH32_state_t* state)
function XXH_PUBLIC_API (line 3204) | XXH_PUBLIC_API void XXH32_canonicalFromHash(XXH32_canonical_t* dst, XXH3...
function XXH_PUBLIC_API (line 3211) | XXH_PUBLIC_API XXH32_hash_t XXH32_hashFromCanonical(const XXH32_canonica...
type XXH64_hash_t (line 3229) | typedef XXH64_hash_t xxh_u64;
function xxh_u64 (line 3243) | static xxh_u64 XXH_read64(const void* memPtr)
type unalign64 (line 3258) | typedef union { xxh_u32 u32; xxh_u64 u64; } __attribute__((packed)) unal...
function xxh_u64 (line 3260) | static xxh_u64 XXH_read64(const void* ptr)
function xxh_u64 (line 3272) | static xxh_u64 XXH_read64(const void* memPtr)
function xxh_u64 (line 3286) | static xxh_u64 XXH_swap64(xxh_u64 x)
function XXH_FORCE_INLINE (line 3303) | XXH_FORCE_INLINE xxh_u64 XXH_readLE64(const void* memPtr)
function XXH_FORCE_INLINE (line 3316) | XXH_FORCE_INLINE xxh_u64 XXH_readBE64(const void* memPtr)
function XXH_FORCE_INLINE (line 3330) | XXH_FORCE_INLINE xxh_u64 XXH_readLE64(const void* ptr)
function xxh_u64 (line 3335) | static xxh_u64 XXH_readBE64(const void* ptr)
function XXH_FORCE_INLINE (line 3341) | XXH_FORCE_INLINE xxh_u64
function xxh_u64 (line 3376) | static xxh_u64 XXH64_round(xxh_u64 acc, xxh_u64 input)
function xxh_u64 (line 3401) | static xxh_u64 XXH64_mergeRound(xxh_u64 acc, xxh_u64 val)
function xxh_u64 (line 3410) | static xxh_u64 XXH64_avalanche(xxh_u64 hash)
function XXH_PUREF (line 3438) | static XXH_PUREF xxh_u64
function xxh_u64 (line 3482) | xxh_u64
function XXH_PUBLIC_API (line 3520) | XXH_PUBLIC_API XXH64_hash_t XXH64 (XXH_NOESCAPE const void* input, size_...
function XXH_PUBLIC_API (line 3542) | XXH_PUBLIC_API XXH64_state_t* XXH64_createState(void)
function XXH_PUBLIC_API (line 3547) | XXH_PUBLIC_API XXH_errorcode XXH64_freeState(XXH64_state_t* statePtr)
function XXH_PUBLIC_API (line 3554) | XXH_PUBLIC_API void XXH64_copyState(XXH_NOESCAPE XXH64_state_t* dstState...
function XXH_PUBLIC_API (line 3560) | XXH_PUBLIC_API XXH_errorcode XXH64_reset(XXH_NOESCAPE XXH64_state_t* sta...
function XXH_PUBLIC_API (line 3572) | XXH_PUBLIC_API XXH_errorcode
function XXH_PUBLIC_API (line 3624) | XXH_PUBLIC_API XXH64_hash_t XXH64_digest(XXH_NOESCAPE const XXH64_state_...
function XXH_PUBLIC_API (line 3647) | XXH_PUBLIC_API void XXH64_canonicalFromHash(XXH_NOESCAPE XXH64_canonical...
function XXH_PUBLIC_API (line 3655) | XXH_PUBLIC_API XXH64_hash_t XXH64_hashFromCanonical(XXH_NOESCAPE const X...
type XXH_VECTOR_TYPE (line 3838) | enum XXH_VECTOR_TYPE /* fake enum */ {
type uint64x2_t (line 3997) | typedef uint64x2_t xxh_aliasing_uint64x2_t
function XXH_FORCE_INLINE (line 4013) | XXH_FORCE_INLINE uint64x2_t XXH_vld1q_u64(void const* ptr) /* silence -W...
function XXH_FORCE_INLINE (line 4018) | XXH_FORCE_INLINE uint64x2_t XXH_vld1q_u64(void const* ptr)
function XXH_FORCE_INLINE (line 4033) | XXH_FORCE_INLINE uint64x2_t
function XXH_FORCE_INLINE (line 4040) | XXH_FORCE_INLINE uint64x2_t
function XXH_FORCE_INLINE (line 4048) | XXH_FORCE_INLINE uint64x2_t
function XXH_FORCE_INLINE (line 4055) | XXH_FORCE_INLINE uint64x2_t
type xxh_u64x2 (line 4150) | typedef __vector unsigned long long xxh_u64x2;
type xxh_u8x16 (line 4151) | typedef __vector unsigned char xxh_u8x16;
type xxh_u32x4 (line 4152) | typedef __vector unsigned xxh_u32x4;
type xxh_u64x2 (line 4157) | typedef xxh_u64x2 xxh_aliasing_u64x2
function XXH_FORCE_INLINE (line 4181) | XXH_FORCE_INLINE xxh_u64x2 XXH_vec_revb(xxh_u64x2 val)
function XXH_FORCE_INLINE (line 4199) | XXH_FORCE_INLINE xxh_u64x2 XXH_vec_loadu(const void *ptr)
function XXH_FORCE_INLINE (line 4227) | XXH_FORCE_INLINE xxh_u64x2 XXH_vec_mulo(xxh_u32x4 a, xxh_u32x4 b)
function XXH_FORCE_INLINE (line 4233) | XXH_FORCE_INLINE xxh_u64x2 XXH_vec_mule(xxh_u32x4 a, xxh_u32x4 b)
function XXH_FORCE_INLINE (line 4331) | XXH_FORCE_INLINE xxh_u64
function XXH128_hash_t (line 4358) | static XXH128_hash_t
function xxh_u64 (line 4492) | static xxh_u64
function xxh_u64 (line 4500) | xxh_u64 XXH_xorshift64(xxh_u64 v64, int shift)
function XXH64_hash_t (line 4510) | static XXH64_hash_t XXH3_avalanche(xxh_u64 h64)
function XXH64_hash_t (line 4523) | static XXH64_hash_t XXH3_rrmxmx(xxh_u64 h64, xxh_u64 len)
function XXH64_hash_t (line 4567) | XXH64_hash_t
function XXH64_hash_t (line 4589) | XXH64_hash_t
function XXH64_hash_t (line 4605) | XXH64_hash_t
function XXH64_hash_t (line 4622) | XXH64_hash_t
function XXH_FORCE_INLINE (line 4659) | XXH_FORCE_INLINE xxh_u64 XXH3_mix16B(const xxh_u8* XXH_RESTRICT input,
function XXH64_hash_t (line 4692) | XXH64_hash_t
function XXH64_hash_t (line 4733) | XXH64_hash_t
function XXH_FORCE_INLINE (line 4845) | XXH_FORCE_INLINE void XXH_writeLE64(void* dst, xxh_u64 v64)
type xxh_i64 (line 4859) | typedef int64_t xxh_i64;
type xxh_i64 (line 4862) | typedef long long xxh_i64;
function XXH3_accumulate_512_avx512 (line 4896) | void
function XXH_FORCE_INLINE (line 4923) | XXH_FORCE_INLINE XXH_TARGET_AVX512 XXH3_ACCUMULATE_TEMPLATE(avx512)
function XXH3_initCustomSecret_avx512 (line 4969) | void
function XXH3_accumulate_512_avx2 (line 4999) | void
function XXH_FORCE_INLINE (line 5032) | XXH_FORCE_INLINE XXH_TARGET_AVX2 XXH3_ACCUMULATE_TEMPLATE(avx2)
function XXH3_initCustomSecret_avx2 (line 5063) | void XXH3_initCustomSecret_avx2(void* XXH_RESTRICT customSecret, xxh_u64...
function XXH3_accumulate_512_sse2 (line 5105) | void
function XXH_FORCE_INLINE (line 5139) | XXH_FORCE_INLINE XXH_TARGET_SSE2 XXH3_ACCUMULATE_TEMPLATE(sse2)
function XXH3_initCustomSecret_sse2 (line 5170) | void XXH3_initCustomSecret_sse2(void* XXH_RESTRICT customSecret, xxh_u64...
function XXH_FORCE_INLINE (line 5240) | XXH_FORCE_INLINE void
function XXH_FORCE_INLINE (line 5366) | XXH_FORCE_INLINE XXH3_ACCUMULATE_TEMPLATE(neon)
function XXH_FORCE_INLINE (line 5427) | XXH_FORCE_INLINE void
function XXH_FORCE_INLINE (line 5461) | XXH_FORCE_INLINE XXH3_ACCUMULATE_TEMPLATE(vsx)
function XXH_FORCE_INLINE (line 5497) | XXH_FORCE_INLINE void
function XXH_FORCE_INLINE (line 5537) | XXH_FORCE_INLINE void
function XXH_FORCE_INLINE (line 5621) | XXH_FORCE_INLINE xxh_u64
function XXH_FORCE_INLINE (line 5630) | XXH_FORCE_INLINE xxh_u64
function XXH_FORCE_INLINE (line 5644) | XXH_FORCE_INLINE void
function XXH_FORCE_INLINE (line 5667) | XXH_FORCE_INLINE void
function XXH_FORCE_INLINE (line 5684) | XXH_FORCE_INLINE XXH3_ACCUMULATE_TEMPLATE(scalar)
function XXH_FORCE_INLINE (line 5716) | XXH_FORCE_INLINE void
function XXH_FORCE_INLINE (line 5725) | XXH_FORCE_INLINE void
function XXH_FORCE_INLINE (line 5848) | XXH_FORCE_INLINE void
function XXH_FORCE_INLINE (line 5881) | XXH_FORCE_INLINE xxh_u64
function XXH64_hash_t (line 5889) | static XXH64_hash_t
function XXH_FORCE_INLINE (line 5919) | XXH_FORCE_INLINE XXH64_hash_t
function XXH3_WITH_SECRET_INLINE (line 5944) | XXH3_WITH_SECRET_INLINE XXH64_hash_t
function XXH64_hash_t (line 5958) | XXH64_hash_t
function XXH_FORCE_INLINE (line 5977) | XXH_FORCE_INLINE XXH64_hash_t
function XXH_NO_INLINE (line 6000) | XXH_NO_INLINE XXH64_hash_t
type XXH64_hash_t (line 6010) | typedef XXH64_hash_t (*XXH3_hashLong64_f)(const void* XXH_RESTRICT, size_t,
function XXH_FORCE_INLINE (line 6013) | XXH_FORCE_INLINE XXH64_hash_t
function XXH_PUBLIC_API (line 6039) | XXH_PUBLIC_API XXH64_hash_t XXH3_64bits(XXH_NOESCAPE const void* input, ...
function XXH_PUBLIC_API (line 6045) | XXH_PUBLIC_API XXH64_hash_t
function XXH_PUBLIC_API (line 6052) | XXH_PUBLIC_API XXH64_hash_t
function XXH_PUBLIC_API (line 6058) | XXH_PUBLIC_API XXH64_hash_t
function XXH_MALLOCF (line 6092) | static XXH_MALLOCF void* XXH_alignedMalloc(size_t s, size_t align)
function XXH_alignedFree (line 6123) | static void XXH_alignedFree(void* p)
function XXH_PUBLIC_API (line 6143) | XXH_PUBLIC_API XXH3_state_t* XXH3_createState(void)
function XXH_PUBLIC_API (line 6161) | XXH_PUBLIC_API XXH_errorcode XXH3_freeState(XXH3_state_t* statePtr)
function XXH_PUBLIC_API (line 6168) | XXH_PUBLIC_API void
function XXH3_reset_internal (line 6174) | static void
function XXH_PUBLIC_API (line 6202) | XXH_PUBLIC_API XXH_errorcode
function XXH_PUBLIC_API (line 6211) | XXH_PUBLIC_API XXH_errorcode
function XXH_PUBLIC_API (line 6222) | XXH_PUBLIC_API XXH_errorcode
function XXH_PUBLIC_API (line 6234) | XXH_PUBLIC_API XXH_errorcode
function XXH_FORCE_INLINE (line 6262) | XXH_FORCE_INLINE const xxh_u8 *
function XXH_PUBLIC_API (line 6386) | XXH_PUBLIC_API XXH_errorcode
function XXH_FORCE_INLINE (line 6394) | XXH_FORCE_INLINE void
function XXH_PUBLIC_API (line 6432) | XXH_PUBLIC_API XXH64_hash_t XXH3_64bits_digest (XXH_NOESCAPE const XXH3_...
function XXH128_hash_t (line 6468) | XXH128_hash_t
function XXH128_hash_t (line 6497) | XXH128_hash_t
function XXH128_hash_t (line 6524) | XXH128_hash_t
function XXH128_hash_t (line 6599) | XXH128_hash_t
function XXH_FORCE_INLINE (line 6618) | XXH_FORCE_INLINE XXH128_hash_t
function XXH128_hash_t (line 6630) | XXH128_hash_t
function XXH128_hash_t (line 6674) | XXH128_hash_t
function XXH_FORCE_INLINE (line 6732) | XXH_FORCE_INLINE XXH128_hash_t
function XXH128_hash_t (line 6760) | XXH128_hash_t
function XXH3_WITH_SECRET_INLINE (line 6777) | XXH3_WITH_SECRET_INLINE XXH128_hash_t
function XXH_FORCE_INLINE (line 6787) | XXH_FORCE_INLINE XXH128_hash_t
function XXH_NO_INLINE (line 6808) | XXH_NO_INLINE XXH128_hash_t
type XXH128_hash_t (line 6817) | typedef XXH128_hash_t (*XXH3_hashLong128_f)(const void* XXH_RESTRICT, si...
function XXH_FORCE_INLINE (line 6820) | XXH_FORCE_INLINE XXH128_hash_t
function XXH_PUBLIC_API (line 6845) | XXH_PUBLIC_API XXH128_hash_t XXH3_128bits(XXH_NOESCAPE const void* input...
function XXH_PUBLIC_API (line 6853) | XXH_PUBLIC_API XXH128_hash_t
function XXH_PUBLIC_API (line 6862) | XXH_PUBLIC_API XXH128_hash_t
function XXH_PUBLIC_API (line 6871) | XXH_PUBLIC_API XXH128_hash_t
function XXH_PUBLIC_API (line 6880) | XXH_PUBLIC_API XXH128_hash_t
function XXH_PUBLIC_API (line 6895) | XXH_PUBLIC_API XXH_errorcode
function XXH_PUBLIC_API (line 6902) | XXH_PUBLIC_API XXH_errorcode
function XXH_PUBLIC_API (line 6909) | XXH_PUBLIC_API XXH_errorcode
function XXH_PUBLIC_API (line 6916) | XXH_PUBLIC_API XXH_errorcode
function XXH_PUBLIC_API (line 6923) | XXH_PUBLIC_API XXH_errorcode
function XXH_PUBLIC_API (line 6930) | XXH_PUBLIC_API XXH128_hash_t XXH3_128bits_digest (XXH_NOESCAPE const XXH...
function XXH_PUBLIC_API (line 6959) | XXH_PUBLIC_API int XXH128_isEqual(XXH128_hash_t h1, XXH128_hash_t h2)
function XXH_PUBLIC_API (line 6970) | XXH_PUBLIC_API int XXH128_cmp(XXH_NOESCAPE const void* h128_1, XXH_NOESC...
function XXH_PUBLIC_API (line 6983) | XXH_PUBLIC_API void
function XXH_PUBLIC_API (line 6996) | XXH_PUBLIC_API XXH128_hash_t
function XXH_FORCE_INLINE (line 7013) | XXH_FORCE_INLINE void XXH3_combine16(void* dst, XXH128_hash_t h128)
function XXH_PUBLIC_API (line 7020) | XXH_PUBLIC_API XXH_errorcode
function XXH_PUBLIC_API (line 7065) | XXH_PUBLIC_API void
FILE: lib/common/zstd_common.c
function ZSTD_versionNumber (line 24) | unsigned ZSTD_versionNumber(void) { return ZSTD_VERSION_NUMBER; }
function ZSTD_isError (line 36) | unsigned ZSTD_isError(size_t code) { return ERR_isError(code); }
function ZSTD_ErrorCode (line 44) | ZSTD_ErrorCode ZSTD_getErrorCode(size_t code) { return ERR_getErrorCode(...
function ZSTD_isDeterministicBuild (line 50) | int ZSTD_isDeterministicBuild(void)
FILE: lib/common/zstd_internal.h
type blockType_e (line 86) | typedef enum { bt_raw, bt_rle, bt_compressed, bt_reserved } blockType_e;
type SymbolEncodingType_e (line 94) | typedef enum { set_basic, set_rle, set_compressed, set_repeat } SymbolEn...
function ZSTD_copy8 (line 170) | static void ZSTD_copy8(void* dst, const void* src) {
function ZSTD_copy16 (line 183) | static void ZSTD_copy16(void* dst, const void* src) {
type ZSTD_overlap_e (line 204) | typedef enum {
function ZSTD_wildcopy (line 218) | void ZSTD_wildcopy(void* dst, const void* src, size_t length, ZSTD_overl...
function MEM_STATIC (line 250) | MEM_STATIC size_t ZSTD_limitCopy(void* dst, size_t dstCapacity, const vo...
type ZSTD_bufferMode_e (line 270) | typedef enum {
type ZSTD_frameSizeInfo (line 286) | typedef struct {
type blockProperties_t (line 299) | typedef struct {
function MEM_STATIC (line 320) | MEM_STATIC int ZSTD_cpuSupportsBmi2(void)
FILE: lib/common/zstd_trace.h
type ZSTD_CCtx_s (line 47) | struct ZSTD_CCtx_s
type ZSTD_DCtx_s (line 48) | struct ZSTD_DCtx_s
type ZSTD_CCtx_params_s (line 49) | struct ZSTD_CCtx_params_s
type ZSTD_Trace (line 51) | typedef struct {
type ZSTD_TraceCtx (line 114) | typedef unsigned long long ZSTD_TraceCtx;
type ZSTD_CCtx_s (line 124) | struct ZSTD_CCtx_s
type ZSTD_DCtx_s (line 143) | struct ZSTD_DCtx_s
FILE: lib/compress/fse_compress.c
function FSE_buildCTable_wksp (line 68) | size_t FSE_buildCTable_wksp(FSE_CTable* ct,
function FSE_NCountWriteBound (line 223) | size_t FSE_NCountWriteBound(unsigned maxSymbolValue, unsigned tableLog)
function FSE_writeNCount_generic (line 233) | static size_t
function FSE_writeNCount (line 330) | size_t FSE_writeNCount (void* buffer, size_t bufferSize,
function FSE_minTableLog (line 348) | static unsigned FSE_minTableLog(size_t srcSize, unsigned maxSymbolValue)
function FSE_optimalTableLog_internal (line 357) | unsigned FSE_optimalTableLog_internal(unsigned maxTableLog, size_t srcSi...
function FSE_optimalTableLog (line 371) | unsigned FSE_optimalTableLog(unsigned maxTableLog, size_t srcSize, unsig...
function FSE_normalizeM2 (line 379) | static size_t FSE_normalizeM2(short* norm, U32 tableLog, const unsigned*...
function FSE_normalizeCount (line 465) | size_t FSE_normalizeCount (short* normalizedCounter, unsigned tableLog,
function FSE_buildCTable_rle (line 528) | size_t FSE_buildCTable_rle (FSE_CTable* ct, BYTE symbolValue)
function FSE_compress_usingCTable_generic (line 551) | static size_t FSE_compress_usingCTable_generic (void* dst, size_t dstSize,
function FSE_compress_usingCTable (line 610) | size_t FSE_compress_usingCTable (void* dst, size_t dstSize,
function FSE_compressBound (line 623) | size_t FSE_compressBound(size_t size) { return FSE_COMPRESSBOUND(size); }
FILE: lib/compress/hist.c
function HIST_isError (line 30) | unsigned HIST_isError(size_t code) { return ERR_isError(code); }
function HIST_add (line 35) | void HIST_add(unsigned* count, const void* src, size_t srcSize)
function HIST_count_simple (line 45) | unsigned HIST_count_simple(unsigned* count, unsigned* maxSymbolValuePtr,
type HIST_checkInput_e (line 72) | typedef enum { trustInput, checkMaxSymbolValue } HIST_checkInput_e;
function FORCE_INLINE_TEMPLATE (line 75) | FORCE_INLINE_TEMPLATE size_t min_size(size_t a, size_t b) { return a < b...
function svuint16_t (line 77) | static
function HIST_count_sve2 (line 177) | static size_t HIST_count_sve2(unsigned* count, unsigned* maxSymbolValuePtr,
function UNUSED_ATTR (line 320) | static UNUSED_ATTR
function HIST_countFast_wksp (line 394) | size_t HIST_countFast_wksp(unsigned* count, unsigned* maxSymbolValuePtr,
function HIST_count_wksp (line 414) | size_t HIST_count_wksp(unsigned* count, unsigned* maxSymbolValuePtr,
function HIST_countFast (line 433) | size_t HIST_countFast(unsigned* count, unsigned* maxSymbolValuePtr,
function HIST_count (line 440) | size_t HIST_count(unsigned* count, unsigned* maxSymbolValuePtr,
FILE: lib/compress/huf_compress.c
type nodeElt (line 47) | typedef struct nodeElt_s {
function showU32 (line 61) | static size_t showU32(const U32* arr, size_t size)
function showCTableBits (line 73) | static size_t showCTableBits(const HUF_CElt* ctable, size_t size)
function showHNodeSymbols (line 84) | static size_t showHNodeSymbols(const nodeElt* hnode, size_t size)
function showHNodeBits (line 94) | static size_t showHNodeBits(const nodeElt* hnode, size_t size)
type HUF_CompressWeightsWksp (line 139) | typedef struct {
function HUF_compressWeights (line 146) | static size_t
function HUF_getNbBits (line 188) | static size_t HUF_getNbBits(HUF_CElt elt)
function HUF_getNbBitsFast (line 193) | static size_t HUF_getNbBitsFast(HUF_CElt elt)
function HUF_getValue (line 198) | static size_t HUF_getValue(HUF_CElt elt)
function HUF_getValueFast (line 203) | static size_t HUF_getValueFast(HUF_CElt elt)
function HUF_setNbBits (line 208) | static void HUF_setNbBits(HUF_CElt* elt, size_t nbBits)
function HUF_setValue (line 214) | static void HUF_setValue(HUF_CElt* elt, size_t value)
function HUF_CTableHeader (line 223) | HUF_CTableHeader HUF_readCTableHeader(HUF_CElt const* ctable)
function HUF_writeCTableHeader (line 230) | static void HUF_writeCTableHeader(HUF_CElt* ctable, U32 tableLog, U32 ma...
type HUF_WriteCTableWksp (line 242) | typedef struct {
function HUF_writeCTable_wksp (line 248) | size_t HUF_writeCTable_wksp(void* dst, size_t maxDstSize,
function HUF_readCTable (line 292) | size_t HUF_readCTable (HUF_CElt* CTable, unsigned* maxSymbolValuePtr, co...
function U32 (line 345) | U32 HUF_getNbBitsFromCTable(HUF_CElt const* CTable, U32 symbolValue)
function U32 (line 376) | static U32 HUF_setMaxHeight(nodeElt* huffNode, U32 lastNonNull, U32 targ...
type rankPos (line 501) | typedef struct {
type nodeElt (line 506) | typedef nodeElt huffNodeTable[2 * (HUF_SYMBOLVALUE_MAX + 1)];
type HUF_buildCTable_wksp_tables (line 511) | typedef struct {
function U32 (line 531) | static U32 HUF_getIndex(U32 const count) {
function HUF_swapNodes (line 538) | static void HUF_swapNodes(nodeElt* a, nodeElt* b) {
function MEM_STATIC (line 545) | MEM_STATIC int HUF_isSorted(nodeElt huffNode[], U32 const maxSymbolValue...
function HINT_INLINE (line 556) | HINT_INLINE void HUF_insertionSort(nodeElt huffNode[], int const low, in...
function HUF_quickSortPartition (line 572) | static int HUF_quickSortPartition(nodeElt arr[], int const low, int cons...
function HUF_simpleQuickSort (line 592) | static void HUF_simpleQuickSort(nodeElt arr[], int low, int high) {
function HUF_sort (line 621) | static void HUF_sort(nodeElt huffNode[], const unsigned count[], U32 con...
function HUF_buildTree (line 682) | static int HUF_buildTree(nodeElt* huffNode, U32 maxSymbolValue)
function HUF_buildCTableFromTree (line 731) | static void HUF_buildCTableFromTree(HUF_CElt* CTable, nodeElt const* huf...
function HUF_buildCTable_wksp (line 756) | size_t
function HUF_estimateCompressedSize (line 794) | size_t HUF_estimateCompressedSize(const HUF_CElt* CTable, const unsigned...
function HUF_validateCTable (line 805) | int HUF_validateCTable(const HUF_CElt* CTable, const unsigned* count, un...
function HUF_compressBound (line 822) | size_t HUF_compressBound(size_t size) { return HUF_COMPRESSBOUND(size); }
type HUF_CStream_t (line 844) | typedef struct {
function HUF_initCStream (line 857) | static size_t HUF_initCStream(HUF_CStream_t* bitC,
function FORCE_INLINE_TEMPLATE (line 878) | FORCE_INLINE_TEMPLATE void HUF_addBits(HUF_CStream_t* bitC, HUF_CElt elt...
function FORCE_INLINE_TEMPLATE (line 912) | FORCE_INLINE_TEMPLATE void HUF_zeroIndex1(HUF_CStream_t* bitC)
function FORCE_INLINE_TEMPLATE (line 922) | FORCE_INLINE_TEMPLATE void HUF_mergeIndex1(HUF_CStream_t* bitC)
function FORCE_INLINE_TEMPLATE (line 938) | FORCE_INLINE_TEMPLATE void HUF_flushBits(HUF_CStream_t* bitC, int kFast)
function HUF_CElt (line 963) | static HUF_CElt HUF_endMark(void)
function HUF_closeCStream (line 974) | static size_t HUF_closeCStream(HUF_CStream_t* bitC)
function FORCE_INLINE_TEMPLATE (line 985) | FORCE_INLINE_TEMPLATE void
function FORCE_INLINE_TEMPLATE (line 991) | FORCE_INLINE_TEMPLATE void
function HUF_tightCompressBound (line 1050) | static size_t HUF_tightCompressBound(size_t srcSize, size_t tableLog)
function FORCE_INLINE_TEMPLATE (line 1056) | FORCE_INLINE_TEMPLATE size_t
function BMI2_TARGET_ATTRIBUTE (line 1123) | static BMI2_TARGET_ATTRIBUTE size_t
function HUF_compress1X_usingCTable_internal_default (line 1131) | static size_t
function HUF_compress1X_usingCTable_internal (line 1139) | static size_t
function HUF_compress1X_usingCTable_internal (line 1152) | static size_t
function HUF_compress1X_usingCTable (line 1163) | size_t HUF_compress1X_usingCTable(void* dst, size_t dstSize, const void*...
function HUF_compress4X_usingCTable_internal (line 1168) | static size_t
function HUF_compress4X_usingCTable (line 1218) | size_t HUF_compress4X_usingCTable(void* dst, size_t dstSize, const void*...
type HUF_nbStreams_e (line 1223) | typedef enum { HUF_singleStream, HUF_fourStreams } HUF_nbStreams_e;
function HUF_compressCTable_internal (line 1225) | static size_t HUF_compressCTable_internal(
type HUF_compress_tables_t (line 1242) | typedef struct {
function HUF_cardinality (line 1255) | unsigned HUF_cardinality(const unsigned* count, unsigned maxSymbolValue)
function HUF_minTableLog (line 1267) | unsigned HUF_minTableLog(unsigned symbolCardinality)
function HUF_optimalTableLog (line 1273) | unsigned HUF_optimalTableLog(
function HUF_compress_internal (line 1333) | static size_t
function HUF_compress1X_repeat (line 1437) | size_t HUF_compress1X_repeat (void* dst, size_t dstSize,
function HUF_compress4X_repeat (line 1454) | size_t HUF_compress4X_repeat (void* dst, size_t dstSize,
FILE: lib/compress/zstd_compress.c
function ZSTD_compressBound (line 78) | size_t ZSTD_compressBound(size_t srcSize) {
type ZSTD_CDict_s (line 88) | struct ZSTD_CDict_s {
function ZSTD_CCtx (line 105) | ZSTD_CCtx* ZSTD_createCCtx(void)
function ZSTD_initCCtx (line 110) | static void ZSTD_initCCtx(ZSTD_CCtx* cctx, ZSTD_customMem memManager)
function ZSTD_CCtx (line 122) | ZSTD_CCtx* ZSTD_createCCtx_advanced(ZSTD_customMem customMem)
function ZSTD_CCtx (line 134) | ZSTD_CCtx* ZSTD_initStaticCCtx(void* workspace, size_t workspaceSize)
function ZSTD_clearAllDicts (line 162) | static void ZSTD_clearAllDicts(ZSTD_CCtx* cctx)
function ZSTD_sizeof_localDict (line 171) | static size_t ZSTD_sizeof_localDict(ZSTD_localDict dict)
function ZSTD_freeCCtxContent (line 178) | static void ZSTD_freeCCtxContent(ZSTD_CCtx* cctx)
function ZSTD_freeCCtx (line 189) | size_t ZSTD_freeCCtx(ZSTD_CCtx* cctx)
function ZSTD_sizeof_mtctx (line 203) | static size_t ZSTD_sizeof_mtctx(const ZSTD_CCtx* cctx)
function ZSTD_sizeof_CCtx (line 214) | size_t ZSTD_sizeof_CCtx(const ZSTD_CCtx* cctx)
function ZSTD_sizeof_CStream (line 224) | size_t ZSTD_sizeof_CStream(const ZSTD_CStream* zcs)
function SeqStore_t (line 230) | const SeqStore_t* ZSTD_getSeqStore(const ZSTD_CCtx* ctx) { return &(ctx-...
function ZSTD_rowMatchFinderSupported (line 233) | static int ZSTD_rowMatchFinderSupported(const ZSTD_strategy strategy) {
function ZSTD_rowMatchFinderUsed (line 240) | static int ZSTD_rowMatchFinderUsed(const ZSTD_strategy strategy, const Z...
function ZSTD_ParamSwitch_e (line 246) | static ZSTD_ParamSwitch_e ZSTD_resolveRowMatchFinderMode(ZSTD_ParamSwitc...
function ZSTD_ParamSwitch_e (line 264) | static ZSTD_ParamSwitch_e ZSTD_resolveBlockSplitterMode(ZSTD_ParamSwitch...
function ZSTD_allocateChainTable (line 271) | static int ZSTD_allocateChainTable(const ZSTD_strategy strategy,
function ZSTD_ParamSwitch_e (line 285) | static ZSTD_ParamSwitch_e ZSTD_resolveEnableLdm(ZSTD_ParamSwitch_e mode,
function ZSTD_resolveExternalSequenceValidation (line 291) | static int ZSTD_resolveExternalSequenceValidation(int mode) {
function ZSTD_resolveMaxBlockSize (line 296) | static size_t ZSTD_resolveMaxBlockSize(size_t maxBlockSize) {
function ZSTD_ParamSwitch_e (line 304) | static ZSTD_ParamSwitch_e ZSTD_resolveExternalRepcodeSearch(ZSTD_ParamSw...
function ZSTD_CDictIndicesAreTagged (line 315) | static int ZSTD_CDictIndicesAreTagged(const ZSTD_compressionParameters* ...
function ZSTD_CCtx_params (line 319) | static ZSTD_CCtx_params ZSTD_makeCCtxParamsFromCParams(
function ZSTD_CCtx_params (line 344) | static ZSTD_CCtx_params* ZSTD_createCCtxParams_advanced(
function ZSTD_CCtx_params (line 357) | ZSTD_CCtx_params* ZSTD_createCCtxParams(void)
function ZSTD_freeCCtxParams (line 362) | size_t ZSTD_freeCCtxParams(ZSTD_CCtx_params* params)
function ZSTD_CCtxParams_reset (line 369) | size_t ZSTD_CCtxParams_reset(ZSTD_CCtx_params* params)
function ZSTD_CCtxParams_init (line 374) | size_t ZSTD_CCtxParams_init(ZSTD_CCtx_params* cctxParams, int compressio...
function ZSTD_CCtxParams_init_internal (line 388) | static void
function ZSTD_CCtxParams_init_advanced (line 411) | size_t ZSTD_CCtxParams_init_advanced(ZSTD_CCtx_params* cctxParams, ZSTD_...
function ZSTD_CCtxParams_setZstdParams (line 423) | static void ZSTD_CCtxParams_setZstdParams(
function ZSTD_bounds (line 435) | ZSTD_bounds ZSTD_cParam_getBounds(ZSTD_cParameter param)
function ZSTD_cParam_clampBounds (line 658) | static size_t ZSTD_cParam_clampBounds(ZSTD_cParameter cParam, int* value)
function ZSTD_isUpdateAuthorized (line 674) | static int ZSTD_isUpdateAuthorized(ZSTD_cParameter param)
function ZSTD_CCtx_setParameter (line 724) | size_t ZSTD_CCtx_setParameter(ZSTD_CCtx* cctx, ZSTD_cParameter param, in...
function ZSTD_CCtxParams_setParameter (line 786) | size_t ZSTD_CCtxParams_setParameter(ZSTD_CCtx_params* CCtxParams,
function ZSTD_CCtx_getParameter (line 1039) | size_t ZSTD_CCtx_getParameter(ZSTD_CCtx const* cctx, ZSTD_cParameter par...
function ZSTD_CCtxParams_getParameter (line 1044) | size_t ZSTD_CCtxParams_getParameter(
function ZSTD_CCtx_setParametersUsingCCtxParams (line 1194) | size_t ZSTD_CCtx_setParametersUsingCCtxParams(
function ZSTD_CCtx_setCParams (line 1208) | size_t ZSTD_CCtx_setCParams(ZSTD_CCtx* cctx, ZSTD_compressionParameters ...
function ZSTD_CCtx_setFParams (line 1224) | size_t ZSTD_CCtx_setFParams(ZSTD_CCtx* cctx, ZSTD_frameParameters fparams)
function ZSTD_CCtx_setParams (line 1234) | size_t ZSTD_CCtx_setParams(ZSTD_CCtx* cctx, ZSTD_parameters params)
function ZSTD_CCtx_setPledgedSrcSize (line 1246) | size_t ZSTD_CCtx_setPledgedSrcSize(ZSTD_CCtx* cctx, unsigned long long p...
function ZSTD_initLocalDict (line 1268) | static size_t ZSTD_initLocalDict(ZSTD_CCtx* cctx)
function ZSTD_CCtx_loadDictionary_advanced (line 1299) | size_t ZSTD_CCtx_loadDictionary_advanced(
function ZSTD_CCtx_loadDictionary_byReference (line 1330) | size_t ZSTD_CCtx_loadDictionary_byReference(
function ZSTD_CCtx_loadDictionary (line 1337) | size_t ZSTD_CCtx_loadDictionary(ZSTD_CCtx* cctx, const void* dict, size_...
function ZSTD_CCtx_refCDict (line 1344) | size_t ZSTD_CCtx_refCDict(ZSTD_CCtx* cctx, const ZSTD_CDict* cdict)
function ZSTD_CCtx_refThreadPool (line 1354) | size_t ZSTD_CCtx_refThreadPool(ZSTD_CCtx* cctx, ZSTD_threadPool* pool)
function ZSTD_CCtx_refPrefix (line 1362) | size_t ZSTD_CCtx_refPrefix(ZSTD_CCtx* cctx, const void* prefix, size_t p...
function ZSTD_CCtx_refPrefix_advanced (line 1367) | size_t ZSTD_CCtx_refPrefix_advanced(
function ZSTD_CCtx_reset (line 1383) | size_t ZSTD_CCtx_reset(ZSTD_CCtx* cctx, ZSTD_ResetDirective reset)
function ZSTD_checkCParams (line 1404) | size_t ZSTD_checkCParams(ZSTD_compressionParameters cParams)
function ZSTD_compressionParameters (line 1419) | static ZSTD_compressionParameters
function U32 (line 1441) | U32 ZSTD_cycleLog(U32 hashLog, ZSTD_strategy strat)
function U32 (line 1455) | static U32 ZSTD_dictAndWindowLog(U32 windowLog, U64 srcSize, U64 dictSize)
function ZSTD_compressionParameters (line 1488) | static ZSTD_compressionParameters
function ZSTD_compressionParameters (line 1627) | ZSTD_compressionParameters
function ZSTD_overrideCParams (line 1640) | static void ZSTD_overrideCParams(
function ZSTD_compressionParameters (line 1653) | ZSTD_compressionParameters ZSTD_getCParamsFromCCtxParams(
function ZSTD_sizeof_matchState (line 1669) | static size_t
function ZSTD_maxNbSeq (line 1713) | static size_t ZSTD_maxNbSeq(size_t blockSize, unsigned minMatch, int use...
function ZSTD_estimateCCtxSize_usingCCtxParams_internal (line 1718) | static size_t ZSTD_estimateCCtxSize_usingCCtxParams_internal(
function ZSTD_estimateCCtxSize_usingCCtxParams (line 1770) | size_t ZSTD_estimateCCtxSize_usingCCtxParams(const ZSTD_CCtx_params* par...
function ZSTD_estimateCCtxSize_usingCParams (line 1789) | size_t ZSTD_estimateCCtxSize_usingCParams(ZSTD_compressionParameters cPa...
function ZSTD_estimateCCtxSize_internal (line 1806) | static size_t ZSTD_estimateCCtxSize_internal(int compressionLevel)
function ZSTD_estimateCCtxSize (line 1819) | size_t ZSTD_estimateCCtxSize(int compressionLevel)
function ZSTD_estimateCStreamSize_usingCCtxParams (line 1831) | size_t ZSTD_estimateCStreamSize_usingCCtxParams(const ZSTD_CCtx_params* ...
function ZSTD_estimateCStreamSize_usingCParams (line 1855) | size_t ZSTD_estimateCStreamSize_usingCParams(ZSTD_compressionParameters ...
function ZSTD_estimateCStreamSize_internal (line 1872) | static size_t ZSTD_estimateCStreamSize_internal(int compressionLevel)
function ZSTD_estimateCStreamSize (line 1878) | size_t ZSTD_estimateCStreamSize(int compressionLevel)
function ZSTD_frameProgression (line 1893) | ZSTD_frameProgression ZSTD_getFrameProgression(const ZSTD_CCtx* cctx)
function ZSTD_toFlushNow (line 1917) | size_t ZSTD_toFlushNow(ZSTD_CCtx* cctx)
function ZSTD_assertEqualCParams (line 1928) | static void ZSTD_assertEqualCParams(ZSTD_compressionParameters cParams1,
function ZSTD_reset_compressedBlockState (line 1942) | void ZSTD_reset_compressedBlockState(ZSTD_compressedBlockState_t* bs)
function ZSTD_invalidateMatchState (line 1957) | static void ZSTD_invalidateMatchState(ZSTD_MatchState_t* ms)
type ZSTD_compResetPolicy_e (line 1974) | typedef enum {
type ZSTD_indexResetPolicy_e (line 1984) | typedef enum {
type ZSTD_resetTarget_e (line 1989) | typedef enum {
function U64 (line 1995) | static U64 ZSTD_bitmix(U64 val, U64 len) {
function ZSTD_advanceHashSalt (line 2004) | static void ZSTD_advanceHashSalt(ZSTD_MatchState_t* ms) {
function ZSTD_reset_matchState (line 2008) | static size_t
function ZSTD_indexTooCloseToMax (line 2103) | static int ZSTD_indexTooCloseToMax(ZSTD_window_t w)
function ZSTD_dictTooBig (line 2113) | static int ZSTD_dictTooBig(size_t const loadedDictSize)
function ZSTD_resetCCtx_internal (line 2124) | static size_t ZSTD_resetCCtx_internal(ZSTD_CCtx* zc,
function ZSTD_invalidateRepCodes (line 2310) | void ZSTD_invalidateRepCodes(ZSTD_CCtx* cctx) {
function ZSTD_shouldAttachDict (line 2333) | static int ZSTD_shouldAttachDict(const ZSTD_CDict* cdict,
function ZSTD_resetCCtx_byAttachingCDict (line 2348) | static size_t
function ZSTD_copyCDictTableIntoCCtx (line 2410) | static void ZSTD_copyCDictTableIntoCCtx(U32* dst, U32 const* src, size_t...
function ZSTD_resetCCtx_byCopyingCDict (line 2426) | static size_t ZSTD_resetCCtx_byCopyingCDict(ZSTD_CCtx* cctx,
function ZSTD_resetCCtx_usingCDict (line 2511) | static size_t ZSTD_resetCCtx_usingCDict(ZSTD_CCtx* cctx,
function ZSTD_copyCCtx_internal (line 2537) | static size_t ZSTD_copyCCtx_internal(ZSTD_CCtx* dstCCtx,
function ZSTD_copyCCtx (line 2615) | size_t ZSTD_copyCCtx(ZSTD_CCtx* dstCCtx, const ZSTD_CCtx* srcCCtx, unsig...
function FORCE_INLINE_TEMPLATE (line 2636) | FORCE_INLINE_TEMPLATE void
function ZSTD_reduceTable (line 2678) | static void ZSTD_reduceTable(U32* const table, U32 const size, U32 const...
function ZSTD_reduceTable_btlazy2 (line 2683) | static void ZSTD_reduceTable_btlazy2(U32* const table, U32 const size, U...
function ZSTD_reduceIndex (line 2690) | static void ZSTD_reduceIndex (ZSTD_MatchState_t* ms, ZSTD_CCtx_params co...
function ZSTD_seqToCodes (line 2717) | int ZSTD_seqToCodes(const SeqStore_t* seqStorePtr)
function ZSTD_useTargetCBlockSize (line 2749) | static int ZSTD_useTargetCBlockSize(const ZSTD_CCtx_params* cctxParams)
function ZSTD_blockSplitterEnabled (line 2760) | static int ZSTD_blockSplitterEnabled(ZSTD_CCtx_params* cctxParams)
type ZSTD_symbolEncodingTypeStats_t (line 2770) | typedef struct {
function ZSTD_symbolEncodingTypeStats_t (line 2786) | static ZSTD_symbolEncodingTypeStats_t
function MEM_STATIC (line 2911) | MEM_STATIC size_t
function ZSTD_entropyCompressSeqStore_wExtLitBuffer (line 3029) | static size_t
function ZSTD_entropyCompressSeqStore (line 3068) | static size_t
function ZSTD_BlockCompressor_f (line 3093) | ZSTD_BlockCompressor_f ZSTD_selectBlockCompressor(ZSTD_strategy strat, Z...
function ZSTD_storeLastLiterals (line 3178) | static void ZSTD_storeLastLiterals(SeqStore_t* seqStorePtr,
function ZSTD_resetSeqStore (line 3185) | void ZSTD_resetSeqStore(SeqStore_t* ssPtr)
function ZSTD_postProcessSequenceProducerResult (line 3198) | static size_t ZSTD_postProcessSequenceProducerResult(
function ZSTD_fastSequenceLengthSum (line 3247) | static size_t ZSTD_fastSequenceLengthSum(ZSTD_Sequence const* seqBuf, si...
function ZSTD_validateSeqStore (line 3261) | static void ZSTD_validateSeqStore(const SeqStore_t* seqStore, const ZSTD...
type ZSTD_BuildSeqStore_e (line 3286) | typedef enum { ZSTDbss_compress, ZSTDbss_noCompress } ZSTD_BuildSeqStore_e;
function ZSTD_buildSeqStore (line 3288) | static size_t ZSTD_buildSeqStore(ZSTD_CCtx* zc, const void* src, size_t ...
function ZSTD_copyBlockSequences (line 3453) | static size_t ZSTD_copyBlockSequences(SeqCollector* seqCollector, const ...
function ZSTD_sequenceBound (line 3538) | size_t ZSTD_sequenceBound(size_t srcSize) {
function ZSTD_generateSequences (line 3544) | size_t ZSTD_generateSequences(ZSTD_CCtx* zc, ZSTD_Sequence* outSeqs,
function ZSTD_mergeBlockDelimiters (line 3579) | size_t ZSTD_mergeBlockDelimiters(ZSTD_Sequence* sequences, size_t seqsSi...
function ZSTD_isRLE (line 3596) | static int ZSTD_isRLE(const BYTE* src, size_t length) {
function ZSTD_maybeRLE (line 3622) | static int ZSTD_maybeRLE(SeqStore_t const* seqStore)
function ZSTD_blockState_confirmRepcodesAndEntropyTables (line 3630) | static void
function writeBlockHeader (line 3639) | static void
function ZSTD_buildBlockEntropyStats_literals (line 3656) | static size_t
function ZSTD_symbolEncodingTypeStats_t (line 3767) | static ZSTD_symbolEncodingTypeStats_t
function ZSTD_buildBlockEntropyStats_sequences (line 3782) | static size_t
function ZSTD_buildBlockEntropyStats (line 3822) | size_t ZSTD_buildBlockEntropyStats(
function ZSTD_estimateBlockSize_literal (line 3853) | static size_t
function ZSTD_estimateBlockSize_symbolType (line 3880) | static size_t
function ZSTD_estimateBlockSize_sequences (line 3918) | static size_t
function ZSTD_estimateBlockSize (line 3947) | static size_t
function ZSTD_buildEntropyStatisticsAndEstimateSubBlockSize (line 3971) | static size_t
function ZSTD_countSeqStoreLiteralsBytes (line 3993) | static size_t ZSTD_countSeqStoreLiteralsBytes(const SeqStore_t* const se...
function ZSTD_countSeqStoreMatchBytes (line 4008) | static size_t ZSTD_countSeqStoreMatchBytes(const SeqStore_t* const seqSt...
function ZSTD_deriveSeqStoreChunk (line 4025) | static void ZSTD_deriveSeqStoreChunk(SeqStore_t* resultSeqStore,
function U32 (line 4061) | static U32
function ZSTD_seqStore_resolveOffCodes (line 4093) | static void
function ZSTD_compressSeqStore_singleBlock (line 4128) | static size_t
type seqStoreSplits (line 4199) | typedef struct {
function ZSTD_deriveBlockSplitsHelper (line 4220) | static void
function ZSTD_deriveBlockSplits (line 4263) | static size_t ZSTD_deriveBlockSplits(ZSTD_CCtx* zc, U32 partitions[], U3...
function ZSTD_compressBlock_splitBlock_internal (line 4284) | static size_t
function ZSTD_compressBlock_splitBlock (line 4377) | static size_t
function ZSTD_compressBlock_internal (line 4406) | static size_t
function ZSTD_compressBlock_targetCBlockSize_body (line 4474) | static size_t ZSTD_compressBlock_targetCBlockSize_body(ZSTD_CCtx* zc,
function ZSTD_compressBlock_targetCBlockSize (line 4530) | static size_t ZSTD_compressBlock_targetCBlockSize(ZSTD_CCtx* zc,
function ZSTD_overflowCorrectIfNeeded (line 4550) | static void ZSTD_overflowCorrectIfNeeded(ZSTD_MatchState_t* ms,
function ZSTD_optimalBlockSize (line 4576) | static size_t ZSTD_optimalBlockSize(ZSTD_CCtx* cctx, const void* src, si...
function ZSTD_compress_frameChunk (line 4615) | static size_t ZSTD_compress_frameChunk(ZSTD_CCtx* cctx,
function ZSTD_writeFrameHeader (line 4719) | static size_t ZSTD_writeFrameHeader(void* dst, size_t dstCapacity,
function ZSTD_writeSkippableFrame (line 4775) | size_t ZSTD_writeSkippableFrame(void* dst, size_t dstCapacity,
function ZSTD_writeLastEmptyBlock (line 4794) | size_t ZSTD_writeLastEmptyBlock(void* dst, size_t dstCapacity)
function ZSTD_referenceExternalSequences (line 4804) | void ZSTD_referenceExternalSequences(ZSTD_CCtx* cctx, rawSeq* seq, size_...
function ZSTD_compressContinue_internal (line 4816) | static size_t ZSTD_compressContinue_internal (ZSTD_CCtx* cctx,
function ZSTD_compressContinue_public (line 4877) | size_t ZSTD_compressContinue_public(ZSTD_CCtx* cctx,
function ZSTD_compressContinue (line 4886) | size_t ZSTD_compressContinue(ZSTD_CCtx* cctx,
function ZSTD_getBlockSize_deprecated (line 4893) | static size_t ZSTD_getBlockSize_deprecated(const ZSTD_CCtx* cctx)
function ZSTD_getBlockSize (line 4901) | size_t ZSTD_getBlockSize(const ZSTD_CCtx* cctx)
function ZSTD_compressBlock_deprecated (line 4907) | size_t ZSTD_compressBlock_deprecated(ZSTD_CCtx* cctx, void* dst, size_t ...
function ZSTD_compressBlock (line 4917) | size_t ZSTD_compressBlock(ZSTD_CCtx* cctx, void* dst, size_t dstCapacity...
function ZSTD_loadDictionaryContent (line 4925) | static size_t
function FSE_repeat (line 5071) | static FSE_repeat ZSTD_dictNCountRepeat(short* normalizedCounter, unsign...
function ZSTD_loadCEntropy (line 5085) | size_t ZSTD_loadCEntropy(ZSTD_compressedBlockState_t* bs, void* workspace,
function ZSTD_loadZstdDictionary (line 5185) | static size_t ZSTD_loadZstdDictionary(ZSTD_compressedBlockState_t* bs,
function ZSTD_compress_insertDictionary (line 5217) | static size_t
function ZSTD_compressBegin_internal (line 5262) | static size_t ZSTD_compressBegin_internal(ZSTD_CCtx* cctx,
function ZSTD_compressBegin_advanced_internal (line 5309) | size_t ZSTD_compressBegin_advanced_internal(ZSTD_CCtx* cctx,
function ZSTD_compressBegin_advanced (line 5329) | size_t ZSTD_compressBegin_advanced(ZSTD_CCtx* cctx,
function ZSTD_compressBegin_usingDict_deprecated (line 5341) | static size_t
function ZSTD_compressBegin_usingDict (line 5353) | size_t
function ZSTD_compressBegin (line 5359) | size_t ZSTD_compressBegin(ZSTD_CCtx* cctx, int compressionLevel)
function ZSTD_writeEpilogue (line 5368) | static size_t ZSTD_writeEpilogue(ZSTD_CCtx* cctx, void* dst, size_t dstC...
function ZSTD_CCtx_trace (line 5407) | void ZSTD_CCtx_trace(ZSTD_CCtx* cctx, size_t extraCSize)
function ZSTD_compressEnd_public (line 5431) | size_t ZSTD_compressEnd_public(ZSTD_CCtx* cctx,
function ZSTD_compressEnd (line 5458) | size_t ZSTD_compressEnd(ZSTD_CCtx* cctx,
function ZSTD_compress_advanced (line 5465) | size_t ZSTD_compress_advanced (ZSTD_CCtx* cctx,
function ZSTD_compress_advanced_internal (line 5482) | size_t ZSTD_compress_advanced_internal(
function ZSTD_compress_usingDict (line 5496) | size_t ZSTD_compress_usingDict(ZSTD_CCtx* cctx,
function ZSTD_compressCCtx (line 5511) | size_t ZSTD_compressCCtx(ZSTD_CCtx* cctx,
function ZSTD_compress (line 5521) | size_t ZSTD_compress(void* dst, size_t dstCapacity,
function ZSTD_estimateCDictSize_advanced (line 5545) | size_t ZSTD_estimateCDictSize_advanced(
function ZSTD_estimateCDictSize (line 5560) | size_t ZSTD_estimateCDictSize(size_t dictSize, int compressionLevel)
function ZSTD_sizeof_CDict (line 5566) | size_t ZSTD_sizeof_CDict(const ZSTD_CDict* cdict)
function ZSTD_initCDict_internal (line 5575) | static size_t ZSTD_initCDict_internal(
function ZSTD_CDict (line 5628) | static ZSTD_CDict*
function ZSTD_CDict (line 5666) | ZSTD_CDict* ZSTD_createCDict_advanced(const void* dictBuffer, size_t dic...
function ZSTD_CDict (line 5684) | ZSTD_CDict* ZSTD_createCDict_advanced2(
function ZSTD_CDict (line 5734) | ZSTD_CDict* ZSTD_createCDict(const void* dict, size_t dictSize, int comp...
function ZSTD_CDict (line 5745) | ZSTD_CDict* ZSTD_createCDict_byReference(const void* dict, size_t dictSi...
function ZSTD_freeCDict (line 5756) | size_t ZSTD_freeCDict(ZSTD_CDict* cdict)
function ZSTD_CDict (line 5782) | const ZSTD_CDict* ZSTD_initStaticCDict(
function ZSTD_compressionParameters (line 5828) | ZSTD_compressionParameters ZSTD_getCParamsFromCDict(const ZSTD_CDict* cd...
function ZSTD_getDictID_fromCDict (line 5838) | unsigned ZSTD_getDictID_fromCDict(const ZSTD_CDict* cdict)
function ZSTD_compressBegin_usingCDict_internal (line 5847) | static size_t ZSTD_compressBegin_usingCDict_internal(
function ZSTD_compressBegin_usingCDict_advanced (line 5888) | size_t ZSTD_compressBegin_usingCDict_advanced(
function ZSTD_compressBegin_usingCDict_deprecated (line 5897) | size_t ZSTD_compressBegin_usingCDict_deprecated(ZSTD_CCtx* cctx, const Z...
function ZSTD_compressBegin_usingCDict (line 5903) | size_t ZSTD_compressBegin_usingCDict(ZSTD_CCtx* cctx, const ZSTD_CDict* ...
function ZSTD_compress_usingCDict_internal (line 5911) | static size_t ZSTD_compress_usingCDict_internal(ZSTD_CCtx* cctx,
function ZSTD_compress_usingCDict_advanced (line 5923) | size_t ZSTD_compress_usingCDict_advanced(ZSTD_CCtx* cctx,
function ZSTD_compress_usingCDict (line 5936) | size_t ZSTD_compress_usingCDict(ZSTD_CCtx* cctx,
function ZSTD_CStream (line 5951) | ZSTD_CStream* ZSTD_createCStream(void)
function ZSTD_CStream (line 5957) | ZSTD_CStream* ZSTD_initStaticCStream(void *workspace, size_t workspaceSize)
function ZSTD_CStream (line 5962) | ZSTD_CStream* ZSTD_createCStream_advanced(ZSTD_customMem customMem)
function ZSTD_freeCStream (line 5967) | size_t ZSTD_freeCStream(ZSTD_CStream* zcs)
function ZSTD_CStreamInSize (line 5976) | size_t ZSTD_CStreamInSize(void) { return ZSTD_BLOCKSIZE_MAX; }
function ZSTD_CStreamOutSize (line 5978) | size_t ZSTD_CStreamOutSize(void)
function ZSTD_CParamMode_e (line 5983) | static ZSTD_CParamMode_e ZSTD_getCParamMode(ZSTD_CDict const* cdict, ZST...
function ZSTD_resetCStream (line 5993) | size_t ZSTD_resetCStream(ZSTD_CStream* zcs, unsigned long long pss)
function ZSTD_initCStream_internal (line 6010) | size_t ZSTD_initCStream_internal(ZSTD_CStream* zcs,
function ZSTD_initCStream_usingCDict_advanced (line 6032) | size_t ZSTD_initCStream_usingCDict_advanced(ZSTD_CStream* zcs,
function ZSTD_initCStream_usingCDict (line 6046) | size_t ZSTD_initCStream_usingCDict(ZSTD_CStream* zcs, const ZSTD_CDict* ...
function ZSTD_initCStream_advanced (line 6059) | size_t ZSTD_initCStream_advanced(ZSTD_CStream* zcs,
function ZSTD_initCStream_usingDict (line 6077) | size_t ZSTD_initCStream_usingDict(ZSTD_CStream* zcs, const void* dict, s...
function ZSTD_initCStream_srcSize (line 6086) | size_t ZSTD_initCStream_srcSize(ZSTD_CStream* zcs, int compressionLevel,...
function ZSTD_initCStream (line 6101) | size_t ZSTD_initCStream(ZSTD_CStream* zcs, int compressionLevel)
function ZSTD_nextInputSizeHint (line 6112) | static size_t ZSTD_nextInputSizeHint(const ZSTD_CCtx* cctx)
function ZSTD_compressStream_generic (line 6127) | static size_t ZSTD_compressStream_generic(ZSTD_CStream* zcs,
function ZSTD_nextInputSizeHint_MTorST (line 6313) | static size_t ZSTD_nextInputSizeHint_MTorST(const ZSTD_CCtx* cctx)
function ZSTD_compressStream (line 6325) | size_t ZSTD_compressStream(ZSTD_CStream* zcs, ZSTD_outBuffer* output, ZS...
function ZSTD_setBufferExpectations (line 6334) | static void
function ZSTD_checkBufferStability (line 6349) | static size_t ZSTD_checkBufferStability(ZSTD_CCtx const* cctx,
function ZSTD_CCtx_init_compressStream2 (line 6373) | static size_t ZSTD_CCtx_init_compressStream2(ZSTD_CCtx* cctx,
function ZSTD_compressStream2 (line 6471) | size_t ZSTD_compressStream2( ZSTD_CCtx* cctx,
function ZSTD_compressStream2_simpleArgs (line 6570) | size_t ZSTD_compressStream2_simpleArgs (
function ZSTD_compress2 (line 6592) | size_t ZSTD_compress2(ZSTD_CCtx* cctx,
function ZSTD_validateSequence (line 6627) | static size_t
function U32 (line 6646) | static U32 ZSTD_finalizeOffBase(U32 rawOffset, const U32 rep[ZSTD_REP_NU...
function ZSTD_transferSequences_wBlockDelim (line 6668) | static size_t
function ZSTD_transferSequences_noDelim (line 6768) | static size_t
function ZSTD_SequenceCopier_f (line 6905) | static ZSTD_SequenceCopier_f ZSTD_selectSequenceCopier(ZSTD_SequenceForm...
function blockSize_explicitDelimiter (line 6919) | static size_t
function determine_blockSize (line 6942) | static size_t determine_blockSize(ZSTD_SequenceFormat_e mode,
function ZSTD_compressSequences_internal (line 6968) | static size_t
function ZSTD_compressSequences (line 7087) | size_t ZSTD_compressSequences(ZSTD_CCtx* cctx,
function convertSequences_noRepcodes (line 7157) | size_t convertSequences_noRepcodes(
function convertSequences_noRepcodes (line 7317) | size_t convertSequences_noRepcodes(SeqDef* dstSeqs, const ZSTD_Sequence*...
function FORCE_INLINE_TEMPLATE (line 7412) | FORCE_INLINE_TEMPLATE int cmpgtz_any_s8(svbool_t g, svint8_t a)
function convertSequences_noRepcodes (line 7418) | size_t convertSequences_noRepcodes(
function convertSequences_noRepcodes (line 7674) | size_t convertSequences_noRepcodes(
function ZSTD_convertBlockSequences (line 7707) | size_t ZSTD_convertBlockSequences(ZSTD_CCtx* cctx,
function BlockSummary (line 7785) | BlockSummary ZSTD_get1BlockSummary(const ZSTD_Sequence* seqs, size_t nbS...
function BlockSummary (line 7837) | BlockSummary ZSTD_get1BlockSummary(const ZSTD_Sequence* seqs, size_t nbS...
function FORCE_INLINE_TEMPLATE (line 7910) | FORCE_INLINE_TEMPLATE int matchLengthHalfIsZero(U64 litMatchLength)
function BlockSummary (line 7919) | BlockSummary ZSTD_get1BlockSummary(const ZSTD_Sequence* seqs, size_t nbS...
function ZSTD_compressSequencesAndLiterals_internal (line 8004) | static size_t
function ZSTD_compressSequencesAndLiterals (line 8111) | size_t
function ZSTD_inBuffer (line 8165) | static ZSTD_inBuffer inBuffer_forEndFlush(const ZSTD_CStream* zcs)
function ZSTD_flushStream (line 8174) | size_t ZSTD_flushStream(ZSTD_CStream* zcs, ZSTD_outBuffer* output)
function ZSTD_endStream (line 8181) | size_t ZSTD_endStream(ZSTD_CStream* zcs, ZSTD_outBuffer* output)
function ZSTD_maxCLevel (line 8200) | int ZSTD_maxCLevel(void) { return ZSTD_MAX_CLEVEL; }
function ZSTD_minCLevel (line 8201) | int ZSTD_minCLevel(void) { return (int)-ZSTD_TARGETLENGTH_MAX; }
function ZSTD_defaultCLevel (line 8202) | int ZSTD_defaultCLevel(void) { return ZSTD_CLEVEL_DEFAULT; }
function ZSTD_compressionParameters (line 8204) | static ZSTD_compressionParameters ZSTD_dedicatedDictSearch_getCParams(in...
function ZSTD_dedicatedDictSearch_isSupported (line 8225) | static int ZSTD_dedicatedDictSearch_isSupported(
function ZSTD_dedicatedDictSearch_revertCParams (line 8239) | static void ZSTD_dedicatedDictSearch_revertCParams(
function U64 (line 8261) | static U64 ZSTD_getCParamRowSize(U64 srcSizeHint, size_t dictSize, ZSTD_...
function ZSTD_compressionParameters (line 8286) | static ZSTD_compressionParameters ZSTD_getCParams_internal(int compressi...
function ZSTD_compressionParameters (line 8314) | ZSTD_compressionParameters ZSTD_getCParams(int compressionLevel, unsigne...
function ZSTD_parameters (line 8324) | static ZSTD_parameters
function ZSTD_parameters (line 8340) | ZSTD_parameters ZSTD_getParams(int compressionLevel, unsigned long long ...
function ZSTD_registerSequenceProducer (line 8346) | void ZSTD_registerSequenceProducer(
function ZSTD_CCtxParams_registerSequenceProducer (line 8357) | void ZSTD_CCtxParams_registerSequenceProducer(
FILE: lib/compress/zstd_compress_internal.h
type ZSTD_compressionStage_e (line 46) | typedef enum { ZSTDcs_created=0, ZSTDcs_init, ZSTDcs_ongoing, ZSTDcs_end...
type ZSTD_cStreamStage (line 47) | typedef enum { zcss_init=0, zcss_load, zcss_flush } ZSTD_cStreamStage;
type ZSTD_prefixDict (line 49) | typedef struct ZSTD_prefixDict_s {
type ZSTD_localDict (line 55) | typedef struct {
type ZSTD_hufCTables_t (line 63) | typedef struct {
type ZSTD_fseCTables_t (line 68) | typedef struct {
type ZSTD_entropyCTables_t (line 77) | typedef struct {
type SeqDef (line 85) | typedef struct SeqDef_s {
type ZSTD_longLengthType_e (line 92) | typedef enum {
type SeqStore_t (line 98) | typedef struct {
type ZSTD_SequenceLength (line 117) | typedef struct {
function MEM_STATIC (line 126) | MEM_STATIC ZSTD_SequenceLength ZSTD_getSequenceLength(SeqStore_t const* ...
type ZSTD_hufCTablesMetadata_t (line 154) | typedef struct {
type ZSTD_fseCTablesMetadata_t (line 165) | typedef struct {
type ZSTD_entropyCTablesMetadata_t (line 174) | typedef struct {
type ZSTD_match_t (line 194) | typedef struct {
type rawSeq (line 199) | typedef struct {
type RawSeqStore_t (line 205) | typedef struct {
type ZSTD_optimal_t (line 216) | typedef struct {
type ZSTD_OptPrice_e (line 224) | typedef enum { zop_dynamic=0, zop_predef } ZSTD_OptPrice_e;
type optState_t (line 227) | typedef struct {
type ZSTD_compressedBlockState_t (line 249) | typedef struct {
type ZSTD_window_t (line 254) | typedef struct {
type ZSTD_MatchState_t (line 268) | typedef struct ZSTD_MatchState_t ZSTD_MatchState_t;
type ZSTD_MatchState_t (line 272) | struct ZSTD_MatchState_t {
type ZSTD_blockState_t (line 317) | typedef struct {
type ldmEntry_t (line 323) | typedef struct {
type ldmMatchCandidate_t (line 328) | typedef struct {
type ldmState_t (line 337) | typedef struct {
type ldmParams_t (line 346) | typedef struct {
type SeqCollector (line 355) | typedef struct {
type ZSTD_CCtx_params_s (line 362) | struct ZSTD_CCtx_params_s {
type ZSTD_buffered_policy_e (line 451) | typedef enum {
type ZSTD_blockSplitCtx (line 461) | typedef struct {
type ZSTD_CCtx_s (line 472) | struct ZSTD_CCtx_s {
type ZSTD_dictTableLoadMethod_e (line 548) | typedef enum { ZSTD_dtlm_fast, ZSTD_dtlm_full } ZSTD_dictTableLoadMethod_e;
type ZSTD_tableFillPurpose_e (line 549) | typedef enum { ZSTD_tfp_forCCtx, ZSTD_tfp_forCDict } ZSTD_tableFillPurpo...
type ZSTD_dictMode_e (line 551) | typedef enum {
type ZSTD_CParamMode_e (line 558) | typedef enum {
function MEM_STATIC (line 584) | MEM_STATIC U32 ZSTD_LLcode(U32 litLength)
function MEM_STATIC (line 601) | MEM_STATIC U32 ZSTD_MLcode(U32 mlBase)
function MEM_STATIC (line 618) | MEM_STATIC int ZSTD_cParam_withinBounds(ZSTD_cParameter cParam, int value)
function MEM_STATIC (line 630) | MEM_STATIC const BYTE*
function MEM_STATIC (line 649) | MEM_STATIC size_t
function MEM_STATIC (line 661) | MEM_STATIC size_t
function MEM_STATIC (line 677) | MEM_STATIC size_t ZSTD_minGain(size_t srcSize, ZSTD_strategy strat)
function MEM_STATIC (line 685) | MEM_STATIC int ZSTD_literalsCompressionIsDisabled(const ZSTD_CCtx_params...
function ZSTD_safecopyLiterals (line 705) | static void
function ZSTD_storeSeqOnly (line 734) | void
function ZSTD_storeSeq (line 775) | void
function MEM_STATIC (line 817) | MEM_STATIC void
type Repcodes_t (line 837) | typedef struct repcodes_s {
function MEM_STATIC (line 841) | MEM_STATIC Repcodes_t
function MEM_STATIC (line 854) | MEM_STATIC size_t ZSTD_count(const BYTE* pIn, const BYTE* pMatch, const ...
function MEM_STATIC (line 879) | MEM_STATIC size_t
function U32 (line 899) | static U32 ZSTD_hash3(U32 u, U32 h, U32 s) { assert(h <= 32); return ...
function MEM_STATIC (line 900) | MEM_STATIC size_t ZSTD_hash3Ptr(const void* ptr, U32 h) { return ZSTD_ha...
function MEM_STATIC (line 901) | MEM_STATIC size_t ZSTD_hash3PtrS(const void* ptr, U32 h, U32 s) { return...
function U32 (line 904) | static U32 ZSTD_hash4(U32 u, U32 h, U32 s) { assert(h <= 32); return ...
function ZSTD_hash4Ptr (line 905) | static size_t ZSTD_hash4Ptr(const void* ptr, U32 h) { return ZSTD_hash4(...
function ZSTD_hash4PtrS (line 906) | static size_t ZSTD_hash4PtrS(const void* ptr, U32 h, U32 s) { return ZST...
function ZSTD_hash5 (line 909) | static size_t ZSTD_hash5(U64 u, U32 h, U64 s) { assert(h <= 64); return ...
function ZSTD_hash5Ptr (line 910) | static size_t ZSTD_hash5Ptr(const void* p, U32 h) { return ZSTD_hash5(ME...
function ZSTD_hash5PtrS (line 911) | static size_t ZSTD_hash5PtrS(const void* p, U32 h, U64 s) { return ZSTD_...
function ZSTD_hash6 (line 914) | static size_t ZSTD_hash6(U64 u, U32 h, U64 s) { assert(h <= 64); return ...
function ZSTD_hash6Ptr (line 915) | static size_t ZSTD_hash6Ptr(const void* p, U32 h) { return ZSTD_hash6(ME...
function ZSTD_hash6PtrS (line 916) | static size_t ZSTD_hash6PtrS(const void* p, U32 h, U64 s) { return ZSTD_...
function ZSTD_hash7 (line 919) | static size_t ZSTD_hash7(U64 u, U32 h, U64 s) { assert(h <= 64); return ...
function ZSTD_hash7Ptr (line 920) | static size_t ZSTD_hash7Ptr(const void* p, U32 h) { return ZSTD_hash7(ME...
function ZSTD_hash7PtrS (line 921) | static size_t ZSTD_hash7PtrS(const void* p, U32 h, U64 s) { return ZSTD_...
function ZSTD_hash8 (line 924) | static size_t ZSTD_hash8(U64 u, U32 h, U64 s) { assert(h <= 64); return ...
function ZSTD_hash8Ptr (line 925) | static size_t ZSTD_hash8Ptr(const void* p, U32 h) { return ZSTD_hash8(ME...
function ZSTD_hash8PtrS (line 926) | static size_t ZSTD_hash8PtrS(const void* p, U32 h, U64 s) { return ZSTD_...
function ZSTD_hashPtr (line 930) | size_t ZSTD_hashPtr(const void* p, U32 hBits, U32 mls)
function ZSTD_hashPtrSalted (line 948) | size_t ZSTD_hashPtrSalted(const void* p, U32 hBits, U32 mls, const U64 h...
function U64 (line 968) | static U64 ZSTD_ipow(U64 base, U64 exponent)
function U64 (line 984) | static U64 ZSTD_rollingHash_append(U64 hash, void const* buf, size_t size)
function MEM_STATIC (line 998) | MEM_STATIC U64 ZSTD_rollingHash_compute(void const* buf, size_t size)
function MEM_STATIC (line 1007) | MEM_STATIC U64 ZSTD_rollingHash_primePower(U32 length)
function MEM_STATIC (line 1015) | MEM_STATIC U64 ZSTD_rollingHash_rotate(U64 hash, BYTE toRemove, BYTE toA...
function MEM_STATIC (line 1041) | MEM_STATIC void ZSTD_window_clear(ZSTD_window_t* window)
function MEM_STATIC (line 1050) | MEM_STATIC U32 ZSTD_window_isEmpty(ZSTD_window_t const window)
function MEM_STATIC (line 1061) | MEM_STATIC U32 ZSTD_window_hasExtDict(ZSTD_window_t const window)
function MEM_STATIC (line 1071) | MEM_STATIC ZSTD_dictMode_e ZSTD_matchState_dictMode(const ZSTD_MatchStat...
function MEM_STATIC (line 1097) | MEM_STATIC U32 ZSTD_window_canOverflowCorrect(ZSTD_window_t const window,
function MEM_STATIC (line 1132) | MEM_STATIC U32 ZSTD_window_needOverflowCorrection(ZSTD_window_t const wi...
function U32 (line 1159) | U32 ZSTD_window_correctOverflow(ZSTD_window_t* window, U32 cycleLog,
function MEM_STATIC (line 1255) | MEM_STATIC void
function MEM_STATIC (line 1300) | MEM_STATIC void
function MEM_STATIC (line 1334) | MEM_STATIC void ZSTD_window_init(ZSTD_window_t* window) {
function U32 (line 1354) | U32 ZSTD_window_update(ZSTD_window_t* window,
function MEM_STATIC (line 1395) | MEM_STATIC U32 ZSTD_getLowestMatchIndex(const ZSTD_MatchState_t* ms, U32...
function MEM_STATIC (line 1412) | MEM_STATIC U32 ZSTD_getLowestPrefixIndex(const ZSTD_MatchState_t* ms, U3...
function MEM_STATIC (line 1429) | MEM_STATIC int ZSTD_index_overlap_check(const U32 prefixLowestIndex, con...
function MEM_STATIC (line 1437) | MEM_STATIC double ZSTD_fWeight(U32 rawStat)
function MEM_STATIC (line 1452) | MEM_STATIC void ZSTD_debugTable(const U32* table, U32 max)
function MEM_STATIC (line 1487) | MEM_STATIC void ZSTD_writeTaggedIndex(U32* const hashTable, size_t hashA...
function MEM_STATIC (line 1496) | MEM_STATIC int ZSTD_comparePackedTags(size_t packedTag1, size_t packedTa...
type ZSTD_SequencePosition (line 1517) | typedef struct {
type BlockSummary (line 1528) | typedef struct {
function MEM_STATIC (line 1613) | MEM_STATIC int ZSTD_hasExtSeqProd(const ZSTD_CCtx_params* params) {
FILE: lib/compress/zstd_compress_literals.c
function showHexa (line 22) | static size_t showHexa(const void* src, size_t srcSize)
function ZSTD_noCompressLiterals (line 39) | size_t ZSTD_noCompressLiterals (void* dst, size_t dstCapacity, const voi...
function allBytesIdentical (line 68) | static int allBytesIdentical(const void* src, size_t srcSize)
function ZSTD_compressRleLiteralsBlock (line 81) | size_t ZSTD_compressRleLiteralsBlock (void* dst, size_t dstCapacity, con...
function ZSTD_minLiteralsToCompress (line 114) | static size_t
function ZSTD_compressLiterals (line 129) | size_t ZSTD_compressLiterals (
FILE: lib/compress/zstd_compress_sequences.c
function ZSTD_getFSEMaxSymbolValue (line 46) | static unsigned ZSTD_getFSEMaxSymbolValue(FSE_CTable const* ctable) {
function ZSTD_useLowProbCount (line 57) | static unsigned ZSTD_useLowProbCount(size_t const nbSeq)
function ZSTD_NCountCost (line 70) | static size_t ZSTD_NCountCost(unsigned const* count, unsigned const max,
function ZSTD_entropyCost (line 84) | static size_t ZSTD_entropyCost(unsigned const* count, unsigned const max...
function ZSTD_fseBitCost (line 104) | size_t ZSTD_fseBitCost(
function ZSTD_crossEntropyCost (line 139) | size_t ZSTD_crossEntropyCost(short const* norm, unsigned accuracyLog,
function SymbolEncodingType_e (line 156) | SymbolEncodingType_e
type ZSTD_BuildCTableWksp (line 237) | typedef struct {
function ZSTD_buildCTable (line 242) | size_t
function FORCE_INLINE_TEMPLATE (line 290) | FORCE_INLINE_TEMPLATE size_t
function ZSTD_encodeSequences_default (line 384) | static size_t
function BMI2_TARGET_ATTRIBUTE (line 402) | static BMI2_TARGET_ATTRIBUTE size_t
function ZSTD_encodeSequences (line 419) | size_t ZSTD_encodeSequences(
FILE: lib/compress/zstd_compress_sequences.h
type ZSTD_DefaultPolicy_e (line 18) | typedef enum {
FILE: lib/compress/zstd_compress_superblock.c
function ZSTD_compressSubBlock_literal (line 41) | static size_t
function ZSTD_seqDecompressedSize (line 128) | static size_t
function ZSTD_compressSubBlock_sequences (line 162) | static size_t
function ZSTD_compressSubBlock (line 263) | static size_t ZSTD_compressSubBlock(const ZSTD_entropyCTables_t* entropy,
function ZSTD_estimateSubBlockSize_literal (line 307) | static size_t ZSTD_estimateSubBlockSize_literal(const BYTE* literals, si...
function ZSTD_estimateSubBlockSize_symbolType (line 330) | static size_t ZSTD_estimateSubBlockSize_symbolType(SymbolEncodingType_e ...
function ZSTD_estimateSubBlockSize_sequences (line 365) | static size_t ZSTD_estimateSubBlockSize_sequences(const BYTE* ofCodeTable,
type EstimatedBlockSize (line 393) | typedef struct {
function EstimatedBlockSize (line 397) | static EstimatedBlockSize ZSTD_estimateSubBlockSize(const BYTE* literals...
function ZSTD_needSequenceEntropyTables (line 418) | static int ZSTD_needSequenceEntropyTables(ZSTD_fseCTablesMetadata_t cons...
function countLiterals (line 429) | static size_t countLiterals(SeqStore_t const* seqStore, const SeqDef* sp...
function sizeBlockSequences (line 442) | static size_t sizeBlockSequences(const SeqDef* sp, size_t nbSeqs,
function ZSTD_compressSubBlock_multi (line 479) | static size_t ZSTD_compressSubBlock_multi(const SeqStore_t* seqStorePtr,
function ZSTD_compressSuperBlock (line 665) | size_t ZSTD_compressSuperBlock(ZSTD_CCtx* zc,
FILE: lib/compress/zstd_cwksp.h
type ZSTD_cwksp_alloc_phase_e (line 44) | typedef enum {
type ZSTD_cwksp_static_alloc_e (line 56) | typedef enum {
type ZSTD_cwksp (line 155) | typedef struct {
function MEM_STATIC (line 178) | MEM_STATIC void ZSTD_cwksp_assert_internal_consistency(ZSTD_cwksp* ws) {
function MEM_STATIC (line 206) | MEM_STATIC size_t ZSTD_cwksp_align(size_t size, size_t align) {
function MEM_STATIC (line 224) | MEM_STATIC size_t ZSTD_cwksp_alloc_size(size_t size) {
function MEM_STATIC (line 234) | MEM_STATIC size_t ZSTD_cwksp_aligned_alloc_size(size_t size, size_t alig...
function MEM_STATIC (line 242) | MEM_STATIC size_t ZSTD_cwksp_aligned64_alloc_size(size_t size) {
function MEM_STATIC (line 250) | MEM_STATIC size_t ZSTD_cwksp_slack_space_required(void) {
function MEM_STATIC (line 263) | MEM_STATIC size_t ZSTD_cwksp_bytes_to_align_ptr(void* ptr, const size_t ...
function MEM_STATIC (line 275) | MEM_STATIC void* ZSTD_cwksp_initialAllocStart(ZSTD_cwksp* ws)
function MEM_STATIC (line 290) | MEM_STATIC void*
function MEM_STATIC (line 318) | MEM_STATIC size_t
function MEM_STATIC (line 352) | MEM_STATIC int ZSTD_cwksp_owns_buffer(const ZSTD_cwksp* ws, const void* ...
function MEM_STATIC (line 360) | MEM_STATIC void*
function MEM_STATIC (line 394) | MEM_STATIC BYTE* ZSTD_cwksp_reserve_buffer(ZSTD_cwksp* ws, size_t bytes)
function MEM_STATIC (line 408) | MEM_STATIC void* ZSTD_cwksp_reserve_aligned_init_once(ZSTD_cwksp* ws, si...
function MEM_STATIC (line 432) | MEM_STATIC void* ZSTD_cwksp_reserve_aligned64(ZSTD_cwksp* ws, size_t bytes)
function MEM_STATIC (line 446) | MEM_STATIC void* ZSTD_cwksp_reserve_table(ZSTD_cwksp* ws, size_t bytes)
function MEM_STATIC (line 491) | MEM_STATIC void* ZSTD_cwksp_reserve_object(ZSTD_cwksp* ws, size_t bytes)
function MEM_STATIC (line 533) | MEM_STATIC void* ZSTD_cwksp_reserve_object_aligned(ZSTD_cwksp* ws, size_...
function MEM_STATIC (line 544) | MEM_STATIC void ZSTD_cwksp_mark_tables_dirty(ZSTD_cwksp* ws)
function MEM_STATIC (line 573) | MEM_STATIC void ZSTD_cwksp_mark_tables_clean(ZSTD_cwksp* ws) {
function MEM_STATIC (line 586) | MEM_STATIC void ZSTD_cwksp_clean_tables(ZSTD_cwksp* ws) {
function MEM_STATIC (line 600) | MEM_STATIC void ZSTD_cwksp_clear_tables(ZSTD_cwksp* ws)
function MEM_STATIC (line 623) | MEM_STATIC void ZSTD_cwksp_clear(ZSTD_cwksp* ws) {
function MEM_STATIC (line 660) | MEM_STATIC size_t ZSTD_cwksp_sizeof(const ZSTD_cwksp* ws) {
function MEM_STATIC (line 664) | MEM_STATIC size_t ZSTD_cwksp_used(const ZSTD_cwksp* ws) {
function MEM_STATIC (line 674) | MEM_STATIC void ZSTD_cwksp_init(ZSTD_cwksp* ws, void* start, size_t size...
function MEM_STATIC (line 689) | MEM_STATIC size_t ZSTD_cwksp_create(ZSTD_cwksp* ws, size_t size, ZSTD_cu...
function MEM_STATIC (line 697) | MEM_STATIC void ZSTD_cwksp_free(ZSTD_cwksp* ws, ZSTD_customMem customMem) {
function MEM_STATIC (line 713) | MEM_STATIC void ZSTD_cwksp_move(ZSTD_cwksp* dst, ZSTD_cwksp* src) {
function MEM_STATIC (line 718) | MEM_STATIC int ZSTD_cwksp_reserve_failed(const ZSTD_cwksp* ws) {
function MEM_STATIC (line 730) | MEM_STATIC int ZSTD_cwksp_estimated_space_within_bounds(const ZSTD_cwksp...
function MEM_STATIC (line 738) | MEM_STATIC size_t ZSTD_cwksp_available_space(ZSTD_cwksp* ws) {
function MEM_STATIC (line 742) | MEM_STATIC int ZSTD_cwksp_check_available(ZSTD_cwksp* ws, size_t additio...
function MEM_STATIC (line 746) | MEM_STATIC int ZSTD_cwksp_check_too_large(ZSTD_cwksp* ws, size_t additio...
function MEM_STATIC (line 751) | MEM_STATIC int ZSTD_cwksp_check_wasteful(ZSTD_cwksp* ws, size_t addition...
function MEM_STATIC (line 756) | MEM_STATIC void ZSTD_cwksp_bump_oversized_duration(
FILE: lib/compress/zstd_double_fast.c
function ZSTD_ALLOW_POINTER_OVERFLOW_ATTR (line 16) | static
function ZSTD_ALLOW_POINTER_OVERFLOW_ATTR (line 54) | static
function ZSTD_fillDoubleHashTable (line 90) | void ZSTD_fillDoubleHashTable(ZSTD_MatchState_t* ms,
function ZSTD_compressBlock_doubleFast_noDict_generic (line 105) | size_t ZSTD_compressBlock_doubleFast_noDict_generic(
function ZSTD_compressBlock_doubleFast_dictMatchState_generic (line 328) | size_t ZSTD_compressBlock_doubleFast_dictMatchState_generic(
function ZSTD_compressBlock_doubleFast (line 568) | size_t ZSTD_compressBlock_doubleFast(
function ZSTD_compressBlock_doubleFast_dictMatchState (line 588) | size_t ZSTD_compressBlock_doubleFast_dictMatchState(
function ZSTD_ALLOW_POINTER_OVERFLOW_ATTR (line 608) | static
function ZSTD_compressBlock_doubleFast_extDict (line 759) | size_t ZSTD_compressBlock_doubleFast_extDict(
FILE: lib/compress/zstd_fast.c
function ZSTD_ALLOW_POINTER_OVERFLOW_ATTR (line 14) | static
function ZSTD_ALLOW_POINTER_OVERFLOW_ATTR (line 51) | static
function ZSTD_fillHashTable (line 87) | void ZSTD_fillHashTable(ZSTD_MatchState_t* ms,
function ZSTD_match4Found_cmov (line 102) | static int
function ZSTD_match4Found_branch (line 127) | static int
function ZSTD_compressBlock_fast_noDict_generic (line 192) | size_t ZSTD_compressBlock_fast_noDict_generic(
function ZSTD_compressBlock_fast (line 443) | size_t ZSTD_compressBlock_fast(
function ZSTD_compressBlock_fast_dictMatchState_generic (line 483) | size_t ZSTD_compressBlock_fast_dictMatchState_generic(
function ZSTD_compressBlock_fast_dictMatchState (line 686) | size_t ZSTD_compressBlock_fast_dictMatchState(
function ZSTD_ALLOW_POINTER_OVERFLOW_ATTR (line 707) | static
function ZSTD_compressBlock_fast_extDict (line 967) | size_t ZSTD_compressBlock_fast_extDict(
FILE: lib/compress/zstd_lazy.c
function ZSTD_ALLOW_POINTER_OVERFLOW_ATTR (line 27) | static
function ZSTD_ALLOW_POINTER_OVERFLOW_ATTR (line 72) | static
function ZSTD_ALLOW_POINTER_OVERFLOW_ATTR (line 162) | static
function ZSTD_ALLOW_POINTER_OVERFLOW_ATTR (line 241) | static
function ZSTD_BtFindBestMatch (line 395) | size_t ZSTD_BtFindBestMatch( ZSTD_MatchState_t* ms,
function ZSTD_dedicatedDictSearch_lazy_loadDictionary (line 411) | void ZSTD_dedicatedDictSearch_lazy_loadDictionary(ZSTD_MatchState_t* ms,...
function FORCE_INLINE_TEMPLATE (line 528) | FORCE_INLINE_TEMPLATE
function U32 (line 632) | U32 ZSTD_insertAndFindFirstIndex_internal(
function U32 (line 659) | U32 ZSTD_insertAndFindFirstIndex(ZSTD_MatchState_t* ms, const BYTE* ip) {
function ZSTD_HcFindBestMatch (line 667) | size_t ZSTD_HcFindBestMatch(
type U64 (line 784) | typedef U64 ZSTD_VecMask;
function MEM_STATIC (line 790) | MEM_STATIC U32 ZSTD_VecMask_next(ZSTD_VecMask val) {
function FORCE_INLINE_TEMPLATE (line 798) | FORCE_INLINE_TEMPLATE U32 ZSTD_row_nextIndex(BYTE* const tagRow, U32 con...
function MEM_STATIC (line 808) | MEM_STATIC int ZSTD_isAligned(void const* ptr, size_t align) {
function FORCE_INLINE_TEMPLATE (line 816) | FORCE_INLINE_TEMPLATE void ZSTD_row_prefetch(U32 const* hashTable, BYTE ...
function ZSTD_row_fillHashCache (line 837) | void ZSTD_row_fillHashCache(ZSTD_MatchState_t* ms, const BYTE* base,
function U32 (line 865) | U32 ZSTD_row_nextCachedHash(U32* cache, U32 const* hashTable,
function ZSTD_row_update_internalImpl (line 885) | void ZSTD_row_update_internalImpl(ZSTD_MatchState_t* ms,
function ZSTD_row_update_internal (line 916) | void ZSTD_row_update_internal(ZSTD_MatchState_t* ms, const BYTE* ip,
function ZSTD_row_update (line 949) | void ZSTD_row_update(ZSTD_MatchState_t* const ms, const BYTE* ip) {
function FORCE_INLINE_TEMPLATE (line 962) | FORCE_INLINE_TEMPLATE U32
function FORCE_INLINE_TEMPLATE (line 987) | FORCE_INLINE_TEMPLATE ZSTD_VecMask
function FORCE_INLINE_TEMPLATE (line 1007) | FORCE_INLINE_TEMPLATE ZSTD_VecMask
function FORCE_INLINE_TEMPLATE (line 1054) | FORCE_INLINE_TEMPLATE ZSTD_VecMask
function FORCE_INLINE_TEMPLATE (line 1098) | FORCE_INLINE_TEMPLATE ZSTD_VecMask
function ZSTD_RowFindBestMatch (line 1185) | size_t ZSTD_RowFindBestMatch(
type searchMethod_e (line 1468) | typedef enum { search_hashChain=0, search_binaryTree=1, search_rowHash=2...
function FORCE_INLINE_TEMPLATE (line 1531) | FORCE_INLINE_TEMPLATE size_t ZSTD_searchMax(
function ZSTD_compressBlock_lazy_generic (line 1560) | size_t ZSTD_compressBlock_lazy_generic(
function ZSTD_compressBlock_greedy (line 1828) | size_t ZSTD_compressBlock_greedy(
function ZSTD_compressBlock_greedy_dictMatchState (line 1835) | size_t ZSTD_compressBlock_greedy_dictMatchState(
function ZSTD_compressBlock_greedy_dedicatedDictSearch (line 1842) | size_t ZSTD_compressBlock_greedy_dedicatedDictSearch(
function ZSTD_compressBlock_greedy_row (line 1849) | size_t ZSTD_compressBlock_greedy_row(
function ZSTD_compressBlock_greedy_dictMatchState_row (line 1856) | size_t ZSTD_compressBlock_greedy_dictMatchState_row(
function ZSTD_compressBlock_greedy_dedicatedDictSearch_row (line 1863) | size_t ZSTD_compressBlock_greedy_dedicatedDictSearch_row(
function ZSTD_compressBlock_lazy (line 1872) | size_t ZSTD_compressBlock_lazy(
function ZSTD_compressBlock_lazy_dictMatchState (line 1879) | size_t ZSTD_compressBlock_lazy_dictMatchState(
function ZSTD_compressBlock_lazy_dedicatedDictSearch (line 1886) | size_t ZSTD_compressBlock_lazy_dedicatedDictSearch(
function ZSTD_compressBlock_lazy_row (line 1893) | size_t ZSTD_compressBlock_lazy_row(
function ZSTD_compressBlock_lazy_dictMatchState_row (line 1900) | size_t ZSTD_compressBlock_lazy_dictMatchState_row(
function ZSTD_compressBlock_lazy_dedicatedDictSearch_row (line 1907) | size_t ZSTD_compressBlock_lazy_dedicatedDictSearch_row(
function ZSTD_compressBlock_lazy2 (line 1916) | size_t ZSTD_compressBlock_lazy2(
function ZSTD_compressBlock_lazy2_dictMatchState (line 1923) | size_t ZSTD_compressBlock_lazy2_dictMatchState(
function ZSTD_compressBlock_lazy2_dedicatedDictSearch (line 1930) | size_t ZSTD_compressBlock_lazy2_dedicatedDictSearch(
function ZSTD_compressBlock_lazy2_row (line 1937) | size_t ZSTD_compressBlock_lazy2_row(
function ZSTD_compressBlock_lazy2_dictMatchState_row (line 1944) | size_t ZSTD_compressBlock_lazy2_dictMatchState_row(
function ZSTD_compressBlock_lazy2_dedicatedDictSearch_row (line 1951) | size_t ZSTD_compressBlock_lazy2_dedicatedDictSearch_row(
function ZSTD_compressBlock_btlazy2 (line 1960) | size_t ZSTD_compressBlock_btlazy2(
function ZSTD_compressBlock_btlazy2_dictMatchState (line 1967) | size_t ZSTD_compressBlock_btlazy2_dictMatchState(
function ZSTD_compressBlock_lazy_extDict_generic (line 1981) | size_t ZSTD_compressBlock_lazy_extDict_generic(
function ZSTD_compressBlock_greedy_extDict (line 2185) | size_t ZSTD_compressBlock_greedy_extDict(
function ZSTD_compressBlock_greedy_extDict_row (line 2192) | size_t ZSTD_compressBlock_greedy_extDict_row(
function ZSTD_compressBlock_lazy_extDict (line 2201) | size_t ZSTD_compressBlock_lazy_extDict(
function ZSTD_compressBlock_lazy_extDict_row (line 2209) | size_t ZSTD_compressBlock_lazy_extDict_row(
function ZSTD_compressBlock_lazy2_extDict (line 2219) | size_t ZSTD_compressBlock_lazy2_extDict(
function ZSTD_compressBlock_lazy2_extDict_row (line 2227) | size_t ZSTD_compressBlock_lazy2_extDict_row(
function ZSTD_compressBlock_btlazy2_extDict (line 2236) | size_t ZSTD_compressBlock_btlazy2_extDict(
FILE: lib/compress/zstd_ldm.c
type ldmRollingHashState_t (line 23) | typedef struct {
function ZSTD_ldm_gear_init (line 32) | static void ZSTD_ldm_gear_init(ldmRollingHashState_t* state, ldmParams_t...
function ZSTD_ldm_gear_reset (line 65) | static void ZSTD_ldm_gear_reset(ldmRollingHashState_t* state,
function ZSTD_ldm_gear_feed (line 96) | static size_t ZSTD_ldm_gear_feed(ldmRollingHashState_t* state,
function ZSTD_ldm_adjustParameters (line 135) | void ZSTD_ldm_adjustParameters(ldmParams_t* params,
function ZSTD_ldm_getTableSize (line 173) | size_t ZSTD_ldm_getTableSize(ldmParams_t params)
function ZSTD_ldm_getMaxNbSeq (line 183) | size_t ZSTD_ldm_getMaxNbSeq(ldmParams_t params, size_t maxChunkSize)
function ldmEntry_t (line 190) | static ldmEntry_t* ZSTD_ldm_getBucket(
function ZSTD_ldm_insertEntry (line 198) | static void ZSTD_ldm_insertEntry(ldmState_t* ldmState,
function ZSTD_ldm_countBackwardsMatch (line 214) | static size_t ZSTD_ldm_countBackwardsMatch(
function ZSTD_ldm_countBackwardsMatch_2segments (line 232) | static size_t ZSTD_ldm_countBackwardsMatch_2segments(
function ZSTD_ldm_fillFastTables (line 255) | static size_t ZSTD_ldm_fillFastTables(ZSTD_MatchState_t* ms,
function ZSTD_ldm_fillHashTable (line 289) | void ZSTD_ldm_fillHashTable(
function ZSTD_ldm_limitTableUpdate (line 335) | static void ZSTD_ldm_limitTableUpdate(ZSTD_MatchState_t* ms, const BYTE*...
function ZSTD_ALLOW_POINTER_OVERFLOW_ATTR (line 344) | static
function ZSTD_ldm_reduceTable (line 520) | static void ZSTD_ldm_reduceTable(ldmEntry_t* const table, U32 const size,
function ZSTD_ldm_generateSequences (line 530) | size_t ZSTD_ldm_generateSequences(
function ZSTD_ldm_skipSequences (line 607) | void
function rawSeq (line 644) | static rawSeq maybeSplitSequence(RawSeqStore_t* rawSeqStore,
function ZSTD_ldm_skipRawSeqStoreBytes (line 668) | void ZSTD_ldm_skipRawSeqStoreBytes(RawSeqStore_t* rawSeqStore, size_t nb...
function ZSTD_ldm_blockCompress (line 685) | size_t ZSTD_ldm_blockCompress(RawSeqStore_t* rawSeqStore,
FILE: lib/compress/zstd_opt.c
function MEM_STATIC (line 45) | MEM_STATIC U32 ZSTD_bitWeight(U32 stat)
function MEM_STATIC (line 53) | MEM_STATIC U32 ZSTD_fracWeight(U32 rawStat)
function MEM_STATIC (line 71) | MEM_STATIC double ZSTD_fCost(int price)
function ZSTD_compressedLiterals (line 77) | static int ZSTD_compressedLiterals(optState_t const* const optPtr)
function ZSTD_setBasePrices (line 82) | static void ZSTD_setBasePrices(optState_t* optPtr, int optLevel)
function U32 (line 92) | static U32 sum_u32(const unsigned table[], size_t nbElts)
type base_directive_e (line 102) | typedef enum { base_0possible=0, base_1guaranteed=1 } base_directive_e;
function U32 (line 104) | static U32
function U32 (line 123) | static U32 ZSTD_scaleStats(unsigned* table, U32 lastEltIndex, U32 logTar...
function ZSTD_rescaleFreqs (line 140) | static void
function U32 (line 266) | static U32 ZSTD_rawLiteralsCost(const BYTE* const literals, U32 const li...
function U32 (line 295) | static U32 ZSTD_litLengthPrice(U32 const litLength, const optState_t* co...
function FORCE_INLINE_TEMPLATE (line 323) | FORCE_INLINE_TEMPLATE U32
function ZSTD_updateStats (line 356) | static void ZSTD_updateStats(optState_t* const optPtr,
function MEM_STATIC (line 393) | MEM_STATIC U32 ZSTD_readMINMATCH(const void* memPtr, U32 length)
function ZSTD_ALLOW_POINTER_OVERFLOW_ATTR (line 409) | static
function ZSTD_ALLOW_POINTER_OVERFLOW_ATTR (line 440) | static
function ZSTD_updateTree_internal (line 562) | void ZSTD_updateTree_internal(
function ZSTD_updateTree (line 583) | void ZSTD_updateTree(ZSTD_MatchState_t* ms, const BYTE* ip, const BYTE* ...
function U32 (line 589) | U32
type U32 (line 820) | typedef U32 (*ZSTD_getAllMatchesFn)(
function U32 (line 832) | U32 ZSTD_btGetAllMatches_internal(
function GEN_ZSTD_BT_GET_ALL_MATCHES (line 876) | GEN_ZSTD_BT_GET_ALL_MATCHES(noDict)
function ZSTD_opt_getNextMatchAndUpdateSeqStore (line 940) | static void
function ZSTD_optLdm_maybeAddMatch (line 996) | static void ZSTD_optLdm_maybeAddMatch(ZSTD_match_t* matches, U32* nbMatc...
function ZSTD_optLdm_processMatchCandidate (line 1024) | static void
function listStats (line 1055) | static void
function ZSTD_compressBlock_opt_generic (line 1076) | size_t
function ZSTD_compressBlock_opt0 (line 1438) | static size_t ZSTD_compressBlock_opt0(
function ZSTD_compressBlock_opt2 (line 1447) | static size_t ZSTD_compressBlock_opt2(
function ZSTD_compressBlock_btopt (line 1456) | size_t ZSTD_compressBlock_btopt(
function ZSTD_ALLOW_POINTER_OVERFLOW_ATTR (line 1474) | static
function ZSTD_compressBlock_btultra (line 1501) | size_t ZSTD_compressBlock_btultra(
function ZSTD_compressBlock_btultra2 (line 1509) | size_t ZSTD_compressBlock_btultra2(
function ZSTD_compressBlock_btopt_dictMatchState (line 1539) | size_t ZSTD_compressBlock_btopt_dictMatchState(
function ZSTD_compressBlock_btopt_extDict (line 1546) | size_t ZSTD_compressBlock_btopt_extDict(
function ZSTD_compressBlock_btultra_dictMatchState (line 1555) | size_t ZSTD_compressBlock_btultra_dictMatchState(
function ZSTD_compressBlock_btultra_extDict (line 1562) | size_t ZSTD_compressBlock_btultra_extDict(
FILE: lib/compress/zstd_preSplit.c
function hash2 (line 33) | FORCE_INLINE_TEMPLATE unsigned hash2(const void *p, unsigned hashLog)
type Fingerprint (line 42) | typedef struct {
type FPStats (line 46) | typedef struct {
function initStats (line 51) | static void initStats(FPStats* fpstats)
function FORCE_INLINE_TEMPLATE (line 56) | FORCE_INLINE_TEMPLATE void
function FORCE_INLINE_TEMPLATE (line 69) | FORCE_INLINE_TEMPLATE void
function U64 (line 93) | static U64 abs64(S64 s64) { return (U64)((s64 < 0) ? -s64 : s64); }
function U64 (line 95) | static U64 fpDistance(const Fingerprint* fp1, const Fingerprint* fp2, un...
function compareFingerprints (line 110) | static int compareFingerprints(const Fingerprint* ref,
function mergeEvents (line 124) | static void mergeEvents(Fingerprint* acc, const Fingerprint* newfp)
function flushEvents (line 133) | static void flushEvents(FPStats* fpstats)
function removeEvents (line 143) | static void removeEvents(Fingerprint* acc, const Fingerprint* slice)
function ZSTD_splitBlock_byChunks (line 154) | static size_t ZSTD_splitBlock_byChunks(const void* blockStart, size_t bl...
function ZSTD_splitBlock_fromBorders (line 198) | static size_t ZSTD_splitBlock_fromBorders(const void* blockStart, size_t...
function ZSTD_splitBlock (line 228) | size_t ZSTD_splitBlock(const void* blockStart, size_t blockSize,
FILE: lib/compress/zstdmt_compress.c
function GetCurrentClockTimeMicroseconds (line 51) | static unsigned long long GetCurrentClockTimeMicroseconds(void)
type Buffer (line 90) | typedef struct buffer_s {
type ZSTDMT_bufferPool (line 97) | typedef struct ZSTDMT_bufferPool_s {
function ZSTDMT_freeBufferPool (line 106) | static void ZSTDMT_freeBufferPool(ZSTDMT_bufferPool* bufPool)
function ZSTDMT_bufferPool (line 122) | static ZSTDMT_bufferPool* ZSTDMT_createBufferPool(unsigned maxNbBuffers,...
function ZSTDMT_sizeof_bufferPool (line 144) | static size_t ZSTDMT_sizeof_bufferPool(ZSTDMT_bufferPool* bufPool)
function ZSTDMT_setBufferSize (line 162) | static void ZSTDMT_setBufferSize(ZSTDMT_bufferPool* const bufPool, size_...
function ZSTDMT_bufferPool (line 171) | static ZSTDMT_bufferPool* ZSTDMT_expandBufferPool(ZSTDMT_bufferPool* src...
function Buffer (line 192) | static Buffer ZSTDMT_getBuffer(ZSTDMT_bufferPool* bufPool)
function Buffer (line 234) | static Buffer ZSTDMT_resizeBuffer(ZSTDMT_bufferPool* bufPool, Buffer buf...
function ZSTDMT_releaseBuffer (line 255) | static void ZSTDMT_releaseBuffer(ZSTDMT_bufferPool* bufPool, Buffer buf)
type ZSTDMT_bufferPool (line 286) | typedef ZSTDMT_bufferPool ZSTDMT_seqPool;
function ZSTDMT_sizeof_seqPool (line 288) | static size_t ZSTDMT_sizeof_seqPool(ZSTDMT_seqPool* seqPool)
function RawSeqStore_t (line 293) | static RawSeqStore_t bufferToSeq(Buffer buffer)
function Buffer (line 301) | static Buffer seqToBuffer(RawSeqStore_t seq)
function RawSeqStore_t (line 309) | static RawSeqStore_t ZSTDMT_getSeq(ZSTDMT_seqPool* seqPool)
function RawSeqStore_t (line 318) | static RawSeqStore_t ZSTDMT_resizeSeq(ZSTDMT_seqPool* seqPool, RawSeqSto...
function ZSTDMT_releaseSeq (line 324) | static void ZSTDMT_releaseSeq(ZSTDMT_seqPool* seqPool, RawSeqStore_t seq)
function ZSTDMT_setNbSeq (line 329) | static void ZSTDMT_setNbSeq(ZSTDMT_seqPool* const seqPool, size_t const ...
function ZSTDMT_seqPool (line 334) | static ZSTDMT_seqPool* ZSTDMT_createSeqPool(unsigned nbWorkers, ZSTD_cus...
function ZSTDMT_freeSeqPool (line 342) | static void ZSTDMT_freeSeqPool(ZSTDMT_seqPool* seqPool)
function ZSTDMT_seqPool (line 347) | static ZSTDMT_seqPool* ZSTDMT_expandSeqPool(ZSTDMT_seqPool* pool, U32 nb...
type ZSTDMT_CCtxPool (line 356) | typedef struct {
function ZSTDMT_freeCCtxPool (line 365) | static void ZSTDMT_freeCCtxPool(ZSTDMT_CCtxPool* pool)
function ZSTDMT_CCtxPool (line 380) | static ZSTDMT_CCtxPool* ZSTDMT_createCCtxPool(int nbWorkers,
function ZSTDMT_CCtxPool (line 405) | static ZSTDMT_CCtxPool* ZSTDMT_expandCCtxPool(ZSTDMT_CCtxPool* srcPool,
function ZSTDMT_sizeof_CCtxPool (line 418) | static size_t ZSTDMT_sizeof_CCtxPool(ZSTDMT_CCtxPool* cctxPool)
function ZSTD_CCtx (line 435) | static ZSTD_CCtx* ZSTDMT_getCCtx(ZSTDMT_CCtxPool* cctxPool)
function ZSTDMT_releaseCCtx (line 450) | static void ZSTDMT_releaseCCtx(ZSTDMT_CCtxPool* pool, ZSTD_CCtx* cctx)
type Range (line 466) | typedef struct {
type SerialState (line 471) | typedef struct {
function ZSTDMT_serialState_reset (line 487) | static int
function ZSTDMT_serialState_init (line 558) | static int ZSTDMT_serialState_init(SerialState* serialState)
function ZSTDMT_serialState_free (line 569) | static void ZSTDMT_serialState_free(SerialState* serialState)
function ZSTDMT_serialState_genSequences (line 580) | static void
function ZSTDMT_serialState_applySequences (line 623) | static void
function ZSTDMT_serialState_ensureFinished (line 636) | static void ZSTDMT_serialState_ensureFinished(SerialState* serialState,
type ZSTDMT_jobDescription (line 662) | typedef struct {
function ZSTDMT_compressionJob (line 693) | static void ZSTDMT_compressionJob(void* jobDescription)
type InBuff_t (line 827) | typedef struct {
type RoundBuff_t (line 833) | typedef struct {
type RSyncState_t (line 860) | typedef struct {
type ZSTDMT_CCtx_s (line 866) | struct ZSTDMT_CCtx_s {
function ZSTDMT_freeJobsTable (line 894) | static void ZSTDMT_freeJobsTable(ZSTDMT_jobDescription* jobTable, U32 nb...
function ZSTDMT_jobDescription (line 908) | static ZSTDMT_jobDescription* ZSTDMT_createJobsTable(U32* nbJobsPtr, ZST...
function ZSTDMT_expandJobsTable (line 929) | static size_t ZSTDMT_expandJobsTable (ZSTDMT_CCtx* mtctx, U32 nbWorkers) {
function ZSTDMT_CCtxParam_setNbWorkers (line 945) | static size_t ZSTDMT_CCtxParam_setNbWorkers(ZSTD_CCtx_params* params, un...
function MEM_STATIC (line 950) | MEM_STATIC ZSTDMT_CCtx* ZSTDMT_createCCtx_advanced_internal(unsigned nbW...
function ZSTDMT_CCtx (line 992) | ZSTDMT_CCtx* ZSTDMT_createCCtx_advanced(unsigned nbWorkers, ZSTD_customM...
function ZSTDMT_releaseAllJobResources (line 1007) | static void ZSTDMT_releaseAllJobResources(ZSTDMT_CCtx* mtctx)
function ZSTDMT_waitForAllJobsCompleted (line 1031) | static void ZSTDMT_waitForAllJobsCompleted(ZSTDMT_CCtx* mtctx)
function ZSTDMT_freeCCtx (line 1046) | size_t ZSTDMT_freeCCtx(ZSTDMT_CCtx* mtctx)
function ZSTDMT_sizeof_CCtx (line 1064) | size_t ZSTDMT_sizeof_CCtx(ZSTDMT_CCtx* mtctx)
function ZSTDMT_resize (line 1080) | static size_t ZSTDMT_resize(ZSTDMT_CCtx* mtctx, unsigned nbWorkers)
function ZSTDMT_updateCParams_whileCompressing (line 1098) | void ZSTDMT_updateCParams_whileCompressing(ZSTDMT_CCtx* mtctx, const ZST...
function ZSTD_frameProgression (line 1115) | ZSTD_frameProgression ZSTDMT_getFrameProgression(ZSTDMT_CCtx* mtctx)
function ZSTDMT_toFlushNow (line 1149) | size_t ZSTDMT_toFlushNow(ZSTDMT_CCtx* mtctx)
function ZSTDMT_computeTargetJobLog (line 1186) | static unsigned ZSTDMT_computeTargetJobLog(const ZSTD_CCtx_params* params)
function ZSTDMT_overlapLog_default (line 1200) | static int ZSTDMT_overlapLog_default(ZSTD_strategy strat)
function ZSTDMT_overlapLog (line 1221) | static int ZSTDMT_overlapLog(int ovlog, ZSTD_strategy strat)
function ZSTDMT_computeOverlapSize (line 1228) | static size_t ZSTDMT_computeOverlapSize(const ZSTD_CCtx_params* params)
function ZSTDMT_initCStream_internal (line 1251) | size_t ZSTDMT_initCStream_internal(
function ZSTDMT_writeLastEmptyBlock (line 1386) | static void ZSTDMT_writeLastEmptyBlock(ZSTDMT_jobDescription* job)
function ZSTDMT_createCompressionJob (line 1404) | static size_t ZSTDMT_createCompressionJob(ZSTDMT_CCtx* mtctx, size_t src...
function ZSTDMT_flushProduced (line 1489) | static size_t ZSTDMT_flushProduced(ZSTDMT_CCtx* mtctx, ZSTD_outBuffer* o...
function Range (line 1580) | static Range ZSTDMT_getInputDataInUse(ZSTDMT_CCtx* mtctx)
function ZSTDMT_isOverlapped (line 1616) | static int ZSTDMT_isOverlapped(Buffer buffer, Range range)
function ZSTDMT_doesOverlapWindow (line 1636) | static int ZSTDMT_doesOverlapWindow(Buffer buffer, ZSTD_window_t window)
function ZSTDMT_waitForLdmComplete (line 1658) | static void ZSTDMT_waitForLdmComplete(ZSTDMT_CCtx* mtctx, Buffer buffer)
function ZSTDMT_tryGetInputRange (line 1681) | static int ZSTDMT_tryGetInputRange(ZSTDMT_CCtx* mtctx)
type SyncPoint (line 1735) | typedef struct {
function SyncPoint (line 1746) | static SyncPoint
function ZSTDMT_nextInputSizeHint (line 1843) | size_t ZSTDMT_nextInputSizeHint(const ZSTDMT_CCtx* mtctx)
function ZSTDMT_compressStream_generic (line 1854) | size_t ZSTDMT_compressStream_generic(ZSTDMT_CCtx* mtctx,
FILE: lib/compress/zstdmt_compress.h
type ZSTDMT_CCtx (line 45) | typedef struct ZSTDMT_CCtx_s ZSTDMT_CCtx;
FILE: lib/decompress/huf_decompress.c
type DTableDesc (line 142) | typedef struct { BYTE maxTableLog; BYTE tableType; BYTE tableLog; BYTE r...
function DTableDesc (line 144) | static DTableDesc HUF_getDTableDesc(const HUF_DTable* table)
function HUF_initFastDStream (line 151) | static size_t HUF_initFastDStream(BYTE const* ip) {
type HUF_DecompressFastArgs (line 174) | typedef struct {
function HUF_DecompressFastArgs_init (line 192) | static size_t HUF_DecompressFastArgs_init(HUF_DecompressFastArgs* args, ...
function HUF_initRemainingDStream (line 282) | static size_t HUF_initRemainingDStream(BIT_DStream_t* bit, HUF_Decompres...
type HUF_DEltX1 (line 330) | typedef struct { BYTE nbBits; BYTE byte; } HUF_DEltX1;
function U64 (line 336) | static U64 HUF_DEltX1_set4(BYTE symbol, BYTE nbBits) {
function U32 (line 353) | static U32 HUF_rescaleStats(BYTE* huffWeight, U32* rankVal, U32 nbSymbol...
type HUF_ReadDTableX1_Workspace (line 378) | typedef struct {
function HUF_readDTableX1_wksp (line 386) | size_t HUF_readDTableX1_wksp(HUF_DTable* DTable, const void* src, size_t...
function FORCE_INLINE_TEMPLATE (line 522) | FORCE_INLINE_TEMPLATE BYTE
function HINT_INLINE (line 546) | HINT_INLINE size_t
function FORCE_INLINE_TEMPLATE (line 575) | FORCE_INLINE_TEMPLATE size_t
function FORCE_INLINE_TEMPLATE (line 602) | FORCE_INLINE_TEMPLATE size_t
function BMI2_TARGET_ATTRIBUTE (line 702) | static BMI2_TARGET_ATTRIBUTE
function HUF_decompress4X1_usingDTable_internal_default (line 709) | static
function HUF_FAST_BMI2_ATTRS (line 721) | static HUF_FAST_BMI2_ATTRS
function HUF_FAST_BMI2_ATTRS (line 839) | static HUF_FAST_BMI2_ATTRS
function HUF_decompress4X1_usingDTable_internal (line 896) | HUF_DGEN(HUF_decompress1X1_usingDTable_internal)
function HUF_decompress4X1_DCtx_wksp (line 931) | static size_t HUF_decompress4X1_DCtx_wksp(HUF_DTable* dctx, void* dst, s...
type HUF_DEltX2 (line 954) | typedef struct { U16 sequence; BYTE nbBits; BYTE length; } HUF_DEltX2;
type sortedSymbol_t (line 955) | typedef struct { BYTE symbol; } sortedSymbol_t;
type U32 (line 956) | typedef U32 rankValCol_t[HUF_TABLELOG_MAX + 1];
type rankValCol_t (line 957) | typedef rankValCol_t rankVal_t[HUF_TABLELOG_MAX];
function U32 (line 962) | static U32 HUF_buildDEltX2U32(U32 symbol, U32 nbBits, U32 baseSeq, int l...
function HUF_DEltX2 (line 981) | static HUF_DEltX2 HUF_buildDEltX2(U32 symbol, U32 nbBits, U32 baseSeq, i...
function U64 (line 993) | static U64 HUF_buildDEltX2U64(U32 symbol, U32 nbBits, U16 baseSeq, int l...
function HUF_fillDTableX2ForWeight (line 1011) | static void HUF_fillDTableX2ForWeight(
function HUF_fillDTableX2Level2 (line 1070) | static void HUF_fillDTableX2Level2(HUF_DEltX2* DTable, U32 targetLog, co...
function HUF_fillDTableX2 (line 1125) | static void HUF_fillDTableX2(HUF_DEltX2* DTable, const U32 targetLog,
type HUF_ReadDTableX2_Workspace (line 1171) | typedef struct {
function HUF_readDTableX2_wksp (line 1180) | size_t HUF_readDTableX2_wksp(HUF_DTable* DTable,
function FORCE_INLINE_TEMPLATE (line 1266) | FORCE_INLINE_TEMPLATE U32
function FORCE_INLINE_TEMPLATE (line 1275) | FORCE_INLINE_TEMPLATE U32
function HINT_INLINE (line 1308) | HINT_INLINE size_t
function FORCE_INLINE_TEMPLATE (line 1353) | FORCE_INLINE_TEMPLATE size_t
function FORCE_INLINE_TEMPLATE (line 1384) | FORCE_INLINE_TEMPLATE size_t
function BMI2_TARGET_ATTRIBUTE (line 1505) | static BMI2_TARGET_ATTRIBUTE
function HUF_decompress4X2_usingDTable_internal_default (line 1512) | static
function HUF_FAST_BMI2_ATTRS (line 1524) | static HUF_FAST_BMI2_ATTRS
function HUF_FAST_BMI2_ATTRS (line 1675) | static HUF_FAST_BMI2_ATTRS size_t
function HUF_decompress4X2_usingDTable_internal (line 1728) | static size_t HUF_decompress4X2_usingDTable_internal(void* dst, size_t d...
function HUF_decompress1X2_DCtx_wksp (line 1761) | HUF_DGEN(HUF_decompress1X2_usingDTable_internal)
function HUF_decompress4X2_DCtx_wksp (line 1778) | static size_t HUF_decompress4X2_DCtx_wksp(HUF_DTable* dctx, void* dst, s...
type algo_time_t (line 1802) | typedef struct { U32 tableTime; U32 decode256Time; } algo_time_t;
function U32 (line 1830) | U32 HUF_selectDecoder (size_t dstSize, size_t cSrcSize)
function HUF_decompress1X_DCtx_wksp (line 1854) | size_t HUF_decompress1X_DCtx_wksp(HUF_DTable* dctx, void* dst, size_t ds...
function HUF_decompress1X_usingDTable (line 1885) | size_t HUF_decompress1X_usingDTable(void* dst, size_t maxDstSize, const ...
function HUF_decompress1X1_DCtx_wksp (line 1903) | size_t HUF_decompress1X1_DCtx_wksp(HUF_DTable* dctx, void* dst, size_t d...
function HUF_decompress4X_usingDTable (line 1916) | size_t HUF_decompress4X_usingDTable(void* dst, size_t maxDstSize, const ...
function HUF_decompress4X_hufOnly_wksp (line 1933) | size_t HUF_decompress4X_hufOnly_wksp(HUF_DTable* dctx, void* dst, size_t...
FILE: lib/decompress/zstd_ddict.c
type ZSTD_DDict_s (line 36) | struct ZSTD_DDict_s {
function ZSTD_DDict_dictSize (line 52) | size_t ZSTD_DDict_dictSize(const ZSTD_DDict* ddict)
function ZSTD_copyDDictParameters (line 58) | void ZSTD_copyDDictParameters(ZSTD_DCtx* dctx, const ZSTD_DDict* ddict)
function ZSTD_loadEntropy_intoDDict (line 89) | static size_t
function ZSTD_initDDict_internal (line 120) | static size_t ZSTD_initDDict_internal(ZSTD_DDict* ddict,
function ZSTD_DDict (line 145) | ZSTD_DDict* ZSTD_createDDict_advanced(const void* dict, size_t dictSize,
function ZSTD_DDict (line 170) | ZSTD_DDict* ZSTD_createDDict(const void* dict, size_t dictSize)
function ZSTD_DDict (line 180) | ZSTD_DDict* ZSTD_createDDict_byReference(const void* dictBuffer, size_t ...
function ZSTD_DDict (line 187) | const ZSTD_DDict* ZSTD_initStaticDDict(
function ZSTD_freeDDict (line 212) | size_t ZSTD_freeDDict(ZSTD_DDict* ddict)
function ZSTD_estimateDDictSize (line 225) | size_t ZSTD_estimateDDictSize(size_t dictSize, ZSTD_dictLoadMethod_e dic...
function ZSTD_sizeof_DDict (line 230) | size_t ZSTD_sizeof_DDict(const ZSTD_DDict* ddict)
function ZSTD_getDictID_fromDDict (line 240) | unsigned ZSTD_getDictID_fromDDict(const ZSTD_DDict* ddict)
FILE: lib/decompress/zstd_decompress.c
function ZSTD_DDictHashSet_getIndex (line 95) | static size_t ZSTD_DDictHashSet_getIndex(const ZSTD_DDictHashSet* hashSe...
function ZSTD_DDictHashSet_emplaceDDict (line 105) | static size_t ZSTD_DDictHashSet_emplaceDDict(ZSTD_DDictHashSet* hashSet,...
function ZSTD_DDictHashSet_expand (line 131) | static size_t ZSTD_DDictHashSet_expand(ZSTD_DDictHashSet* hashSet, ZSTD_...
function ZSTD_DDict (line 156) | static const ZSTD_DDict* ZSTD_DDictHashSet_getDDict(ZSTD_DDictHashSet* h...
function ZSTD_DDictHashSet (line 178) | static ZSTD_DDictHashSet* ZSTD_createDDictHashSet(ZSTD_customMem customM...
function ZSTD_freeDDictHashSet (line 196) | static void ZSTD_freeDDictHashSet(ZSTD_DDictHashSet* hashSet, ZSTD_custo...
function ZSTD_DDictHashSet_addDDict (line 209) | static size_t ZSTD_DDictHashSet_addDDict(ZSTD_DDictHashSet* hashSet, con...
function ZSTD_sizeof_DCtx (line 221) | size_t ZSTD_sizeof_DCtx (const ZSTD_DCtx* dctx)
function ZSTD_estimateDCtxSize (line 229) | size_t ZSTD_estimateDCtxSize(void) { return sizeof(ZSTD_DCtx); }
function ZSTD_startingInputLength (line 232) | static size_t ZSTD_startingInputLength(ZSTD_format_e format)
function ZSTD_DCtx_resetParameters (line 240) | static void ZSTD_DCtx_resetParameters(ZSTD_DCtx* dctx)
function ZSTD_initDCtx_internal (line 252) | static void ZSTD_initDCtx_internal(ZSTD_DCtx* dctx)
function ZSTD_DCtx (line 281) | ZSTD_DCtx* ZSTD_initStaticDCtx(void *workspace, size_t workspaceSize)
function ZSTD_DCtx (line 294) | static ZSTD_DCtx* ZSTD_createDCtx_internal(ZSTD_customMem customMem) {
function ZSTD_DCtx (line 305) | ZSTD_DCtx* ZSTD_createDCtx_advanced(ZSTD_customMem customMem)
function ZSTD_DCtx (line 310) | ZSTD_DCtx* ZSTD_createDCtx(void)
function ZSTD_clearDict (line 316) | static void ZSTD_clearDict(ZSTD_DCtx* dctx)
function ZSTD_freeDCtx (line 324) | size_t ZSTD_freeDCtx(ZSTD_DCtx* dctx)
function ZSTD_copyDCtx (line 346) | void ZSTD_copyDCtx(ZSTD_DCtx* dstDCtx, const ZSTD_DCtx* srcDCtx)
function ZSTD_DCtx_selectFrameDDict (line 360) | static void ZSTD_DCtx_selectFrameDDict(ZSTD_DCtx* dctx) {
function ZSTD_isFrame (line 385) | unsigned ZSTD_isFrame(const void* buffer, size_t size)
function ZSTD_isSkippableFrame (line 402) | unsigned ZSTD_isSkippableFrame(const void* buffer, size_t size)
function ZSTD_frameHeaderSize_internal (line 416) | static size_t ZSTD_frameHeaderSize_internal(const void* src, size_t srcS...
function ZSTD_frameHeaderSize (line 435) | size_t ZSTD_frameHeaderSize(const void* src, size_t srcSize)
function ZSTD_getFrameHeader_advanced (line 447) | size_t ZSTD_getFrameHeader_advanced(ZSTD_FrameHeader* zfhPtr, const void...
function ZSTD_getFrameHeader (line 559) | size_t ZSTD_getFrameHeader(ZSTD_FrameHeader* zfhPtr, const void* src, si...
function ZSTD_getFrameContentSize (line 569) | unsigned long long ZSTD_getFrameContentSize(const void *src, size_t srcS...
function readSkippableFrameSize (line 587) | static size_t readSkippableFrameSize(void const* src, size_t srcSize)
function ZSTD_readSkippableFrame (line 614) | size_t ZSTD_readSkippableFrame(void* dst, size_t dstCapacity,
function ZSTD_findDecompressedSize (line 643) | unsigned long long ZSTD_findDecompressedSize(const void* src, size_t src...
function ZSTD_getDecompressedSize (line 690) | unsigned long long ZSTD_getDecompressedSize(const void* src, size_t srcS...
function ZSTD_decodeFrameHeader (line 702) | static size_t ZSTD_decodeFrameHeader(ZSTD_DCtx* dctx, const void* src, s...
function ZSTD_frameSizeInfo (line 726) | static ZSTD_frameSizeInfo ZSTD_errorFrameSizeInfo(size_t ret)
function ZSTD_frameSizeInfo (line 734) | static ZSTD_frameSizeInfo ZSTD_findFrameSizeInfo(const void* src, size_t...
function ZSTD_findFrameCompressedSize_advanced (line 801) | static size_t ZSTD_findFrameCompressedSize_advanced(const void *src, siz...
function ZSTD_findFrameCompressedSize (line 809) | size_t ZSTD_findFrameCompressedSize(const void *src, size_t srcSize)
function ZSTD_decompressBound (line 820) | unsigned long long ZSTD_decompressBound(const void* src, size_t srcSize)
function ZSTD_decompressionMargin (line 838) | size_t ZSTD_decompressionMargin(void const* src, size_t srcSize)
function ZSTD_insertBlock (line 887) | size_t ZSTD_insertBlock(ZSTD_DCtx* dctx, const void* blockStart, size_t ...
function ZSTD_copyRawBlock (line 896) | static size_t ZSTD_copyRawBlock(void* dst, size_t dstCapacity,
function ZSTD_setRleBlock (line 909) | static size_t ZSTD_setRleBlock(void* dst, size_t dstCapacity,
function ZSTD_DCtx_trace_end (line 922) | static void ZSTD_DCtx_trace_end(ZSTD_DCtx const* dctx, U64 uncompressedS...
function ZSTD_decompressFrame (line 953) | static size_t ZSTD_decompressFrame(ZSTD_DCtx* dctx,
function ZSTD_ALLOW_POINTER_OVERFLOW_ATTR (line 1068) | static
function ZSTD_decompress_usingDict (line 1171) | size_t ZSTD_decompress_usingDict(ZSTD_DCtx* dctx,
function ZSTD_DDict (line 1180) | static ZSTD_DDict const* ZSTD_getDDict(ZSTD_DCtx* dctx)
function ZSTD_decompressDCtx (line 1197) | size_t ZSTD_decompressDCtx(ZSTD_DCtx* dctx, void* dst, size_t dstCapacit...
function ZSTD_decompress (line 1203) | size_t ZSTD_decompress(void* dst, size_t dstCapacity, const void* src, s...
function ZSTD_nextSrcSizeToDecompress (line 1224) | size_t ZSTD_nextSrcSizeToDecompress(ZSTD_DCtx* dctx) { return dctx->expe...
function ZSTD_nextSrcSizeToDecompressWithInputSize (line 1236) | static size_t ZSTD_nextSrcSizeToDecompressWithInputSize(ZSTD_DCtx* dctx,...
function ZSTD_nextInputType_e (line 1244) | ZSTD_nextInputType_e ZSTD_nextInputType(ZSTD_DCtx* dctx) {
function ZSTD_isSkipFrame (line 1269) | static int ZSTD_isSkipFrame(ZSTD_DCtx* dctx) { return dctx->stage == ZST...
function ZSTD_decompressContinue (line 1275) | size_t ZSTD_decompressContinue(ZSTD_DCtx* dctx, void* dst, size_t dstCap...
function ZSTD_refDictContent (line 1435) | static size_t ZSTD_refDictContent(ZSTD_DCtx* dctx, const void* dict, siz...
function ZSTD_loadDEntropy (line 1451) | size_t
function ZSTD_decompress_insertDictionary (line 1539) | static size_t ZSTD_decompress_insertDictionary(ZSTD_DCtx* dctx, const vo...
function ZSTD_decompressBegin (line 1560) | size_t ZSTD_decompressBegin(ZSTD_DCtx* dctx)
function ZSTD_decompressBegin_usingDict (line 1588) | size_t ZSTD_decompressBegin_usingDict(ZSTD_DCtx* dctx, const void* dict,...
function ZSTD_decompressBegin_usingDDict (line 1601) | size_t ZSTD_decompressBegin_usingDDict(ZSTD_DCtx* dctx, const ZSTD_DDict...
function ZSTD_getDictID_fromDict (line 1624) | unsigned ZSTD_getDictID_fromDict(const void* dict, size_t dictSize)
function ZSTD_getDictID_fromFrame (line 1644) | unsigned ZSTD_getDictID_fromFrame(const void* src, size_t srcSize)
function ZSTD_decompress_usingDDict (line 1656) | size_t ZSTD_decompress_usingDDict(ZSTD_DCtx* dctx,
function ZSTD_DStream (line 1672) | ZSTD_DStream* ZSTD_createDStream(void)
function ZSTD_DStream (line 1678) | ZSTD_DStream* ZSTD_initStaticDStream(void *workspace, size_t workspaceSize)
function ZSTD_DStream (line 1683) | ZSTD_DStream* ZSTD_createDStream_advanced(ZSTD_customMem customMem)
function ZSTD_freeDStream (line 1688) | size_t ZSTD_freeDStream(ZSTD_DStream* zds)
function ZSTD_DStreamInSize (line 1696) | size_t ZSTD_DStreamInSize(void) { return ZSTD_BLOCKSIZE_MAX + ZSTD_bloc...
function ZSTD_DStreamOutSize (line 1697) | size_t ZSTD_DStreamOutSize(void) { return ZSTD_BLOCKSIZE_MAX; }
function ZSTD_DCtx_loadDictionary_advanced (line 1699) | size_t ZSTD_DCtx_loadDictionary_advanced(ZSTD_DCtx* dctx,
function ZSTD_DCtx_loadDictionary_byReference (line 1715) | size_t ZSTD_DCtx_loadDictionary_byReference(ZSTD_DCtx* dctx, const void*...
function ZSTD_DCtx_loadDictionary (line 1720) | size_t ZSTD_DCtx_loadDictionary(ZSTD_DCtx* dctx, const void* dict, size_...
function ZSTD_DCtx_refPrefix_advanced (line 1725) | size_t ZSTD_DCtx_refPrefix_advanced(ZSTD_DCtx* dctx, const void* prefix,...
function ZSTD_DCtx_refPrefix (line 1732) | size_t ZSTD_DCtx_refPrefix(ZSTD_DCtx* dctx, const void* prefix, size_t p...
function ZSTD_initDStream_usingDict (line 1741) | size_t ZSTD_initDStream_usingDict(ZSTD_DStream* zds, const void* dict, s...
function ZSTD_initDStream (line 1750) | size_t ZSTD_initDStream(ZSTD_DStream* zds)
function ZSTD_initDStream_usingDDict (line 1761) | size_t ZSTD_initDStream_usingDDict(ZSTD_DStream* dctx, const ZSTD_DDict*...
function ZSTD_resetDStream (line 1772) | size_t ZSTD_resetDStream(ZSTD_DStream* dctx)
function ZSTD_DCtx_refDDict (line 1780) | size_t ZSTD_DCtx_refDDict(ZSTD_DCtx* dctx, const ZSTD_DDict* ddict)
function ZSTD_DCtx_setMaxWindowSize (line 1804) | size_t ZSTD_DCtx_setMaxWindowSize(ZSTD_DCtx* dctx, size_t maxWindowSize)
function ZSTD_DCtx_setFormat (line 1816) | size_t ZSTD_DCtx_setFormat(ZSTD_DCtx* dctx, ZSTD_format_e format)
function ZSTD_bounds (line 1821) | ZSTD_bounds ZSTD_dParam_getBounds(ZSTD_dParameter dParam)
function ZSTD_dParam_withinBounds (line 1864) | static int ZSTD_dParam_withinBounds(ZSTD_dParameter dParam, int value)
function ZSTD_DCtx_getParameter (line 1877) | size_t ZSTD_DCtx_getParameter(ZSTD_DCtx* dctx, ZSTD_dParameter param, in...
function ZSTD_DCtx_setParameter (line 1906) | size_t ZSTD_DCtx_setParameter(ZSTD_DCtx* dctx, ZSTD_dParameter dParam, i...
function ZSTD_DCtx_reset (line 1947) | size_t ZSTD_DCtx_reset(ZSTD_DCtx* dctx, ZSTD_ResetDirective reset)
function ZSTD_sizeof_DStream (line 1965) | size_t ZSTD_sizeof_DStream(const ZSTD_DStream* dctx)
function ZSTD_decodingBufferSize_internal (line 1970) | static size_t ZSTD_decodingBufferSize_internal(unsigned long long window...
function ZSTD_decodingBufferSize_min (line 1988) | size_t ZSTD_decodingBufferSize_min(unsigned long long windowSize, unsign...
function ZSTD_estimateDStreamSize (line 1993) | size_t ZSTD_estimateDStreamSize(size_t windowSize)
function ZSTD_estimateDStreamSize_fromFrame (line 2001) | size_t ZSTD_estimateDStreamSize_fromFrame(const void* src, size_t srcSize)
function ZSTD_DCtx_isOverflow (line 2016) | static int ZSTD_DCtx_isOverflow(ZSTD_DStream* zds, size_t const neededIn...
function ZSTD_DCtx_updateOversizedDuration (line 2021) | static void ZSTD_DCtx_updateOversizedDuration(ZSTD_DStream* zds, size_t ...
function ZSTD_DCtx_isOversizedTooLong (line 2029) | static int ZSTD_DCtx_isOversizedTooLong(ZSTD_DStream* zds)
function ZSTD_checkOutBuffer (line 2035) | static size_t ZSTD_checkOutBuffer(ZSTD_DStream const* zds, ZSTD_outBuffe...
function ZSTD_decompressContinueStream (line 2057) | static size_t ZSTD_decompressContinueStream(
function ZSTD_decompressStream (line 2086) | size_t ZSTD_decompressStream(ZSTD_DStream* zds, ZSTD_outBuffer* output, ...
function ZSTD_decompressStream_simpleArgs (line 2392) | size_t ZSTD_decompressStream_simpleArgs (
FILE: lib/decompress/zstd_decompress_block.c
function ZSTD_copy4 (line 46) | static void ZSTD_copy4(void* dst, const void* src) { ZSTD_memcpy(dst, sr...
function ZSTD_blockSizeMax (line 53) | static size_t ZSTD_blockSizeMax(ZSTD_DCtx const* dctx)
function ZSTD_getcBlockSize (line 62) | size_t ZSTD_getcBlockSize(const void* src, size_t srcSize,
function ZSTD_allocateLiteralsBuffer (line 79) | static void ZSTD_allocateLiteralsBuffer(ZSTD_DCtx* dctx, void* const dst...
function ZSTD_decodeLiteralsBlock (line 133) | static size_t ZSTD_decodeLiteralsBlock(ZSTD_DCtx* dctx,
function ZSTD_decodeLiteralsBlock_wrapper (line 345) | size_t ZSTD_decodeLiteralsBlock_wrapper(ZSTD_DCtx* dctx,
function ZSTD_buildSeqTable_rle (line 462) | static void ZSTD_buildSeqTable_rle(ZSTD_seqSymbol* dt, U32 baseValue, U8...
function FORCE_INLINE_TEMPLATE (line 483) | FORCE_INLINE_TEMPLATE
function ZSTD_buildFSETable_body_default (line 605) | static void ZSTD_buildFSETable_body_default(ZSTD_seqSymbol* dt,
function BMI2_TARGET_ATTRIBUTE (line 615) | BMI2_TARGET_ATTRIBUTE static void ZSTD_buildFSETable_body_bmi2(ZSTD_seqS...
function ZSTD_buildFSETable (line 625) | void ZSTD_buildFSETable(ZSTD_seqSymbol* dt,
function ZSTD_buildSeqTable (line 646) | static size_t ZSTD_buildSeqTable(ZSTD_seqSymbol* DTableSpace, const ZSTD...
function ZSTD_decodeSeqHeaders (line 694) | size_t ZSTD_decodeSeqHeaders(ZSTD_DCtx* dctx, int* nbSeqPtr,
type seq_t (line 780) | typedef struct {
type ZSTD_fseState (line 786) | typedef struct {
type seqState_t (line 791) | typedef struct {
function HINT_INLINE (line 806) | HINT_INLINE void ZSTD_overlapCopy8(BYTE** op, BYTE const** ip, size_t of...
function ZSTD_safecopy (line 840) | static void
function ZSTD_safecopyDstBeforeSrc (line 883) | static void ZSTD_safecopyDstBeforeSrc(BYTE* op, const BYTE* ip, size_t l...
function ZSTD_execSequenceEnd (line 914) | size_t ZSTD_execSequenceEnd(BYTE* op,
function ZSTD_execSequenceEndSplitLitBuffer (line 962) | size_t ZSTD_execSequenceEndSplitLitBuffer(BYTE* op,
function ZSTD_execSequence (line 1008) | size_t ZSTD_execSequence(BYTE* op,
function ZSTD_execSequenceSplitLitBuffer (line 1107) | size_t ZSTD_execSequenceSplitLitBuffer(BYTE* op,
function ZSTD_initFseState (line 1198) | static void
function FORCE_INLINE_TEMPLATE (line 1210) | FORCE_INLINE_TEMPLATE void
type ZSTD_longOffset_e (line 1227) | typedef enum { ZSTD_lo_isRegularOffset, ZSTD_lo_isLongOffset=1 } ZSTD_lo...
function FORCE_INLINE_TEMPLATE (line 1235) | FORCE_INLINE_TEMPLATE seq_t
function ZSTD_dictionaryIsActive (line 1451) | static int ZSTD_dictionaryIsActive(ZSTD_DCtx const* dctx, BYTE const* pr...
function ZSTD_assertValidSequence (line 1467) | static void ZSTD_assertValidSequence(
function DONT_VECTORIZE (line 1503) | DONT_VECTORIZE
function DONT_VECTORIZE (line 1714) | DONT_VECTORIZE
function ZSTD_decompressSequences_default (line 1792) | static size_t
function ZSTD_decompressSequencesSplitLitBuffer_default (line 1801) | static size_t
function FORCE_INLINE_TEMPLATE (line 1813) | FORCE_INLINE_TEMPLATE
function FORCE_INLINE_TEMPLATE (line 1832) | FORCE_INLINE_TEMPLATE size_t
function ZSTD_decompressSequencesLong_default (line 1992) | static size_t
function DONT_VECTORIZE (line 2008) | DONT_VECTORIZE
function DONT_VECTORIZE (line 2017) | DONT_VECTORIZE
function BMI2_TARGET_ATTRIBUTE (line 2028) | static BMI2_TARGET_ATTRIBUTE size_t
function ZSTD_decompressSequences (line 2041) | static size_t
function ZSTD_decompressSequencesSplitLitBuffer (line 2054) | static size_t
function ZSTD_decompressSequencesLong (line 2076) | static size_t
function ZSTD_totalHistorySize (line 2098) | static size_t ZSTD_totalHistorySize(void* curPtr, const void* virtualStart)
type ZSTD_OffsetInfo (line 2103) | typedef struct {
function ZSTD_OffsetInfo (line 2114) | static ZSTD_OffsetInfo
function ZSTD_maxShortOffset (line 2147) | static size_t ZSTD_maxShortOffset(void)
function ZSTD_ALLOW_POINTER_OVERFLOW_ATTR (line 2279) | ZSTD_ALLOW_POINTER_OVERFLOW_ATTR
function ZSTD_decompressBlock_deprecated (line 2291) | size_t ZSTD_decompressBlock_deprecated(ZSTD_DCtx* dctx,
function ZSTD_decompressBlock (line 2306) | size_t ZSTD_decompressBlock(ZSTD_DCtx* dctx,
FILE: lib/decompress/zstd_decompress_block.h
type streaming_operation (line 37) | typedef enum {
FILE: lib/decompress/zstd_decompress_internal.h
type ZSTD_seqSymbol_header (line 62) | typedef struct {
type ZSTD_seqSymbol (line 67) | typedef struct {
type ZSTD_entropyDTables_t (line 80) | typedef struct {
type ZSTD_dStage (line 89) | typedef enum { ZSTDds_getFrameHeaderSize, ZSTDds_decodeFrameHeader,
type ZSTD_dStreamStage (line 94) | typedef enum { zdss_init=0, zdss_loadHeader,
type ZSTD_dictUses_e (line 97) | typedef enum {
type ZSTD_DDictHashSet (line 104) | typedef struct {
type ZSTD_litLocation_e (line 120) | typedef enum {
type ZSTD_DCtx_s (line 126) | struct ZSTD_DCtx_s
function MEM_STATIC (line 213) | MEM_STATIC int ZSTD_DCtx_get_bmi2(const struct ZSTD_DCtx_s *dctx) {
FILE: lib/deprecated/zbuff.h
type ZSTD_CStream (line 71) | typedef ZSTD_CStream ZBUFF_CCtx;
type ZSTD_DStream (line 123) | typedef ZSTD_DStream ZBUFF_DCtx;
FILE: lib/deprecated/zbuff_common.c
function ZBUFF_isError (line 23) | unsigned ZBUFF_isError(size_t errorCode) { return ERR_isError(errorCode); }
FILE: lib/deprecated/zbuff_compress.c
function ZBUFF_CCtx (line 54) | ZBUFF_CCtx* ZBUFF_createCCtx(void)
function ZBUFF_CCtx (line 59) | ZBUFF_CCtx* ZBUFF_createCCtx_advanced(ZSTD_customMem customMem)
function ZBUFF_freeCCtx (line 64) | size_t ZBUFF_freeCCtx(ZBUFF_CCtx* zbc)
function ZBUFF_compressInit_advanced (line 72) | size_t ZBUFF_compressInit_advanced(ZBUFF_CCtx* zbc,
function ZBUFF_compressInitDictionary (line 97) | size_t ZBUFF_compressInitDictionary(ZBUFF_CCtx* zbc, const void* dict, s...
function ZBUFF_compressInit (line 105) | size_t ZBUFF_compressInit(ZBUFF_CCtx* zbc, int compressionLevel)
function ZBUFF_compressContinue (line 113) | size_t ZBUFF_compressContinue(ZBUFF_CCtx* zbc,
function ZBUFF_compressFlush (line 136) | size_t ZBUFF_compressFlush(ZBUFF_CCtx* zbc, void* dst, size_t* dstCapaci...
function ZBUFF_compressEnd (line 149) | size_t ZBUFF_compressEnd(ZBUFF_CCtx* zbc, void* dst, size_t* dstCapacity...
function ZBUFF_recommendedCInSize (line 166) | size_t ZBUFF_recommendedCInSize(void) { return ZSTD_CStreamInSize(); }
function ZBUFF_recommendedCOutSize (line 167) | size_t ZBUFF_recommendedCOutSize(void) { return ZSTD_CStreamOutSize(); }
FILE: lib/deprecated/zbuff_decompress.c
function ZBUFF_DCtx (line 22) | ZBUFF_DCtx* ZBUFF_createDCtx(void)
function ZBUFF_DCtx (line 27) | ZBUFF_DCtx* ZBUFF_createDCtx_advanced(ZSTD_customMem customMem)
function ZBUFF_freeDCtx (line 32) | size_t ZBUFF_freeDCtx(ZBUFF_DCtx* zbd)
function ZBUFF_decompressInitDictionary (line 40) | size_t ZBUFF_decompressInitDictionary(ZBUFF_DCtx* zbd, const void* dict,...
function ZBUFF_decompressInit (line 45) | size_t ZBUFF_decompressInit(ZBUFF_DCtx* zbd)
function ZBUFF_decompressContinue (line 53) | size_t ZBUFF_decompressContinue(ZBUFF_DCtx* zbd,
function ZBUFF_recommendedDInSize (line 76) | size_t ZBUFF_recommendedDInSize(void) { return ZSTD_DStreamInSize(); }
function ZBUFF_recommendedDOutSize (line 77) | size_t ZBUFF_recommendedDOutSize(void) { return ZSTD_DStreamOutSize(); }
FILE: lib/dictBuilder/cover.c
type COVER_map_pair_t (line 131) | typedef struct COVER_map_pair_t_s {
type COVER_map_t (line 136) | typedef struct COVER_map_s {
function COVER_map_clear (line 146) | static void COVER_map_clear(COVER_map_t *map) {
function COVER_map_init (line 156) | static int COVER_map_init(COVER_map_t *map, U32 size) {
function U32 (line 174) | static U32 COVER_map_hash(COVER_map_t *map, U32 key) {
function U32 (line 181) | static U32 COVER_map_index(COVER_map_t *map, U32 key) {
function U32 (line 200) | static U32 *COVER_map_at(COVER_map_t *map, U32 key) {
function COVER_map_remove (line 212) | static void COVER_map_remove(COVER_map_t *map, U32 key) {
function COVER_map_destroy (line 241) | static void COVER_map_destroy(COVER_map_t *map) {
type COVER_ctx_t (line 253) | typedef struct {
function COVER_sum (line 280) | size_t COVER_sum(const size_t *samplesSizes, unsigned nbSamples) {
function COVER_cmp (line 294) | static int COVER_cmp(COVER_ctx_t *ctx, const void *lp, const void *rp) {
function COVER_cmp8 (line 302) | static int COVER_cmp8(COVER_ctx_t *ctx, const void *lp, const void *rp) {
function COVER_strict_cmp (line 320) | static int COVER_strict_cmp(const void *lp, const void *rp) {
function COVER_strict_cmp8 (line 336) | static int COVER_strict_cmp8(const void *lp, const void *rp) {
function stableSort (line 350) | static void stableSort(COVER_ctx_t *ctx)
function COVER_groupBy (line 404) | static void
function COVER_group (line 431) | static void COVER_group(COVER_ctx_t *ctx, const void *group,
function COVER_segment_t (line 492) | static COVER_segment_t COVER_selectSegment(const COVER_ctx_t *ctx, U32 *...
function COVER_checkParameters (line 575) | static int COVER_checkParameters(ZDICT_cover_params_t parameters,
function COVER_ctx_destroy (line 599) | static void COVER_ctx_destroy(COVER_ctx_t *ctx) {
function COVER_ctx_init (line 628) | static size_t COVER_ctx_init(COVER_ctx_t *ctx, const void *samplesBuffer,
function COVER_warnOnSmallCorpus (line 718) | void COVER_warnOnSmallCorpus(size_t maxDictSize, size_t nbDmers, int dis...
function COVER_epoch_info_t (line 734) | COVER_epoch_info_t COVER_computeEpochs(U32 maxDictSize,
function COVER_buildDictionary (line 754) | static size_t COVER_buildDictionary(const COVER_ctx_t *ctx, U32 *freqs,
function ZDICTLIB_STATIC_API (line 809) | ZDICTLIB_STATIC_API size_t ZDICT_trainFromBuffer_cover(
function COVER_checkTotalCompressedSize (line 868) | size_t COVER_checkTotalCompressedSize(const ZDICT_cover_params_t paramet...
function COVER_best_init (line 924) | void COVER_best_init(COVER_best_t *best) {
function COVER_best_wait (line 938) | void COVER_best_wait(COVER_best_t *best) {
function COVER_best_destroy (line 952) | void COVER_best_destroy(COVER_best_t *best) {
function COVER_best_start (line 968) | void COVER_best_start(COVER_best_t *best) {
function COVER_best_finish (line 982) | void COVER_best_finish(COVER_best_t* best,
function COVER_dictSelection_t (line 1028) | static COVER_dictSelection_t setDictSelection(BYTE* buf, size_t s, size_...
function COVER_dictSelection_t (line 1037) | COVER_dictSelection_t COVER_dictSelectionError(size_t error) {
function COVER_dictSelectionIsError (line 1041) | unsigned COVER_dictSelectionIsError(COVER_dictSelection_t selection) {
function COVER_dictSelectionFree (line 1045) | void COVER_dictSelectionFree(COVER_dictSelection_t selection){
function COVER_dictSelection_t (line 1049) | COVER_dictSelection_t COVER_selectDict(BYTE* customDictContent, size_t d...
type COVER_tryParameters_data_t (line 1139) | typedef struct COVER_tryParameters_data_s {
function COVER_tryParameters (line 1151) | static void COVER_tryParameters(void *opaque)
function ZDICTLIB_STATIC_API (line 1197) | ZDICTLIB_STATIC_API size_t ZDICT_optimizeTrainFromBuffer_cover(
FILE: lib/dictBuilder/cover.h
type COVER_best_t (line 27) | typedef struct COVER_best_s {
type COVER_segment_t (line 40) | typedef struct {
type COVER_epoch_info_t (line 49) | typedef struct {
type COVER_dictSelection_t (line 57) | typedef struct COVER_dictSelection {
FILE: lib/dictBuilder/divsufsort.c
function INLINE (line 152) | static INLINE
function INLINE (line 195) | static INLINE
function INLINE (line 228) | static INLINE
function ss_insertionsort (line 254) | static
function INLINE (line 279) | static INLINE
function ss_heapsort (line 296) | static
function INLINE (line 321) | static INLINE
function INLINE (line 335) | static INLINE
function INLINE (line 350) | static INLINE
function INLINE (line 378) | static INLINE
function ss_mintrosort (line 397) | static
function INLINE (line 539) | static INLINE
function INLINE (line 548) | static INLINE
function ss_inplacemerge (line 590) | static
function ss_mergeforward (line 633) | static
function ss_mergebackward (line 683) | static
function ss_swapmerge (line 742) | static
function sssort (line 834) | static
function INLINE (line 909) | static INLINE
function tr_insertionsort (line 925) | static
function INLINE (line 944) | static INLINE
function tr_heapsort (line 960) | static
function INLINE (line 985) | static INLINE
function INLINE (line 998) | static INLINE
function INLINE (line 1013) | static INLINE
type trbudget_t (line 1040) | typedef struct _trbudget_t trbudget_t;
type _trbudget_t (line 1041) | struct _trbudget_t {
function INLINE (line 1048) | static INLINE
function INLINE (line 1055) | static INLINE
function INLINE (line 1068) | static INLINE
function tr_copy (line 1110) | static
function tr_partialcopy (line 1135) | static
function tr_introsort (line 1173) | static
function trsort (line 1400) | static
function sort_typeBstar (line 1439) | static
function construct_SA (line 1611) | static
function construct_BWT (line 1675) | static
function construct_BWT_indexes (line 1746) | static
function divsufsort (line 1846) | int
function divbwt (line 1875) | int
FILE: lib/dictBuilder/fastcover.c
function FASTCOVER_hashPtrToIndex (line 84) | static size_t FASTCOVER_hashPtrToIndex(const void* p, U32 f, unsigned d) {
type FASTCOVER_accel_t (line 95) | typedef struct {
type FASTCOVER_ctx_t (line 119) | typedef struct {
function COVER_segment_t (line 149) | static COVER_segment_t FASTCOVER_selectSegment(const FASTCOVER_ctx_t *ctx,
function FASTCOVER_checkParameters (line 222) | static int FASTCOVER_checkParameters(ZDICT_cover_params_t parameters,
function FASTCOVER_ctx_destroy (line 260) | static void
function FASTCOVER_computeFrequency (line 276) | static void
function FASTCOVER_ctx_init (line 305) | static size_t
function FASTCOVER_buildDictionary (line 394) | static size_t
type FASTCOVER_tryParameters_data_t (line 458) | typedef struct FASTCOVER_tryParameters_data_s {
function FASTCOVER_tryParameters (line 471) | static void FASTCOVER_tryParameters(void* opaque)
function FASTCOVER_convertToCoverParams (line 516) | static void
function FASTCOVER_convertToFastCoverParams (line 530) | static void
function ZDICTLIB_STATIC_API (line 547) | ZDICTLIB_STATIC_API size_t
function ZDICTLIB_STATIC_API (line 615) | ZDICTLIB_STATIC_API size_t
FILE: lib/dictBuilder/zdict.c
function clock_t (line 81) | static clock_t ZDICT_clockSpan(clock_t nPrevious) { return clock() - nPr...
function ZDICT_printHex (line 83) | static void ZDICT_printHex(const void* ptr, size_t length)
function ZDICT_isError (line 98) | unsigned ZDICT_isError(size_t errorCode) { return ERR_isError(errorCode); }
function ZDICT_getDictID (line 102) | unsigned ZDICT_getDictID(const void* dictBuffer, size_t dictSize)
function ZDICT_getDictHeaderSize (line 109) | size_t ZDICT_getDictHeaderSize(const void* dictBuffer, size_t dictSize)
function ZDICT_count (line 137) | static size_t ZDICT_count(const void* pIn, const void* pMatch)
type dictItem (line 153) | typedef struct {
function ZDICT_initDictItem (line 159) | static void ZDICT_initDictItem(dictItem* d)
function dictItem (line 169) | static dictItem ZDICT_analyzePos(
function isIncluded (line 343) | static int isIncluded(const void* in, const void* container, size_t length)
function U32 (line 360) | static U32 ZDICT_tryMerge(dictItem* table, dictItem elt, U32 eltNbToSkip...
function ZDICT_removeDictItem (line 419) | static void ZDICT_removeDictItem(dictItem* table, U32 id)
function ZDICT_insertDictItem (line 431) | static void ZDICT_insertDictItem(dictItem* table, U32 maxSize, dictItem ...
function U32 (line 460) | static U32 ZDICT_dictSize(const dictItem* dictList)
function ZDICT_trainBuffer_legacy (line 469) | static size_t ZDICT_trainBuffer_legacy(dictItem* dictList, U32 dictListS...
function ZDICT_fillNoise (line 548) | static void ZDICT_fillNoise(void* buffer, size_t length)
type EStats_ress_t (line 561) | typedef struct
function ZDICT_countEStats (line 570) | static void ZDICT_countEStats(EStats_ress_t esr, const ZSTD_parameters* ...
function ZDICT_totalSampleSize (line 625) | static size_t ZDICT_totalSampleSize(const size_t* fileSizes, unsigned nb...
type offsetCount_t (line 633) | typedef struct { U32 offset; U32 count; } offsetCount_t;
function ZDICT_insertSortCount (line 635) | static void ZDICT_insertSortCount(offsetCount_t table[ZSTD_REP_NUM+1], U...
function ZDICT_flatLit (line 653) | static void ZDICT_flatLit(unsigned* countLit)
function ZDICT_analyzeEntropy (line 663) | static size_t ZDICT_analyzeEntropy(void* dstBuffer, size_t maxDstSize,
function U32 (line 853) | static U32 ZDICT_maxRep(U32 const reps[ZSTD_REP_NUM])
function ZDICT_finalizeDictionary (line 862) | size_t ZDICT_finalizeDictionary(void* dictBuffer, size_t dictBufferCapac...
function ZDICT_addEntropyTablesFromBuffer_advanced (line 944) | static size_t ZDICT_addEntropyTablesFromBuffer_advanced(
function ZDICT_trainFromBuffer_unsafe_legacy (line 982) | static size_t ZDICT_trainFromBuffer_unsafe_legacy(
function ZDICT_trainFromBuffer_legacy (line 1088) | size_t ZDICT_trainFromBuffer_legacy(void* dictBuffer, size_t dictBufferC...
function ZDICT_trainFromBuffer (line 1111) | size_t ZDICT_trainFromBuffer(void* dictBuffer, size_t dictBufferCapacity,
function ZDICT_addEntropyTablesFromBuffer (line 1129) | size_t ZDICT_addEntropyTablesFromBuffer(void* dictBuffer, size_t dictCon...
FILE: lib/legacy/zstd_legacy.h
function ZSTD_isLegacy (line 56) | MEM_STATIC unsigned ZSTD_isLegacy(const void* src, size_t srcSize)
function ZSTD_getDecompressedSize_legacy (line 89) | MEM_STATIC unsigned long long ZSTD_getDecompressedSize_legacy(const void...
function MEM_STATIC (line 121) | MEM_STATIC size_t ZSTD_decompressLegacy(
function MEM_STATIC (line 195) | MEM_STATIC ZSTD_frameSizeInfo ZSTD_findFrameSizeInfoLegacy(const void *s...
function MEM_STATIC (line 269) | MEM_STATIC size_t ZSTD_findFrameCompressedSizeLegacy(const void *src, si...
function MEM_STATIC (line 275) | MEM_STATIC size_t ZSTD_freeLegacyStreamContext(void* legacyContext, U32 ...
function MEM_STATIC (line 301) | MEM_STATIC size_t ZSTD_initLegacyStream(void** legacyContext, U32 prevVe...
function MEM_STATIC (line 366) | MEM_STATIC size_t ZSTD_decompressLegacyStream(void* legacyContext, U32 v...
FILE: lib/legacy/zstd_v01.c
type FSE_errorCodes (line 44) | typedef enum { FSE_LIST_ERRORS(FSE_GENERATE_ENUM) } FSE_errorCodes;
type FSE_CTable (line 58) | typedef unsigned FSE_CTable;
type FSE_DTable (line 59) | typedef unsigned FSE_DTable;
type FSE_CStream_t (line 61) | typedef struct
type FSE_CState_t (line 70) | typedef struct
type FSE_DStream_t (line 78) | typedef struct
type FSE_DState_t (line 86) | typedef struct
type FSE_DStream_status (line 92) | typedef enum { FSE_DStream_unfinished = 0,
type FSE_decode_t (line 126) | typedef struct
type BYTE (line 172) | typedef uint8_t BYTE;
type U16 (line 173) | typedef uint16_t U16;
type S16 (line 174) | typedef int16_t S16;
type U32 (line 175) | typedef uint32_t U32;
type S32 (line 176) | typedef int32_t S32;
type U64 (line 177) | typedef uint64_t U64;
type S64 (line 178) | typedef int64_t S64;
type BYTE (line 180) | typedef unsigned char BYTE;
type U16 (line 181) | typedef unsigned short U16;
type S16 (line 182) | typedef signed short S16;
type U32 (line 183) | typedef unsigned int U32;
type S32 (line 184) | typedef signed int S32;
type U64 (line 185) | typedef unsigned long long U64;
type S64 (line 186) | typedef signed long long S64;
function FSE_32bits (line 195) | static unsigned FSE_32bits(void)
function FSE_isLittleEndian (line 200) | static unsigned FSE_isLittleEndian(void)
function U16 (line 206) | static U16 FSE_read16(const void* memPtr)
function U32 (line 211) | static U32 FSE_read32(const void* memPtr)
function U64 (line 216) | static U64 FSE_read64(const void* memPtr)
function U16 (line 221) | static U16 FSE_readLE16(const void* memPtr)
function U32 (line 232) | static U32 FSE_readLE32(const void* memPtr)
function U64 (line 244) | static U64 FSE_readLE64(const void* memPtr)
function FSE_readLEST (line 256) | static size_t FSE_readLEST(const void* memPtr)
type FSE_symbolCompressionTransform (line 290) | typedef struct
type U32 (line 296) | typedef U32 DTable_max_t[FSE_DTABLE_SIZE_U32(FSE_MAX_TABLELOG)];
function FSE_highbit32 (line 301) | FORCE_INLINE unsigned FSE_highbit32 (U32 val)
function U32 (line 347) | static U32 FSE_tableStep(U32 tableSize) { return (tableSize>>1) + (table...
type FSE_DTableHeader (line 352) | typedef struct {
function FSE_buildDTable (line 357) | static size_t FSE_buildDTable
function FSE_isError (line 429) | static unsigned FSE_isError(size_t code) { return (code > (size_t)(-FSE_...
function FSE_abs (line 431) | static short FSE_abs(short a)
function FSE_readNCount (line 440) | static size_t FSE_readNCount (short* normalizedCounter, unsigned* maxSVP...
function FSE_buildDTable_rle (line 556) | static size_t FSE_buildDTable_rle (FSE_DTable* dt, BYTE symbolValue)
function FSE_buildDTable_raw (line 573) | static size_t FSE_buildDTable_raw (FSE_DTable* dt, unsigned nbBits)
function FSE_initDStream (line 606) | static size_t FSE_initDStream(FSE_DStream_t* bitD, const void* srcBuffer...
function FSE_lookBits (line 659) | static size_t FSE_lookBits(FSE_DStream_t* bitD, U32 nbBits)
function FSE_lookBitsFast (line 665) | static size_t FSE_lookBitsFast(FSE_DStream_t* bitD, U32 nbBits) /* onl...
function FSE_skipBits (line 671) | static void FSE_skipBits(FSE_DStream_t* bitD, U32 nbBits)
function FSE_readBits (line 684) | static size_t FSE_readBits(FSE_DStream_t* bitD, U32 nbBits)
function FSE_readBitsFast (line 691) | static size_t FSE_readBitsFast(FSE_DStream_t* bitD, U32 nbBits) /* onl...
function FSE_reloadDStream (line 698) | static unsigned FSE_reloadDStream(FSE_DStream_t* bitD)
function FSE_initDState (line 731) | static void FSE_initDState(FSE_DState_t* DStatePtr, FSE_DStream_t* bitD,...
function BYTE (line 740) | static BYTE FSE_decodeSymbol(FSE_DState_t* DStatePtr, FSE_DStream_t* bitD)
function BYTE (line 751) | static BYTE FSE_decodeSymbolFast(FSE_DState_t* DStatePtr, FSE_DStream_t*...
function FSE_endOfDStream (line 765) | static unsigned FSE_endOfDStream(const FSE_DStream_t* bitD)
function FSE_endOfDState (line 770) | static unsigned FSE_endOfDState(const FSE_DState_t* DStatePtr)
function FORCE_INLINE (line 776) | FORCE_INLINE size_t FSE_decompress_usingDTable_generic(
function FSE_decompress_usingDTable (line 846) | static size_t FSE_decompress_usingDTable(void* dst, size_t originalSize,
function FSE_decompress (line 859) | static size_t FSE_decompress(void* dst, size_t maxDstSize, const void* c...
type HUF_CElt (line 898) | typedef struct HUF_CElt_s {
type nodeElt (line 903) | typedef struct nodeElt_s {
type HUF_DElt (line 914) | typedef struct {
function HUF_readDTable (line 919) | static size_t HUF_readDTable (U16* DTable, const void* src, size_t srcSize)
function BYTE (line 1021) | static BYTE HUF_decodeSymbol(FSE_DStream_t* Dstream, const HUF_DElt* dt,...
function HUF_decompress_usingDTable (line 1029) | static size_t HUF_decompress_usingDTable( /* -3% slower when non stati...
function HUF_decompress (line 1133) | static size_t HUF_decompress (void* dst, size_t maxDstSize, const void* ...
type BYTE (line 1246) | typedef uint8_t BYTE;
type U16 (line 1247) | typedef uint16_t U16;
type S16 (line 1248) | typedef int16_t S16;
type U32 (line 1249) | typedef uint32_t U32;
type S32 (line 1250) | typedef int32_t S32;
type U64 (line 1251) | typedef uint64_t U64;
type BYTE (line 1253) | typedef unsigned char BYTE;
type U16 (line 1254) | typedef unsigned short U16;
type S16 (line 1255) | typedef signed short S16;
type U32 (line 1256) | typedef unsigned int U32;
type S32 (line 1257) | typedef signed int S32;
type U64 (line 1258) | typedef unsigned long long U64;
function ZSTD_32bits (line 1313) | static unsigned ZSTD_32bits(void) { return sizeof(void*)==4; }
function ZSTD_isLittleEndian (line 1315) | static unsigned ZSTD_isLittleEndian(void)
function U16 (line 1321) | static U16 ZSTD_read16(const void* p) { U16 r; memcpy(&r, p, sizeof(r...
function ZSTD_copy4 (line 1323) | static void ZSTD_copy4(void* dst, const void* src) { memcpy(dst, src, ...
function ZSTD_copy8 (line 1325) | static void ZSTD_copy8(void* dst, const void* src) { memcpy(dst, src, ...
function ZSTD_wildcopy (line 1329) | static void ZSTD_wildcopy(void* dst, const void* src, ptrdiff_t length)
function U16 (line 1337) | static U16 ZSTD_readLE16(const void* memPtr)
function U32 (line 1347) | static U32 ZSTD_readLE24(const void* memPtr)
function U32 (line 1352) | static U32 ZSTD_readBE32(const void* memPtr)
type ZSTD_Cctx (line 1362) | typedef struct ZSTD_Cctx_s ZSTD_Cctx;
type blockType_t (line 1364) | typedef enum { bt_compressed, bt_raw, bt_rle, bt_end } blockType_t;
type blockProperties_t (line 1366) | typedef struct
type SeqStore_t (line 1372) | typedef struct {
type cctxi_t (line 1389) | typedef struct ZSTD_Cctx_s
function ZSTDv01_isError (line 1410) | unsigned ZSTDv01_isError(size_t code) { return ERR_isError(code); }
function ZSTDv01_getcBlockSize (line 1425) | static size_t ZSTDv01_getcBlockSize(const void* src, size_t srcSize, blo...
function ZSTD_copyUncompressedBlock (line 1445) | static size_t ZSTD_copyUncompressedBlock(void* dst, size_t maxDstSize, c...
function ZSTD_decompressLiterals (line 1455) | static size_t ZSTD_decompressLiterals(void* ctx,
function ZSTDv01_decodeLiteralsBlock (line 1480) | static size_t ZSTDv01_decodeLiteralsBlock(void* ctx,
function ZSTDv01_decodeSeqHeaders (line 1534) | static size_t ZSTDv01_decodeSeqHeaders(int* nbSeq, const BYTE** dumpsPtr...
type seq_t (line 1635) | typedef struct {
type seqState_t (line 1641) | typedef struct {
function ZSTD_decodeSequence (line 1652) | static void ZSTD_decodeSequence(seq_t* seq, seqState_t* seqState)
function ZSTD_execSequence (line 1716) | static size_t ZSTD_execSequence(BYTE* op,
type dctx_t (line 1801) | typedef struct ZSTDv01_Dctx_s
function ZSTD_decompressSequences (line 1814) | static size_t ZSTD_decompressSequences(
function ZSTD_decompressBlock (line 1888) | static size_t ZSTD_decompressBlock(
function ZSTDv01_decompressDCtx (line 1909) | size_t ZSTDv01_decompressDCtx(void* ctx, void* dst, size_t maxDstSize, c...
function ZSTDv01_decompress (line 1966) | size_t ZSTDv01_decompress(void* dst, size_t maxDstSize, const void* src,...
function ZSTD_errorFrameSizeInfoLegacy (line 1975) | static void ZSTD_errorFrameSizeInfoLegacy(size_t* cSize, unsigned long l...
function ZSTDv01_findFrameSizeInfoLegacy (line 1981) | void ZSTDv01_findFrameSizeInfoLegacy(const void *src, size_t srcSize, si...
function ZSTDv01_resetDCtx (line 2032) | size_t ZSTDv01_resetDCtx(ZSTDv01_Dctx* dctx)
function ZSTDv01_Dctx (line 2041) | ZSTDv01_Dctx* ZSTDv01_createDCtx(void)
function ZSTDv01_freeDCtx (line 2049) | size_t ZSTDv01_freeDCtx(ZSTDv01_Dctx* dctx)
function ZSTDv01_nextSrcSizeToDecompress (line 2055) | size_t ZSTDv01_nextSrcSizeToDecompress(ZSTDv01_Dctx* dctx)
function ZSTDv01_decompressContinue (line 2060) | size_t ZSTDv01_decompressContinue(ZSTDv01_Dctx* dctx, void* dst, size_t ...
FILE: lib/legacy/zstd_v01.h
type ZSTDv01_Dctx (line 60) | typedef struct ZSTDv01_Dctx_s ZSTDv01_Dctx;
FILE: lib/legacy/zstd_v02.c
type BYTE (line 84) | typedef uint8_t BYTE;
type U16 (line 85) | typedef uint16_t U16;
type S16 (line 86) | typedef int16_t S16;
type U32 (line 87) | typedef uint32_t U32;
type S32 (line 88) | typedef int32_t S32;
type U64 (line 89) | typedef uint64_t U64;
type S64 (line 90) | typedef int64_t S64;
type BYTE (line 92) | typedef unsigned char BYTE;
type U16 (line 93) | typedef unsigned short U16;
type S16 (line 94) | typedef signed short S16;
type U32 (line 95) | typedef unsigned int U32;
type S32 (line 96) | typedef signed int S32;
type U64 (line 97) | typedef unsigned long long U64;
type S64 (line 98) | typedef signed long long S64;
function MEM_32bits (line 106) | MEM_STATIC unsigned MEM_32bits(void) { return sizeof(void*)==4; }
function MEM_64bits (line 107) | MEM_STATIC unsigned MEM_64bits(void) { return sizeof(void*)==8; }
function MEM_isLittleEndian (line 109) | MEM_STATIC unsigned MEM_isLittleEndian(void)
function MEM_STATIC (line 115) | MEM_STATIC U16 MEM_read16(const void* memPtr)
function MEM_STATIC (line 120) | MEM_STATIC U32 MEM_read32(const void* memPtr)
function MEM_STATIC (line 125) | MEM_STATIC U64 MEM_read64(const void* memPtr)
function MEM_STATIC (line 130) | MEM_STATIC void MEM_write16(void* memPtr, U16 value)
function MEM_STATIC (line 135) | MEM_STATIC U16 MEM_readLE16(const void* memPtr)
function MEM_STATIC (line 146) | MEM_STATIC void MEM_writeLE16(void* memPtr, U16 val)
function MEM_STATIC (line 160) | MEM_STATIC U32 MEM_readLE24(const void* memPtr)
function MEM_STATIC (line 165) | MEM_STATIC U32 MEM_readLE32(const void* memPtr)
function MEM_STATIC (line 177) | MEM_STATIC U64 MEM_readLE64(const void* memPtr)
function MEM_STATIC (line 190) | MEM_STATIC size_t MEM_readLEST(const void* memPtr)
type BIT_DStream_t (line 258) | typedef struct
type BIT_DStream_status (line 266) | typedef enum { BIT_DStream_unfinished = 0,
function BIT_highbit32 (line 289) | MEM_STATIC unsigned BIT_highbit32 (U32 val)
function MEM_STATIC (line 323) | MEM_STATIC size_t BIT_initDStream(BIT_DStream_t* bitD, const void* srcBu...
function MEM_STATIC (line 368) | MEM_STATIC size_t BIT_lookBits(BIT_DStream_t* bitD, U32 nbBits)
function MEM_STATIC (line 376) | MEM_STATIC size_t BIT_lookBitsFast(BIT_DStream_t* bitD, U32 nbBits)
function MEM_STATIC (line 382) | MEM_STATIC void BIT_skipBits(BIT_DStream_t* bitD, U32 nbBits)
function MEM_STATIC (line 387) | MEM_STATIC size_t BIT_readBits(BIT_DStream_t* bitD, U32 nbBits)
function MEM_STATIC (line 396) | MEM_STATIC size_t BIT_readBitsFast(BIT_DStream_t* bitD, U32 nbBits)
function MEM_STATIC (line 403) | MEM_STATIC BIT_DStream_status BIT_reloadDStream(BIT_DStream_t* bitD)
function BIT_endOfDStream (line 438) | MEM_STATIC unsigned BIT_endOfDStream(const BIT_DStream_t* DStream)
type ERR_codes (line 518) | typedef enum { ERROR_LIST(ERROR_GENERATE_ENUM) } ERR_codes;
function ERR_isError (line 524) | ERR_STATIC unsigned ERR_isError(size_t code) { return (code > ERROR(maxC...
function ERR_STATIC (line 526) | ERR_STATIC const char* ERR_getErrorName(size_t code)
type FSE_CTable (line 542) | typedef unsigned FSE_CTable;
type FSE_DTable (line 543) | typedef unsigned FSE_DTable;
type FSE_DState_t (line 611) | typedef struct
type FSE_DTableHeader (line 638) | typedef struct {
type FSE_decode_t (line 643) | typedef struct
function MEM_STATIC (line 650) | MEM_STATIC void FSE_initDState(FSE_DState_t* DStatePtr, BIT_DStream_t* b...
function MEM_STATIC (line 659) | MEM_STATIC BYTE FSE_decodeSymbol(FSE_DState_t* DStatePtr, BIT_DStream_t*...
function MEM_STATIC (line 670) | MEM_STATIC BYTE FSE_decodeSymbolFast(FSE_DState_t* DStatePtr, BIT_DStrea...
function FSE_endOfDState (line 681) | MEM_STATIC unsigned FSE_endOfDState(const FSE_DState_t* DStatePtr)
type ZSTD_CCtx (line 814) | typedef struct ZSTD_CCtx_s ZSTD_CCtx;
type ZSTD_DCtx (line 865) | typedef struct ZSTDv02_Dctx_s ZSTD_DCtx;
type U32 (line 1002) | typedef U32 DTable_max_t[FSE_DTABLE_SIZE_U32(FSE_MAX_TABLELOG)];
function U32 (line 1032) | static U32 FSE_tableStep(U32 tableSize) { return (tableSize>>1) + (table...
function FSE_buildDTable (line 1034) | static size_t FSE_buildDTable
function FSE_isError (line 1106) | static unsigned FSE_isError(size_t code) { return ERR_isError(code); }
function FSE_abs (line 1112) | static short FSE_abs(short a)
function FSE_readNCount (line 1117) | static size_t FSE_readNCount (short* normalizedCounter, unsigned* maxSVP...
function FSE_buildDTable_rle (line 1233) | static size_t FSE_buildDTable_rle (FSE_DTable* dt, BYTE symbolValue)
function FSE_buildDTable_raw (line 1250) | static size_t FSE_buildDTable_raw (FSE_DTable* dt, unsigned nbBits)
function FORCE_INLINE (line 1276) | FORCE_INLINE size_t FSE_decompress_usingDTable_generic(
function FSE_decompress_usingDTable (line 1346) | static size_t FSE_decompress_usingDTable(void* dst, size_t originalSize,
function FSE_decompress (line 1359) | static size_t FSE_decompress(void* dst, size_t maxDstSize, const void* c...
function HUF_isError (line 1455) | static unsigned HUF_isError(size_t code) { return ERR_isError(code); }
type HUF_DEltX2 (line 1470) | typedef struct { BYTE byte; BYTE nbBits; } HUF_DEltX2;
type HUF_DEltX4 (line 1472) | typedef struct { U16 sequence; BYTE nbBits; BYTE length; } HUF_DEltX4;
type sortedSymbol_t (line 1474) | typedef struct { BYTE symbol; BYTE weight; } sortedSymbol_t;
function HUF_readStats (line 1481) | static size_t HUF_readStats(BYTE* huffWeight, size_t hwSize, U32* rankSt...
function HUF_readDTableX2 (line 1564) | static size_t HUF_readDTableX2 (U16* DTable, const void* src, size_t src...
function BYTE (line 1612) | static BYTE HUF_decodeSymbolX2(BIT_DStream_t* Dstream, const HUF_DEltX2*...
function HUF_decodeStreamX2 (line 1631) | static inline size_t HUF_decodeStreamX2(BYTE* p, BIT_DStream_t* const bi...
function HUF_decompress4X2_usingDTable (line 1656) | sta
Condensed preview — 509 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (7,026K chars).
[
{
"path": ".buckconfig",
"chars": 407,
"preview": "[cxx]\n cppflags = -DXXH_NAMESPACE=ZSTD_ -DZSTD_LEGACY_SUPPORT=4\n cflags = -Wall -Wextra -Wcast-qual -Wcast-align -Wsha"
},
{
"path": ".buckversion",
"chars": 41,
"preview": "c8dec2e8da52d483f6dd7c6cd2ad694e8e6fed2b\n"
},
{
"path": ".cirrus.yml",
"chars": 224,
"preview": "task:\n name: FreeBSD (make check)\n freebsd_instance:\n matrix:\n image_family: freebsd-15-0-amd64-zfs\n install_"
},
{
"path": ".gitattributes",
"chars": 348,
"preview": "# Set the default behavior\n* text eol=lf\n\n# Explicitly declare source files\n*.c text eol=lf\n*.h text eol=lf\n\n# Denote fi"
},
{
"path": ".github/ISSUE_TEMPLATE/bug_report.md",
"chars": 807,
"preview": "---\nname: Bug report\nabout: Create a report to help us improve\ntitle: ''\nlabels: ''\nassignees: ''\n\n---\n\n**Describe the b"
},
{
"path": ".github/ISSUE_TEMPLATE/feature_request.md",
"chars": 595,
"preview": "---\nname: Feature request\nabout: Suggest an idea for this project\ntitle: ''\nlabels: ''\nassignees: ''\n\n---\n\n**Is your fea"
},
{
"path": ".github/dependabot.yml",
"chars": 119,
"preview": "version: 2\nupdates:\n - package-ecosystem: \"github-actions\"\n directory: \"/\"\n schedule:\n interval: \"monthly\"\n"
},
{
"path": ".github/workflows/android-ndk-build.yml",
"chars": 1443,
"preview": "name: Android NDK Build\n\non:\n pull_request:\n branches: [ dev, release, actionsTest ]\n push:\n branches: [ actions"
},
{
"path": ".github/workflows/cmake-tests.yml",
"chars": 7097,
"preview": "name: cmake-tests\n# CMake-specific build and test workflows\n# This workflow validates zstd builds across different CMake"
},
{
"path": ".github/workflows/commit.yml",
"chars": 3461,
"preview": "name: facebook/zstd/commit\non:\n push:\n branches:\n - dev\n pull_request:\n branches:\n - dev\n\npermissions: rea"
},
{
"path": ".github/workflows/dev-long-tests.yml",
"chars": 10380,
"preview": "name: dev-long-tests\n# Tests generally longer than 10mn\n\nconcurrency:\n group: long-${{ github.ref }}\n cancel-in-progre"
},
{
"path": ".github/workflows/dev-short-tests.yml",
"chars": 27862,
"preview": "name: dev-short-tests\n# Faster tests: mostly build tests, along with some other\n# misc tests\n\nconcurrency:\n group: fast"
},
{
"path": ".github/workflows/nightly.yml",
"chars": 1287,
"preview": "name: facebook/zstd/nightly\non:\n schedule:\n - cron: '0 0 * * *'\n push:\n branches:\n - release\n - dev\n "
},
{
"path": ".github/workflows/publish-release-artifacts.yml",
"chars": 2710,
"preview": "name: publish-release-artifacts\n\non:\n release:\n types:\n - published\n\npermissions: read-all\n\njobs:\n publish-rel"
},
{
"path": ".github/workflows/release_check.yml",
"chars": 1588,
"preview": "name: release_checks\n\non:\n push:\n branches:\n - release\n pull_request:\n branches:\n - release\n\npermissio"
},
{
"path": ".github/workflows/scorecards.yml",
"chars": 2464,
"preview": "name: Scorecards supply-chain security\non:\n # Only the default branch is supported.\n branch_protection_rule:\n schedul"
},
{
"path": ".github/workflows/windows-artifacts.yml",
"chars": 4555,
"preview": "name: windows-artifacts\n\non:\n push:\n branches: [ test_artifacts, win_artifacts, release ]\n release:\n types:\n "
},
{
"path": ".gitignore",
"chars": 605,
"preview": "# Object files\n*.o\n*.ko\n*.dSYM\n\n# Libraries\n*.lib\n*.a\n\n# Shared objects (inc. Windows DLLs)\n*.dll\n*.so\n*.so.*\n*.dylib\n*."
},
{
"path": "CHANGELOG",
"chars": 51492,
"preview": "v1.6.0 (Dec 2025)\napi: legacy format support is now disabled by default\nbuild: `ZSTD_LEGACY_SUPPORT` defaults to `0` in "
},
{
"path": "CMakeLists.txt",
"chars": 386,
"preview": "cmake_minimum_required(VERSION 3.10)\n\n# Thin wrapper so `cmake -S .` behaves like `cmake -S build/cmake`.\n# Policy lives"
},
{
"path": "CODE_OF_CONDUCT.md",
"chars": 244,
"preview": "# Code of Conduct\n\nFacebook has adopted a Code of Conduct that we expect project participants to adhere to.\nPlease read "
},
{
"path": "CONTRIBUTING.md",
"chars": 31553,
"preview": "# Contributing to Zstandard\nWe want to make contributing to this project as easy and transparent as\npossible.\n\n## Our De"
},
{
"path": "COPYING",
"chars": 18091,
"preview": " GNU GENERAL PUBLIC LICENSE\n Version 2, June 1991\n\n Copyright (C) 1989, 1991 Fr"
},
{
"path": "LICENSE",
"chars": 1549,
"preview": "BSD License\n\nFor Zstandard software\n\nCopyright (c) Meta Platforms, Inc. and affiliates. All rights reserved.\n\nRedistribu"
},
{
"path": "Makefile",
"chars": 16392,
"preview": "# ################################################################\n# Copyright (c) Meta Platforms, Inc. and affiliates.\n"
},
{
"path": "Package.swift",
"chars": 1264,
"preview": "// swift-tools-version:5.0\n// The swift-tools-version declares the minimum version of Swift required to build this packa"
},
{
"path": "README.md",
"chars": 11836,
"preview": "<p align=\"center\"><img src=\"https://raw.githubusercontent.com/facebook/zstd/dev/doc/images/zstd_logo86.png\" alt=\"Zstanda"
},
{
"path": "SECURITY.md",
"chars": 952,
"preview": "# Reporting and Fixing Security Issues\n\nPlease do not open GitHub issues or pull requests - this makes the problem immed"
},
{
"path": "TESTING.md",
"chars": 1824,
"preview": "Testing\n=======\n\nZstandard CI testing is split up into three sections:\nshort, medium, and long tests.\n\nShort Tests\n-----"
},
{
"path": "contrib/VS2005/README.md",
"chars": 154,
"preview": "## Project Support Notice\n\nThe VS2005 Project directory has been moved to the contrib directory in order to indicate tha"
},
{
"path": "contrib/VS2005/fullbench/fullbench.vcproj",
"chars": 9471,
"preview": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"8.00\"\r\n\tName=\""
},
{
"path": "contrib/VS2005/fuzzer/fuzzer.vcproj",
"chars": 10471,
"preview": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"8.00\"\r\n\tName=\""
},
{
"path": "contrib/VS2005/zstd/zstd.vcproj",
"chars": 12175,
"preview": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"8.00\"\r\n\tName=\""
},
{
"path": "contrib/VS2005/zstd.sln",
"chars": 3511,
"preview": "Microsoft Visual Studio Solution File, Format Version 9.00\r\n# Visual C++ Express 2005\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11"
},
{
"path": "contrib/VS2005/zstdlib/zstdlib.vcproj",
"chars": 12119,
"preview": "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"8.00\"\r\n\tName=\""
},
{
"path": "contrib/cleanTabs",
"chars": 140,
"preview": "#!/bin/sh\nsed -i '' $'s/\\t/ /g' ../lib/**/*.{h,c} ../programs/*.{h,c} ../tests/*.c ./**/*.{h,cpp} ../examples/*.c ../"
},
{
"path": "contrib/diagnose_corruption/.gitignore",
"chars": 19,
"preview": "check_flipped_bits\n"
},
{
"path": "contrib/diagnose_corruption/Makefile",
"chars": 1361,
"preview": "# ################################################################\n# Copyright (c) Meta Platforms, Inc. and affiliates.\n"
},
{
"path": "contrib/diagnose_corruption/check_flipped_bits.c",
"chars": 10377,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "contrib/docker/Dockerfile",
"chars": 661,
"preview": "# Dockerfile\n# First image to build the binary\nFROM alpine@sha256:69665d02cb32192e52e07644d76bc6f25abeb5410edc1c7a81a10b"
},
{
"path": "contrib/docker/README.md",
"chars": 368,
"preview": "\n## Requirement\n\nThe `Dockerfile` script requires a version of `docker` >= 17.05\n\n## Installing docker\n\nThe official doc"
},
{
"path": "contrib/freestanding_lib/freestanding.py",
"chars": 28922,
"preview": "#!/usr/bin/env python3\n# ################################################################\n# Copyright (c) Meta Platforms"
},
{
"path": "contrib/linux-kernel/.gitignore",
"chars": 30,
"preview": "!lib/zstd\n!lib/zstd/*\n*.o\n*.a\n"
},
{
"path": "contrib/linux-kernel/Makefile",
"chars": 3592,
"preview": "# ################################################################\n# Copyright (c) Meta Platforms, Inc. and affiliates.\n"
},
{
"path": "contrib/linux-kernel/README.md",
"chars": 874,
"preview": "# Zstd in the Linux Kernel\n\nThis directory contains the scripts needed to transform upstream zstd into the version impor"
},
{
"path": "contrib/linux-kernel/btrfs-benchmark.sh",
"chars": 2640,
"preview": "# !/bin/sh\nset -e\n\n# Benchmarks run on a Ubuntu 14.04 VM with 2 cores and 4 GiB of RAM.\n# The VM is running on a Macbook"
},
{
"path": "contrib/linux-kernel/btrfs-extract-benchmark.sh",
"chars": 2926,
"preview": "# !/bin/sh\nset -e\n\n# Benchmarks run on a Ubuntu 14.04 VM with 2 cores and 4 GiB of RAM.\n# The VM is running on a Macbook"
},
{
"path": "contrib/linux-kernel/decompress_sources.h",
"chars": 1146,
"preview": "/* SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause */\n/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All "
},
{
"path": "contrib/linux-kernel/linux.mk",
"chars": 1483,
"preview": "# SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause\n# ################################################################\n#"
},
{
"path": "contrib/linux-kernel/linux_zstd.h",
"chars": 26154,
"preview": "/* SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause */\n/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All "
},
{
"path": "contrib/linux-kernel/mem.h",
"chars": 6571,
"preview": "/* SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause */\n/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All "
},
{
"path": "contrib/linux-kernel/squashfs-benchmark.sh",
"chars": 1339,
"preview": "# !/bin/sh\nset -e\n\n# Benchmarks run on a Ubuntu 14.04 VM with 2 cores and 4 GiB of RAM.\n# The VM is running on a Macbook"
},
{
"path": "contrib/linux-kernel/test/Makefile",
"chars": 1779,
"preview": "# ################################################################\n# Copyright (c) Meta Platforms, Inc. and affiliates.\n"
},
{
"path": "contrib/linux-kernel/test/include/linux/compiler.h",
"chars": 634,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "contrib/linux-kernel/test/include/linux/errno.h",
"chars": 454,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "contrib/linux-kernel/test/include/linux/kernel.h",
"chars": 637,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "contrib/linux-kernel/test/include/linux/limits.h",
"chars": 458,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "contrib/linux-kernel/test/include/linux/math64.h",
"chars": 498,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "contrib/linux-kernel/test/include/linux/module.h",
"chars": 728,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "contrib/linux-kernel/test/include/linux/printk.h",
"chars": 460,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "contrib/linux-kernel/test/include/linux/stddef.h",
"chars": 458,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "contrib/linux-kernel/test/include/linux/swab.h",
"chars": 516,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "contrib/linux-kernel/test/include/linux/types.h",
"chars": 476,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "contrib/linux-kernel/test/include/linux/unaligned.h",
"chars": 7285,
"preview": "#ifndef ASM_UNALIGNED_H\n#define ASM_UNALIGNED_H\n\n#include <assert.h>\n#include <linux/types.h>\n\n#ifndef __LITTLE_ENDIAN\n#"
},
{
"path": "contrib/linux-kernel/test/include/linux/xxhash.h",
"chars": 21369,
"preview": "/*\n * xxHash - Extremely Fast Hash algorithm\n * Copyright (C) 2012-2016, Yann Collet.\n *\n * BSD 2-Clause License (https:"
},
{
"path": "contrib/linux-kernel/test/macro-test.sh",
"chars": 1055,
"preview": "#!/usr/bin/env sh\n\nset -e\n\nSCRIPT_DIR=$(cd \"$(dirname \"$0\")\" && pwd)\nINCLUDE_DIR=\"$SCRIPT_DIR/../linux/include\"\nLIB_DIR="
},
{
"path": "contrib/linux-kernel/test/static_test.c",
"chars": 1790,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "contrib/linux-kernel/test/test.c",
"chars": 6640,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "contrib/linux-kernel/zstd_common_module.c",
"chars": 965,
"preview": "// SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause\n/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rig"
},
{
"path": "contrib/linux-kernel/zstd_compress_module.c",
"chars": 8973,
"preview": "// SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause\n/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rig"
},
{
"path": "contrib/linux-kernel/zstd_decompress_module.c",
"chars": 3682,
"preview": "// SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause\n/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rig"
},
{
"path": "contrib/linux-kernel/zstd_deps.h",
"chars": 2803,
"preview": "/* SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause */\n/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All "
},
{
"path": "contrib/match_finders/README.md",
"chars": 2233,
"preview": "## Edit Distance Match Finder\n\n```\n/* This match finder leverages techniques used in file comparison algorithms\n * to fi"
},
{
"path": "contrib/match_finders/zstd_edist.c",
"chars": 20325,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "contrib/match_finders/zstd_edist.h",
"chars": 3275,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "contrib/premake/premake4.lua",
"chars": 196,
"preview": "-- Include zstd.lua in your GENie or premake4 file, which exposes a project_zstd function\ndofile('zstd.lua')\n\nsolution '"
},
{
"path": "contrib/premake/zstd.lua",
"chars": 1511,
"preview": "-- This GENie/premake file copies the behavior of the Makefile in the lib folder.\n-- Basic usage: project_zstd(ZSTD_DIR)"
},
{
"path": "contrib/recovery/Makefile",
"chars": 1308,
"preview": "# ################################################################\n# Copyright (c) Meta Platforms, Inc. and affiliates.\n"
},
{
"path": "contrib/recovery/recover_directory.c",
"chars": 5054,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "contrib/seekable_format/README.md",
"chars": 1835,
"preview": "# Zstandard Seekable Format\n\nThe seekable format splits compressed data into a series of independent \"frames\",\neach comp"
},
{
"path": "contrib/seekable_format/examples/.gitignore",
"chars": 112,
"preview": "seekable_compression\nseekable_decompression\nseekable_decompression_mem\nparallel_processing\nparallel_compression\n"
},
{
"path": "contrib/seekable_format/examples/Makefile",
"chars": 1880,
"preview": "# ################################################################\n# Copyright (c) Meta Platforms, Inc. and affiliates.\n"
},
{
"path": "contrib/seekable_format/examples/parallel_compression.c",
"chars": 6968,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "contrib/seekable_format/examples/parallel_processing.c",
"chars": 5262,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "contrib/seekable_format/examples/seekable_compression.c",
"chars": 4869,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "contrib/seekable_format/examples/seekable_decompression.c",
"chars": 3964,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "contrib/seekable_format/examples/seekable_decompression_mem.c",
"chars": 4216,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "contrib/seekable_format/tests/.gitignore",
"chars": 24,
"preview": "seekable_tests\ndata.txt\n"
},
{
"path": "contrib/seekable_format/tests/Makefile",
"chars": 1682,
"preview": "# ################################################################\n# Copyright (c) Meta Platforms, Inc. and affiliates.\n"
},
{
"path": "contrib/seekable_format/tests/seekable_tests.c",
"chars": 13242,
"preview": "#include <stddef.h>\n#include <stdint.h>\n#include <stdlib.h> // malloc\n#include <stdio.h>\n#include <assert.h>\n#include <"
},
{
"path": "contrib/seekable_format/zstd_seekable.h",
"chars": 12080,
"preview": "#ifndef SEEKABLE_H\n#define SEEKABLE_H\n\n#include <stdio.h>\n#include \"zstd.h\" /* ZSTDLIB_API */\n\n#if defined (__cplusplu"
},
{
"path": "contrib/seekable_format/zstd_seekable_compression_format.md",
"chars": 4857,
"preview": "# Zstandard Seekable Format\n\n### Notices\n\nCopyright (c) Meta Platforms, Inc. and affiliates.\n\nPermission is granted to c"
},
{
"path": "contrib/seekable_format/zstdseek_compress.c",
"chars": 10987,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "contrib/seekable_format/zstdseek_decompress.c",
"chars": 21327,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "contrib/seqBench/Makefile",
"chars": 1602,
"preview": "# ################################################################\n# Copyright (c) Meta Platforms, Inc. and affiliates.\n"
},
{
"path": "contrib/seqBench/seqBench.c",
"chars": 1651,
"preview": "#define ZSTD_STATIC_LINKING_ONLY\n#include <zstd.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <assert.h>\n#include <"
},
{
"path": "contrib/snap/snapcraft.yaml",
"chars": 819,
"preview": "name: zstd\nversion: git\nsummary: Zstandard - Fast real-time compression algorithm\ndescription: |\n Zstandard, or zstd as"
},
{
"path": "doc/README.md",
"chars": 1476,
"preview": "Zstandard Documentation\n=======================\n\nThis directory contains material defining the Zstandard format,\nas well"
},
{
"path": "doc/decompressor_errata.md",
"chars": 6183,
"preview": "Decompressor Errata\n===================\n\nThis document captures known decompressor bugs, where the decompressor rejects "
},
{
"path": "doc/decompressor_permissive.md",
"chars": 3011,
"preview": "Decompressor Permissiveness to Invalid Data\n===========================================\n\nThis document describes the beh"
},
{
"path": "doc/educational_decoder/.gitignore",
"chars": 26,
"preview": "# Build artifacts\nharness\n"
},
{
"path": "doc/educational_decoder/Makefile",
"chars": 2213,
"preview": "# ################################################################\n# Copyright (c) Meta Platforms, Inc. and affiliates.\n"
},
{
"path": "doc/educational_decoder/README.md",
"chars": 1727,
"preview": "Educational Decoder\n===================\n\n`zstd_decompress.c` is a self-contained implementation in C99 of a decoder,\nacc"
},
{
"path": "doc/educational_decoder/harness.c",
"chars": 3515,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "doc/educational_decoder/zstd_decompress.c",
"chars": 90617,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "doc/educational_decoder/zstd_decompress.h",
"chars": 2580,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "doc/zstd_compression_format.md",
"chars": 77333,
"preview": "Zstandard Compression Format\n============================\n\n### Notices\n\nCopyright (c) Meta Platforms, Inc. and affiliate"
},
{
"path": "doc/zstd_manual.html",
"chars": 135086,
"preview": "<html>\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=ISO-8859-1\">\n<title>zstd 1.5.7 Manual</title>\n"
},
{
"path": "examples/.gitignore",
"chars": 256,
"preview": "#build\nsimple_compression\nsimple_decompression\nmultiple_simple_compression\ndictionary_compression\ndictionary_decompressi"
},
{
"path": "examples/Makefile",
"chars": 2834,
"preview": "# ################################################################\n# Copyright (c) Meta Platforms, Inc. and affiliates.\n"
},
{
"path": "examples/README.md",
"chars": 1891,
"preview": "Zstandard library : usage examples\n==================================\n\n- [Simple compression](simple_compression.c) :\n "
},
{
"path": "examples/common.h",
"chars": 7444,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "examples/dictionary_compression.c",
"chars": 3617,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "examples/dictionary_decompression.c",
"chars": 3752,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "examples/multiple_simple_compression.c",
"chars": 3780,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "examples/multiple_streaming_compression.c",
"chars": 4455,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "examples/simple_compression.c",
"chars": 2058,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "examples/simple_decompression.c",
"chars": 2311,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "examples/streaming_compression.c",
"chars": 5383,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "examples/streaming_compression_thread_pool.c",
"chars": 6142,
"preview": "/*\n * Copyright (c) Martin Liska, SUSE, Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source c"
},
{
"path": "examples/streaming_decompression.c",
"chars": 3650,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "examples/streaming_memory_usage.c",
"chars": 5837,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "lib/.gitignore",
"chars": 48,
"preview": "# make install artefact\nlibzstd.pc\nlibzstd-nomt\n"
},
{
"path": "lib/BUCK",
"chars": 4480,
"preview": "cxx_library(\n name='zstd',\n header_namespace='',\n exported_headers=['zstd.h'],\n visibility=['PUBLIC'],\n d"
},
{
"path": "lib/Makefile",
"chars": 12014,
"preview": "# ################################################################\n# Copyright (c) Meta Platforms, Inc. and affiliates.\n"
},
{
"path": "lib/README.md",
"chars": 13880,
"preview": "Zstandard library files\n================================\n\nThe __lib__ directory is split into several sub-directories,\ni"
},
{
"path": "lib/common/allocations.h",
"chars": 1623,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "lib/common/bits.h",
"chars": 5953,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "lib/common/bitstream.h",
"chars": 18749,
"preview": "/* ******************************************************************\n * bitstream\n * Part of FSE library\n * Copyright ("
},
{
"path": "lib/common/compiler.h",
"chars": 17173,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "lib/common/cpu.h",
"chars": 5438,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "lib/common/debug.c",
"chars": 1091,
"preview": "/* ******************************************************************\n * debug\n * Part of FSE library\n * Copyright (c) M"
},
{
"path": "lib/common/debug.h",
"chars": 3925,
"preview": "/* ******************************************************************\n * debug\n * Part of FSE library\n * Copyright (c) M"
},
{
"path": "lib/common/entropy_common.c",
"chars": 13308,
"preview": "/* ******************************************************************\n * Common functions of New Generation Entropy libr"
},
{
"path": "lib/common/error_private.c",
"chars": 3905,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "lib/common/error_private.h",
"chars": 6438,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "lib/common/fse.h",
"chars": 30033,
"preview": "/* ******************************************************************\n * FSE : Finite State Entropy codec\n * Public Prot"
},
{
"path": "lib/common/fse_decompress.c",
"chars": 12478,
"preview": "/* ******************************************************************\n * FSE : Finite State Entropy decoder\n * Copyright"
},
{
"path": "lib/common/huf.h",
"chars": 14119,
"preview": "/* ******************************************************************\n * huff0 huffman codec,\n * part of Finite State En"
},
{
"path": "lib/common/mem.h",
"chars": 12939,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "lib/common/pool.c",
"chars": 11611,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "lib/common/pool.h",
"chars": 2569,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "lib/common/portability_macros.h",
"chars": 5613,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "lib/common/threading.c",
"chars": 5158,
"preview": "/**\n * Copyright (c) 2016 Tino Reichardt\n * All rights reserved.\n *\n * You can contact the author at:\n * - zstdmt source"
},
{
"path": "lib/common/threading.h",
"chars": 5112,
"preview": "/**\n * Copyright (c) 2016 Tino Reichardt\n * All rights reserved.\n *\n * You can contact the author at:\n * - zstdmt source"
},
{
"path": "lib/common/xxhash.c",
"chars": 607,
"preview": "/*\n * xxHash - Extremely Fast Hash algorithm\n * Copyright (c) Yann Collet - Meta Platforms, Inc\n *\n * This source code i"
},
{
"path": "lib/common/xxhash.h",
"chars": 262488,
"preview": "/*\n * xxHash - Extremely Fast Hash algorithm\n * Header File\n * Copyright (c) Yann Collet - Meta Platforms, Inc\n *\n * Thi"
},
{
"path": "lib/common/zstd_common.c",
"chars": 1797,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "lib/common/zstd_deps.h",
"chars": 3010,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "lib/common/zstd_internal.h",
"chars": 11058,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "lib/common/zstd_trace.h",
"chars": 4562,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "lib/compress/clevels.h",
"chars": 6860,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "lib/compress/fse_compress.c",
"chars": 24103,
"preview": "/* ******************************************************************\n * FSE : Finite State Entropy encoder\n * Copyright"
},
{
"path": "lib/compress/hist.c",
"chars": 19422,
"preview": "/* ******************************************************************\n * hist : Histogram functions\n * part of Finite St"
},
{
"path": "lib/compress/hist.h",
"chars": 3828,
"preview": "/* ******************************************************************\n * hist : Histogram functions\n * part of Finite St"
},
{
"path": "lib/compress/huf_compress.c",
"chars": 58609,
"preview": "/* ******************************************************************\n * Huffman encoder, part of New Generation Entropy"
},
{
"path": "lib/compress/zstd_compress.c",
"chars": 368434,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "lib/compress/zstd_compress_internal.h",
"chars": 68498,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "lib/compress/zstd_compress_literals.c",
"chars": 9155,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "lib/compress/zstd_compress_literals.h",
"chars": 1613,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "lib/compress/zstd_compress_sequences.c",
"chars": 20004,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "lib/compress/zstd_compress_sequences.h",
"chars": 2224,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "lib/compress/zstd_compress_superblock.c",
"chars": 34085,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "lib/compress/zstd_compress_superblock.h",
"chars": 1168,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "lib/compress/zstd_cwksp.h",
"chars": 28892,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "lib/compress/zstd_double_fast.c",
"chars": 35303,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "lib/compress/zstd_double_fast.h",
"chars": 1767,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "lib/compress/zstd_fast.c",
"chars": 38104,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "lib/compress/zstd_fast.h",
"chars": 1178,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "lib/compress/zstd_lazy.c",
"chars": 104386,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "lib/compress/zstd_lazy.h",
"chars": 9684,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "lib/compress/zstd_ldm.c",
"chars": 29448,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "lib/compress/zstd_ldm.h",
"chars": 4365,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "lib/compress/zstd_ldm_geartab.h",
"chars": 6077,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "lib/compress/zstd_opt.c",
"chars": 71661,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "lib/compress/zstd_opt.h",
"chars": 3046,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "lib/compress/zstd_preSplit.c",
"chars": 8729,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "lib/compress/zstd_preSplit.h",
"chars": 1175,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "lib/compress/zstdmt_compress.c",
"chars": 84195,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "lib/compress/zstdmt_compress.h",
"chars": 4574,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "lib/decompress/huf_decompress.c",
"chars": 77211,
"preview": "/* ******************************************************************\n * huff0 huffman decoder,\n * part of Finite State "
},
{
"path": "lib/decompress/huf_decompress_amd64.S",
"chars": 19676,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "lib/decompress/zstd_ddict.c",
"chars": 9182,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "lib/decompress/zstd_ddict.h",
"chars": 1319,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "lib/decompress/zstd_decompress.c",
"chars": 102400,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "lib/decompress/zstd_decompress_block.c",
"chars": 106416,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "lib/decompress/zstd_decompress_block.h",
"chars": 2682,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "lib/decompress/zstd_decompress_internal.h",
"chars": 9683,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "lib/deprecated/zbuff.h",
"chars": 11501,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "lib/deprecated/zbuff_common.c",
"chars": 1008,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "lib/deprecated/zbuff_compress.c",
"chars": 6770,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "lib/deprecated/zbuff_decompress.c",
"chars": 2082,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "lib/dictBuilder/cover.c",
"chars": 45631,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "lib/dictBuilder/cover.h",
"chars": 4828,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "lib/dictBuilder/divsufsort.c",
"chars": 55876,
"preview": "/*\n * divsufsort.c for libdivsufsort-lite\n * Copyright (c) 2003-2008 Yuta Mori All Rights Reserved.\n *\n * Permission is "
},
{
"path": "lib/dictBuilder/divsufsort.h",
"chars": 2295,
"preview": "/*\n * divsufsort.h for libdivsufsort-lite\n * Copyright (c) 2003-2008 Yuta Mori All Rights Reserved.\n *\n * Permission is "
},
{
"path": "lib/dictBuilder/fastcover.c",
"chars": 28398,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "lib/dictBuilder/zdict.c",
"chars": 44585,
"preview": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed unde"
},
{
"path": "lib/dll/example/Makefile",
"chars": 1473,
"preview": "# ################################################################\n# Copyright (c) Meta Platforms, Inc. and affiliates.\n"
},
{
"path": "lib/dll/example/README.md",
"chars": 2956,
"preview": "# ZSTD Windows binary package\n\n## The package contents\n\n- `zstd.exe` : Command Line Utility, supporting gzip-like argume"
}
]
// ... and 309 more files (download for full content)
About this extraction
This page contains the full source code of the facebook/zstd GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 509 files (6.5 MB), approximately 1.7M tokens, and a symbol index with 4125 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.