The best standalone JSON/NDJSON compressor. Beats zstd and brotli on every file.
Project description
datacortex
Python bindings for DataCortex, the best standalone JSON/NDJSON compressor.
Beats zstd-19 and brotli-11 on every JSON file tested.
Install
pip install datacortex
Usage
import datacortex
# Compress bytes
compressed = datacortex.compress(json_bytes, mode="fast")
original = datacortex.decompress(compressed)
# Compress files
datacortex.compress_file("data.json", "data.dcx", mode="fast")
datacortex.decompress_file("data.dcx", "output.json")
# Inspect compressed data
info = datacortex.info(compressed)
# {'mode': 'fast', 'format': 'json', 'original_size': 435889, ...}
# Detect format
fmt = datacortex.detect_format(json_bytes)
# 'json', 'ndjson', 'generic', etc.
Modes
"fast"(default) - Best for JSON/NDJSON. Uses format-aware preprocessing + zstd/brotli."balanced"- Context mixing engine. Better on general text, slower."max"- Maximum compression. Slowest.
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
datacortex-0.5.0.tar.gz
(174.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file datacortex-0.5.0.tar.gz.
File metadata
- Download URL: datacortex-0.5.0.tar.gz
- Upload date:
- Size: 174.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
235317e29dbe40340fa9e2df6b39721cd534bd628e7168c91413571b1a886684
|
|
| MD5 |
038a412394d03bf77a5f3d5b962caabb
|
|
| BLAKE2b-256 |
092fc752c5150aca8206f5f68743478b63b46f2167f82457dea9ed66bf0a2810
|
File details
Details for the file datacortex-0.5.0-cp39-cp39-macosx_11_0_arm64.whl.
File metadata
- Download URL: datacortex-0.5.0-cp39-cp39-macosx_11_0_arm64.whl
- Upload date:
- Size: 1.4 MB
- Tags: CPython 3.9, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aaf298b85724877e26e055ca3a20bb7892648e5aa6f6a4061fbe1d156c991297
|
|
| MD5 |
2bd8bec5c61805a1730e75a5e027eb39
|
|
| BLAKE2b-256 |
d78236d23762e9e01d67c3ba18b8a314c3a550809454fa122f9cb7b53a0bd927
|