Skip to main content

cendor-squeeze

Shrink verbose context — JSON, logs, code, prose — without throwing anything away. Compression returns a handle; the original is always restorable. Content-aware: each type gets a purpose-built, deterministic compressor — no LLM, no model download, byte-reproducible.

Up to ~99% smaller on repetition-heavy logs (~50% on structured data), 100% reversible — no ML dependency, deterministic output.

PyPI license · pip install cendor-squeeze

Using an AI coding assistant? npx @cendor/init (TS) / uvx cendor-init (Python) wires it up — or point it at cendor.ai/docs/for-ai-assistants.

from cendor.squeeze import compress

small, handle = compress(huge_json, kind="auto")                 # detect + route
small, handle = compress(source_code, kind="code", fidelity="aggressive")
small, handle = compress(logs, kind="logs", target_tokens=400)   # compress to a budget
original = handle.expand()                                        # restore, byte-for-byte

Highlights

  • Four purpose-built compressors — JSON (minify + drop nulls; budget-shrink drops keys/elements structurally, staying valid JSON), logs (normalize timestamps/UUIDs/IPs/hex/integers + dedup repeats into (×N), chronological), code (strip comments — string-aware, so a // or # inside a literal stays put; keeps preprocessor & shebang), prose (extractive, abbreviation-aware sentence splitting). detect() auto-routes.
  • Compress to a budget — target_tokens is never exceeded; fidelity="lossless" | "balanced" | "aggressive". No LLM, no download, byte-reproducible.
  • 100% reversible — a content-addressed store (deduped by hash) keeps every original; handle.expand() restores it byte-for-byte no matter how hard you squeeze.
  • Survives restarts — handle.to_dict() / Handle.from_dict() next to a durable squeeze.store.SQLiteStore; or a bounded MemoryStore(max_items=…) via use_store(...).
  • The deterministic default, swappable — wired through core's Compressor protocol (not a hard import), so contextkit.use_compressor(...) can replace it globally with any backend (even a heavier ML compressor). squeeze stays the pick for reproducible, offline, audit-friendly output.

Inbound — usually contextkit calls it for you (Block(evict="compress")). Ratios are content-dependent (logs compress most, structured JSON least) — see the benchmarks.

See docs/squeeze.md · CHANGELOG. Part of the Cendor stack — github.com/cendorhq/cendor-libs. Powered by PowerAI Labs. Apache-2.0; provided "as is", without warranty — use at your own risk (LICENSE §7–8).

Metadata

Release files for cendor-squeeze 1.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cendor-squeeze 1.1.2
File Size Uploaded
cendor_squeeze-1.1.2.tar.gz 26.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cendor-squeeze 1.1.2
File Interpreter ABI Platform
cendor_squeeze-1.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 47.2 kB

Release files / cendor_squeeze-1.1.2.tar.gz

Download URL cendor_squeeze-1.1.2.tar.gz
Size 26.4 kB
Tags Source
SHA-256 checksum
How to use checksums
3c07642e240e15ab23267286aa889cbde44d6bc547ffee081e2ee48a8b1718f6
BLAKE2b-256 checksum
How to use checksums
5c087064a97f8b0b92e841ec0dd18f7d564f22f378b728453629c355868482a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 1, 2026.

Transparency log

Release files / cendor_squeeze-1.1.2-py3-none-any.whl

Download URL cendor_squeeze-1.1.2-py3-none-any.whl
Size 20.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8e16fa071272169da83f3b26a0e51732779b1238e359b0d27b72d319ed66b694
BLAKE2b-256 checksum
How to use checksums
627a294c9bfca136393cd2bb1b6ee8b521eceeb62bf622be1f436d42dcc10461
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 1, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.1.2 This release

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page