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.3.9.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.3.9.tar.gz.
File metadata
- Download URL: datacortex-0.3.9.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 |
0248b5baef973951d8f4fbd037ae2e9ab655f5a9097c3ed3aaeaa99fc09174d4
|
|
| MD5 |
512733741cb0b8ed81a53c858f4032b3
|
|
| BLAKE2b-256 |
f35bcde4fc57a06113c9aeb8110d64ed6b0d55683f4c603638c58d543067a945
|
File details
Details for the file datacortex-0.3.9-cp39-cp39-macosx_11_0_arm64.whl.
File metadata
- Download URL: datacortex-0.3.9-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 |
e09e6bdf0aad77da62d860a2a997d5b6c5cdad28517ea3de55cc0cd3a4c1b3e1
|
|
| MD5 |
b501ee2db35e2521bdd2930123914caa
|
|
| BLAKE2b-256 |
5bc5972d449a73c77e66e68067eef15605d31c512e1043b55e0ad08253786a08
|