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.0.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.0.tar.gz.
File metadata
- Download URL: datacortex-0.4.0.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 |
31c47962583e28b3407c0819df59fa744ec64615e709b829aab23b16239986f4
|
|
| MD5 |
281a199c53100efd5dba521b75b828bc
|
|
| BLAKE2b-256 |
5fc2bbfaf001c49cbc979bb06a3291c3851bcdfcb0fcfb6176f75e649926137d
|
File details
Details for the file datacortex-0.4.0-cp39-cp39-macosx_11_0_arm64.whl.
File metadata
- Download URL: datacortex-0.4.0-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 |
553dd2a4e7f78730beed723a9893ac63fc5c79ec1eeef7980d98221419b1cc1b
|
|
| MD5 |
f0bf8e2371e7cb9f3dece151bec196ef
|
|
| BLAKE2b-256 |
7abc7504fbec9d47501b5d4bbda2c3010d94ff8eebe5a6dbd794f48859bf1c6e
|