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.4.1.tar.gz
(163.7 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.4.1.tar.gz.
File metadata
- Download URL: datacortex-0.4.1.tar.gz
- Upload date:
- Size: 163.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
36bf009388aa587084758bd9debc65b43ca7e42060ca6ebe6489395d4c105597
|
|
| MD5 |
2f3e2c6ff34462417f93a67f2634d1eb
|
|
| BLAKE2b-256 |
cb90efdf47115310094846e2f9764d04498ef6f30370c79e075618c1e097b135
|
File details
Details for the file datacortex-0.4.1-cp39-cp39-macosx_11_0_arm64.whl.
File metadata
- Download URL: datacortex-0.4.1-cp39-cp39-macosx_11_0_arm64.whl
- Upload date:
- Size: 1.3 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 |
37c983560ecbcc0980add266daa19ed46ce85130f9bf07b3824265da3676ba5e
|
|
| MD5 |
ffb1b436f20a70d61ba986244e883ef9
|
|
| BLAKE2b-256 |
1dc4c410001e203ff4255eeb530bb83705be70b86601b97bbad92312caf7fc65
|