Skip to main content

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.3.tar.gz (165.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

datacortex-0.4.3-cp39-cp39-macosx_11_0_arm64.whl (1.3 MB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

File details

Details for the file datacortex-0.4.3.tar.gz.

File metadata

  • Download URL: datacortex-0.4.3.tar.gz
  • Upload date:
  • Size: 165.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.12.6

File hashes

Hashes for datacortex-0.4.3.tar.gz
Algorithm Hash digest
SHA256 c9f9dcb0a023d291a277b482b35504fb0f55f64ac6f6b0bda313988ad8b5d672
MD5 dab29da3f51af458f618d880e51a23ef
BLAKE2b-256 2b637a5ada10343117b6426a2089d2fe2c8b22c2673d01788dc48e4b93fc0f15

See more details on using hashes here.

File details

Details for the file datacortex-0.4.3-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for datacortex-0.4.3-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b709ccd7ec91132bcaf9850b0473fc7cf191e6d1f36db14f27fbeed2c61fde31
MD5 2d895b3d71c973472692b9bdebe55621
BLAKE2b-256 a3068cb668f4b0ec426218f1a39cc32dda4576c7d1d2ebac24d00166e9c882bd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page