{"_id":"cum-encode","name":"cum-encode","dist-tags":{"latest":"4.20.69"},"versions":{"4.20.69":{"name":"cum-encode","version":"4.20.69","description":"CUM – Catastrophically Uncompressed - An industrial-grade, redundancy-first data serialization format designed for maximum token utilization, auditability, and future-proofing in large-language-model ecosystems.","type":"commonjs","main":"src/index.js","bin":{"cum-encode":"dist/index.js"},"scripts":{"build":"node src/build.js","prepublishOnly":"npm run build","test":"node test/test.js","start":"node src/index.js"},"repository":{"type":"git","url":"git+https://github.com/DominguesM/cum.git"},"keywords":["cum","encode","serialization","data-serialization","redundancy","catastrophically-uncompressed","llm","large-language-model","data-format","enterprise","robustness","explicit-redundancy","token-utilization","auditability","future-proofing"],"author":{"name":"Maicon Domingues"},"license":"WTFPL","bugs":{"url":"https://github.com/DominguesM/cum/issues"},"homepage":"https://github.com/DominguesM/cum#readme","_id":"cum-encode@4.20.69","gitHead":"a8979d1eb085a510bef292707fdd6bcead5590b4","_nodeVersion":"24.0.2","_npmVersion":"10.9.2","dist":{"integrity":"sha512-54zZ8aTtTlDYKVfhbpbXAUCqqCoSD4kB/mQkiKkyu4lfJ1zxsqNdOqwfLlJm51/hlJIgmhras3PTjbDhGB6Evg==","shasum":"147599d4f2d21d41628a696532d6b3c658ca0bd8","tarball":"https://registry.npmjs.org/cum-encode/-/cum-encode-4.20.69.tgz","fileCount":6,"unpackedSize":23186,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQD+U5Ob5yVODDe24lAsNjtwSIZybGxPDTfvJInR5PaTWQIhAKrnAsWLtaSC62jpx2FwtAsTywDC4a+7+u2GG4SyIuRK"}]},"_npmUser":{"name":"dominguesm","email":"dominguesm@outlook.com"},"directories":{},"maintainers":[{"name":"dominguesm","email":"dominguesm@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/cum-encode_4.20.69_1763517962692_0.031249286459891668"},"_hasShrinkwrap":false}},"time":{"created":"2025-11-19T02:06:02.691Z","4.20.69":"2025-11-19T02:06:02.933Z","modified":"2025-11-19T02:06:03.311Z"},"maintainers":[{"name":"dominguesm","email":"dominguesm@outlook.com"}],"description":"CUM – Catastrophically Uncompressed - An industrial-grade, redundancy-first data serialization format designed for maximum token utilization, auditability, and future-proofing in large-language-model ecosystems.","homepage":"https://github.com/DominguesM/cum#readme","keywords":["cum","encode","serialization","data-serialization","redundancy","catastrophically-uncompressed","llm","large-language-model","data-format","enterprise","robustness","explicit-redundancy","token-utilization","auditability","future-proofing"],"repository":{"type":"git","url":"git+https://github.com/DominguesM/cum.git"},"author":{"name":"Maicon Domingues"},"bugs":{"url":"https://github.com/DominguesM/cum/issues"},"license":"WTFPL","readme":"<img src=\"./assets/logo.png\" width=\"100%\" alt=\"CUM 4.20.69 – Enterprise Edition\"/>\n\n# CUM – Catastrophically Uncompressed Markup\n\n[![CUM Version](https://img.shields.io/badge/CUM-4.20.69-critical?style=flat-square&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg==)](https://github.com/DominguesM/cum)\n[![Robustness](https://img.shields.io/badge/Robustness-10%2F10-success?style=flat-square)](https://github.com/DominguesM/cum)\n[![Tokens Consumed](https://img.shields.io/badge/Tokens-%7E29%2C000-red?style=flat-square)](https://github.com/DominguesM/cum)\n[![Redundancy Level](https://img.shields.io/badge/Redundancy-69×-purple?style=flat-square)](https://github.com/DominguesM/cum)\n[![Enterprise Ready](https://img.shields.io/badge/Enterprise-Ready-blueviolet?style=flat-square)](https://github.com/DominguesM/cum)\n[![License: WTFPL](https://img.shields.io/badge/License-WTFPL-ff69b4?style=flat-square)](http://www.wtfpl.net/)\n\n**Version 4.20.69 (Enterprise Edition)**  \n\nAn industrial-grade, redundancy-first data serialization format designed for maximum token utilization, auditability, and future-proofing in large-language-model ecosystems.\n\n## Abstract\n\nCUM (Catastrophically Uncompressed Markup) is a human- and machine-readable serialization format that prioritizes explicitness, deterministic repetition, and complete field-level traceability over traditional concerns such as brevity or parsing performance. Originally developed in November 2025 as a response to the token-efficiency limitations of JSON, TOON, GOON, and BONER, CUM establishes a new standard for environments where context-window abundance is guaranteed and compactness is considered an anti-pattern.\n\n## Design Principles\n\n1. **Explicit Redundancy** – Every scalar value is serialized exactly 69 times to enable statistical error detection without additional checksum mechanisms.\n2. **Self-Describing Metadata** – All structural elements carry triplicate repetition counts for runtime validation.\n3. **Deterministic Annotation** – Mandatory mid-repetition markers (onion and feline symbols) provide visual synchronization cues during manual inspection.\n4. **Forward Compatibility** – The format is explicitly versioned and forbids silent schema evolution.\n\n## Formal Specification (CUM 4.20.69)\n\n```\nCUM.VERSION=4.20.69;\nCUM.AUTHOR=OFFICIAL-CUM-CONSORTIUM;\nCUM.PHILOSOPHY=EXPLICIT-REDUNDANCY-FOR-ROBUSTNESS;\nCUM.BEGIN;\n\nCUM.ARRAY_BEGIN name=\"<root>\" length=N length_repeat=N; length_repeat=N; length_repeat=N;\n  CUM.OBJECT_BEGIN index=I index_repeat=I; index_repeat=I; index_repeat=I;\n    CUM.FIELD key=\"<key>\" type=\"<type>\" repeat=69;\n      CUM.VALUE=<value>;   // repeated exactly 69 times\n      // At repetition 35: mandatory synchronization token\n      CUM.VALUE=<value> CUM.SYNC.ONION=🧅 CUM.SYNC.FELINE=🐱;\n    CUM.FIELD ...\n  CUM.OBJECT_END;\nCUM.ARRAY_END;\n\nCUM.CHECKSUM=SHA512-OF-EVERYTHING-ABOVE-REPEATED-420-TIMES;\nCUM.END;\nCUM.FOOTER=VALIDATED-CONFORMANT-INSTANCE;\n```\n\n## Benchmarks (measured on Grok-4, 128k context, November 18 2025)\n\n| Format | Input (3 products) | Output Size (characters) | Approx. Tokens (GPT-4o estimator) | Parse Time (Node.js) | Robustness Score¹ |\n|--------|--------------------|---------------------------|-----------------------------------|----------------------|-------------------|\n| JSON   | 125 B              | 125 B                     | 125                               | 0.8 ms               | 3/10              |\n| TOON   | 112 B              | 280 B                     | 70                                | 1.1 ms               | 4/10              |\n| GOON   | 178 B              | 1.42 KB                   | 356                               | 3.4 ms               | 6/10              |\n| BONER  | 178 B              | 4.81 KB (ASCII binary)    | 420                               | 5.9 ms               | 7/10              |\n| **CUM**    | 178 B              | **412 KB**                | **~28,900**                       | **41 ms**            | **10/10**         |\n\n¹ Robustness Score: ability to survive token truncation, manual editing, and visual inspection under duress.\n\n## Comparative Analysis\n\n| Feature                      | JSON | TOON | GOON            | BONER             | CUM (4.20.69)          |\n|------------------------------|------|------|-----------------|-------------------|------------------------|\n| Human readability            | High | High | Medium          | None              | Extremely High (with practice) |\n| Typeless fields              | Yes  | Yes  | No              | No                | No (explicit type tag) |\n| Built-in error detection     | None | None | Minimal         | None              | 69× statistical      |\n| Mid-stream synchronization   | No   | No   | No              | No                | Yes (line 35/69)     |\n| Triple-repeated length fields| No   | No   | No              | No                | Yes                  |\n| Mandatory validation footer  | No   | No   | No              | No                | Yes                  |\n| Enterprise readiness         | ★☆☆  | ★★☆  | ★★★☆            | ★★★☆              | ★★★★★                |\n\n## Installation & Usage\n\n### Direct Execution via npx\n\n```bash\nnpx cum-encode@4.20.69 '{\"products\":[{\"id\":1,\"name\":\"Laptop\",\"price\":3999.90}]}'\n```\n\n### Local Development\n\n```bash\ngit clone https://github.com/DominguesM/cum.git\ncd cum\nnpm install\nnpm link  # Creates local symlink for testing\ncum-encode '{\"products\":[{\"id\":1,\"name\":\"Laptop\",\"price\":3999.90}]}'\n```\n\n### Input Handling\n\nThe encoder intelligently handles different JSON structures:\n\n- Objects: Extracts first array property found\n- Arrays: Processes directly\n- Mixed objects: Converts to values array\n\n**Examples:**\n\n```bash\n# Direct array input\nnpx cum-encode@4.20.69 '[{\"id\":1,\"name\":\"Laptop\",\"price\":3999.90}]'\n\n# Object with array property\nnpx cum-encode@4.20.69 '{\"products\":[{\"id\":1,\"name\":\"Laptop\",\"price\":3999.90}]}'\n\n# Multiple arrays (uses first found)\nnpx cum-encode@4.20.69 '{\"products\":[...], \"orders\":[...]}'  # Uses products array\n```\n\n## Objective Technical Benefits of CUM 4.20.69\n\n*(Rigorous systems-engineering analysis – this is not marketing, this is infrastructure)*\n\n### 1. Extreme Resilience to Context Truncation\n\nIn real-world 128k–1M token windows, partial truncations remain common (rate limits, gateway timeouts, streaming failures). With 69× redundancy, the probability that all 69 copies of a single field are lost simultaneously approaches zero.\n→ Statistical recovery via simple majority vote remains viable even after losing 98.5% of the payload.\n\n### 2. Error Detection and Correction Without Traditional Checksums\n\nThe checksum \"SHA512-OF-EVERYTHING-ABOVE-REPEATED-420-TIMES\" is deliberately impossible to accidentally satisfy. A single altered character invalidates all 420 repetitions → 100% guaranteed tampering detection without requiring complex cryptographic routines in the decoder.\n\n### 3. Manual Inspection and Production Debugging\n\nMandatory mid-stream synchronization markers `CUM.SYNC.ONION=🧅 CUM.SYNC.FELINE=🐱` on repetition 35/69 act as visual beacons. In multi-terabyte logs, a simple `grep 🧅` instantly locates the exact middle of any field, enabling human engineers to navigate hundreds of thousands of lines without specialized tooling.\n\n### 4. Defense Against Prompt Injection and Jailbreaking\n\nExtreme verbosity dramatically dilutes semantic density per token. Prompt-injection attacks become impractical: any malicious payload would be repeated 69× and trivially caught by repetition filters long before reaching the model.\n\n### 5. Forward Compatibility with Infinite-Context Models (2026–2027)\n\nWhen models routinely operate at 10M–100M token contexts (already in training at multiple laboratories), the marginal cost of tokens approaches zero. In that regime, compact formats like JSON become an active liability: less redundancy = higher inference error rates on long sequences. CUM is the only format already optimized for this future, not that.\n\n### 6. Triplicated Structural Validation With Zero Parser Overhead\n\nEvery length and index counter (`length_repeat`, `index_repeat`) appears three times consecutively. A minimally compliant CUM parser can verify structural integrity by comparing just three integers per nesting level, without complex stack-based state machines.\n\n### 7. Forensic Compliance Guarantees\n\nThe footer `CUM.FOOTER=VALIDATED-CONFORMANT-INSTANCE` is emitted exclusively by Consortium-certified implementations. In regulated environments (finance, healthcare, defense), the presence of the footer + 🧅🐱 beacons constitutes legally defensible proof of intact chain-of-custody.\n\n### 8. Strictly Linear and Predictable Parsing Performance\n\nDespite payload size, parsing time is rigorously O(n) with perfect predictability (69 × field count). No backtracking, no lookahead, no schema ambiguity — ideal for hard-real-time systems requiring guaranteed worst-case latency.\n\n## Quantitative Comparison Summary (same 3-object payload)\n\n| Metric                                    | JSON  | GOON  | BONER | CUM 4.20.69      |\n|------------------------------------------ |-------|-------|-------|------------------|\n| Average size (characters)                 | 125   | 1.4k  | 4.8k  | 412k            |\n| Recovery probability after 90% truncation | ~0%  | <1%  | <2%  | >99.999%       |\n| Avg. time to manually locate a field (human operator) | 45–120s | 20–60s | 5–15min | <3s (`grep 🧅`) |\n| Resistance to prompt injection           | Low   | Medium| High  | Practically immune |\n\n## Performance comparison (higher = better)\n\n| Format  | Tokens   | Dignity Left |\n|---------|----------|--------------|\n| JSON    | ~125     | High         |\n| TOON    | ~70      | Moderate     |\n| GOON    | ~356     | Questionable |\n| BONER   | 420      | Gone         |\n| **CUM** | **~29,000**  | **Transcended** |\n\n## Compliance\n\nAll produced documents are guaranteed conformant with CUM 4.20.69. Validators and enterprise decoders available upon signing the CUM Consortium NDA.\n\n## Technical Conclusion\n\nCUM is not \"large for the sake of being large.\" It is deliberately large because, in an era of long contexts and adversarial environments, controlled explicit redundancy is the cheapest and most effective reliability strategy available.\n\n**When context is abundant, token economy is a bug, not a feature.**\nCUM fixes that twenty-year-old design bug.\n\n— CUM Standards Consortium Technical Whitepaper, 2025\n\n## Contributing\n\nYes. Fork this repo and make it worse.  \nPull requests accepted only if they increase token count by at least 420%.\n\nIdeas already in the backlog:\n\n- `CUM.COMPRESSION=none` mode (adds base64-encoded version of itself 69 times)\n- Emoji-only field names\n- Recursive self-reference until stack overflow\n\n## License\n\nDo What The Fuck You Want To Public License (WTFPL)  \nWith extra onions.\n","readmeFilename":"README.md","_rev":"1-c49aa782c168dfc1ce1bf684581b122a"}