Skip to content

Conversation

denisgolius
Copy link
Contributor

@denisgolius denisgolius commented Jan 23, 2025

This PR will add:

  1. riscv64 architecture support by adding native zstd lib.
  2. Update zig builder docker image to the latest stable zig version in docker which is 0.13.0 , see Check my updated fork euantorano/docker-zig#3

@denisgolius
Copy link
Contributor Author

cc @f41gh7

Copy link
Collaborator

@f41gh7 f41gh7 left a comment

Choose a reason for hiding this comment

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

LGTM

GrigoryEvko added a commit to GrigoryEvko/gozstd that referenced this pull request Aug 2, 2025
…ng codebase

Integrated community contributions:
- PR valyala#49: CGO wrapper improvements for 5-7% performance gain on large buffers
  - Use void* instead of uintptr_t to avoid memory allocations
  - Direct Go slice usage via reflect.SliceHeader
- PR valyala#25: Advanced Compression API with checksum support
  - Added CCtx type for advanced compression contexts
  - Added SetParameter/GetParameter methods
  - Added Reset and Compress2 methods
  - Full support for all ZSTD compression parameters
- PR valyala#63: Exposed CompressDictLevel as public API
  - Allows fine-grained control over dictionary compression levels
- PR valyala#66: RISC-V 64-bit architecture support
  - Updated Zig builder to 0.13.0
  - Added linux_riscv64 target
- PR valyala#60: Memory-optimized dictionary functions
  - Added NewCDictByRef/NewDDictByRef to avoid data copying
  - Reduces memory usage for large dictionaries

Infrastructure improvements:
- Created modern Dockerfile with Alpine Linux and latest Zig
- Fixed build process issues with clean target
- Updated minimum Go version to 1.24

Code organization:
- Moved Docker configs to build/docker/
- Moved scripts to scripts/
- Moved upstream zstd to contrib/
- Moved test data to test/
- Created comprehensive examples in examples/
- Kept all Go source files in root for package compatibility

Testing enhancements:
- Added Silesia Corpus compression tests with speed measurements
- Created 33 aggressive fuzz tests targeting known vulnerabilities
- Added comprehensive tests for Advanced API
- Added benchmarks comparing raw zstd vs wrapper performance

The wrapper now shows 6-10% performance improvements for compression
while maintaining identical compression ratios.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants