Skip to content

Conversation

@rzikm
Copy link
Member

@rzikm rzikm commented Dec 19, 2025

Contributes to #59591.

This PR adds the zstd library source in the repo. The source is taken verbatim from the current latest release (1.5.7). The code is submitted separately from the C# wrapper implementation for two reasons:

  • to make the implementation PR smaller and easier to review
  • to keep the verbatim copy in a separate commit to make the git history easier to understand

Copilot AI review requested due to automatic review settings December 19, 2025 15:49
@rzikm
Copy link
Member Author

rzikm commented Dec 19, 2025

cc @jkotas.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds the zstd library source code to the repository, taken verbatim from the current latest release (1.5.7). The implementation is separated from the C# wrapper to facilitate review.

Key changes:

  • Adds complete zstd compression library source files (version 1.5.7)
  • Includes common utilities, compression, and decompression modules
  • Adds build configuration and supporting files

Reviewed changes

Copilot reviewed 126 out of 198 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/native/external/zstd/lib/compress/huf_compress.c Huffman encoder implementation for compression
src/native/external/zstd/lib/compress/hist.h Histogram function declarations
src/native/external/zstd/lib/compress/hist.c Histogram function implementations for symbol counting
src/native/external/zstd/lib/compress/fse_compress.c Finite State Entropy encoder implementation
src/native/external/zstd/lib/compress/clevels.h Pre-defined compression level parameters
src/native/external/zstd/lib/common/zstd_trace.h Tracing infrastructure for performance monitoring
src/native/external/zstd/lib/common/zstd_internal.h Internal definitions shared across compression/decompression
src/native/external/zstd/lib/common/zstd_deps.h Common library dependencies abstraction layer
src/native/external/zstd/lib/common/zstd_common.c Common utility functions implementation
src/native/external/zstd/lib/common/xxhash.c xxHash algorithm implementation wrapper
src/native/external/zstd/lib/common/threading.h Cross-platform threading abstraction
src/native/external/zstd/lib/common/threading.c Threading implementation for Windows/POSIX
src/native/external/zstd/lib/common/portability_macros.h Platform detection and feature support macros
src/native/external/zstd/lib/common/pool.h Thread pool interface declarations
src/native/external/zstd/lib/common/pool.c Thread pool implementation for multi-threading
src/native/external/zstd/lib/common/mem.h Memory I/O operations and type definitions
src/native/external/zstd/lib/common/huf.h Huffman codec public API declarations
src/native/external/zstd/lib/common/fse_decompress.c Finite State Entropy decoder implementation
src/native/external/zstd/lib/common/fse.h FSE codec public API and static linking definitions
src/native/external/zstd/lib/common/error_private.h Internal error handling macros and utilities
src/native/external/zstd/lib/common/error_private.c Error string definitions and retrieval
src/native/external/zstd/lib/common/entropy_common.c Common entropy coding functions (FSE/HUF)
src/native/external/zstd/lib/common/debug.h Debug logging and assertion macros
src/native/external/zstd/lib/common/debug.c Debug level global variable definition
src/native/external/zstd/lib/common/cpu.h CPU feature detection via cpuid
src/native/external/zstd/lib/common/allocations.h Custom memory allocation primitives
src/native/external/zstd/lib/.gitignore Git ignore rules for build artifacts
src/native/external/zstd/build/single_file_libs/zstddeclib-in.c Single-file decompressor amalgamation template
src/native/external/zstd/build/single_file_libs/examples/shell.html Emscripten shell template for web examples
src/native/external/zstd/build/cmake/tests/.gitignore Git ignore rules for CMake test artifacts

@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-io-compression
See info in area-owners.md if you want to be subscribed.

@rzikm rzikm enabled auto-merge (squash) December 19, 2025 20:51
@rzikm rzikm merged commit 379d100 into main Dec 20, 2025
150 of 152 checks passed
@jkotas jkotas deleted the zstd-native-src-only branch December 20, 2025 02:36
@rzikm rzikm restored the zstd-native-src-only branch December 22, 2025 14:20
@rzikm rzikm deleted the zstd-native-src-only branch December 22, 2025 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants