SDK Download - Rust Compression SDK
A local SDK built on the self-developed Rust compression engine, exporting standard interfaces via FFI, supporting multi-language calls including C/C++ and Python, suitable for desktop applications, server-side batch processing, and embedded integration scenarios
SDK Introduction
A compression engine SDK developed in Rust, exported via FFI, supporting multi-language calls
Memory Safety
Rust's native memory safety guarantees prevent common C/C++ issues like buffer overflows and dangling pointers, ensuring stable and reliable long-term operation.
High Performance
Multi-threaded parallel processing with zero-cost abstractions, delivering leading compression throughput, ideal for high-concurrency server-side scenarios.
Cross-Platform
Unified codebase compiles to Linux, macOS, and Windows dynamic libraries. Integrate once, run on multiple platforms.
Multi-Language FFI
Standard C ABI exports, callable directly via FFI from C/C++, Python, Node.js, Go, and other languages.
SDK Download List
Select the pre-compiled dynamic library or language binding package for your platform. Latest version v1.2.0
| Platform | File | Architecture | Size | Version | Download |
|---|---|---|---|---|---|
| Linux | libcompressor.so | x86_64 / arm64 | ~8MB | v1.2.0 | Download |
| macOS | libcompressor.dylib | x86_64 / arm64 | ~9MB | v1.2.0 | Download |
| Windows | compressor.dll | x86_64 | ~10MB | v1.2.0 | Download |
| Python | uglypear-compressor | pip install | ~2MB | v1.2.0 | Download |
Note: Dynamic libraries require the compressor.h header file; the Python package can be installed directly via pip install uglypear-compressor.
C FFI Header File
compressor.h provides standard C ABI interfaces. The main exported functions are as follows
compress_file
Compress a single file. Takes input path, output path, and quality parameters, returns a compression result struct (including compression ratio, output size, etc.).
decompress_file
Decompress a file. Restores the compressed file to its original state, maintaining content integrity and quality.
get_version
Returns the current SDK version string, useful for runtime validation and logging.
Python Binding Usage Example
After installing uglypear-compressor, compress files in just a few lines of code
from uglypear_compressor import Compressor
comp = Compressor()
result = comp.compress_file("input.pdf", quality="high")
print(f"Compression ratio: {result.ratio}%")
C Language Example
Include the compressor.h header file and link the dynamic library to call compression interfaces in C programs
#include "compressor.h"
int main() {
CompressResult result = compress_file("input.pdf", "output.pdf", QUALITY_HIGH);
printf("Compression ratio: %.1f%%\n", result.compression_ratio);
return 0;
}
Build Guide
To compile the dynamic library from Rust/SDK source code, you need to install the Rust toolchain first
1. Install Rust Toolchain
Install the stable toolchain via rustup and configure the cargo and rustc environment variables.
2. Get SDK Source Code
Download and extract the SDK source package. The source code is organized as a dynamic library crate, including the FFI export layer.
3. Compile Dynamic Library
Run cargo build --release to generate the optimized dynamic library (.so/.dylib/.dll) and integrate it with the header file.
4. Authorization & Integration
After configuring authorization credentials, load the dynamic library in your target application and call the compression interfaces.
Version History
Summary of major SDK version updates. For detailed changes, please see the changelog
| Version | Release Date | Key Changes |
|---|---|---|
| v1.2.0 | 2026-07-15 | Added batch compression interface, usage statistics interface, 30% PDF compression speed improvement |
| v1.1.0 | 2026-06-01 | Added OFD format compression, encrypted compression password parameter, Python SDK async operations |
| v1.0.0 | 2026-04-15 | SDK official release, supporting PDF/image/Office document compression, multi-language FFI exports |
Download the SDK to Start Integrating
Get pre-compiled dynamic libraries and header files, or install the Python binding package via pip to quickly integrate compression capabilities into your application