PROTOCOL NOTES
Inspectable packets.
Verifiable recovery.
This browser demonstration implements the EDS v2 packet format used by the Python tester. It produces real packets you can download and decode in the desktop application.
Packet layout
8 bytes ASCII magic: EDS_PKT2
4 bytes Manifest byte length, unsigned little-endian
N bytes Canonical UTF-8 JSON manifest
Remaining Encoded payloadThe manifest identifies version 2, the selected method, original byte length, payload byte length, and SHA-256 of the original data. The browser serializes manifest keys in sorted order. Complete packet size includes all framing and JSON bytes.
| Method | Payload |
|---|---|
| raw | Original bytes without compression. |
| gzip | GZIP of the original bytes. |
| dictionary | GZIP of a byte-preserving dictionary token stream. |
Auto compares complete candidates and selects the smallest. Equal sizes keep the earlier method in raw, GZIP, dictionary order. Metadata overhead matters especially for small inputs.
Dictionary encoding
The browser uses the shipped telemetry_v1 definition from the desktop project. It expands dictionary macros into byte patterns, then matches the longest pattern at each position.
Any byte except 0x1B Literal byte
0x1B 0x00 Literal 0x1B
0x1B 0x01 [u16 little] Dictionary token IDText such as [P_SKY] remains ordinary input text unless an actual expanded dictionary pattern matches. Dictionary packets reference the definition's ID, version, and canonical JSON SHA-256. The browser decoder accepts only its shipped definition; the desktop also supports custom definitions and embedded custom dictionary metadata.
Download the exact demo dictionary.
Recovery and integrity
- Validate magic, header bounds, version, declared lengths, and the supported method.
- For dictionary packets, validate dictionary identity and fingerprint.
- Decompress within the declared output limit and expand tokens where required.
- Compare recovered length and SHA-256 with the manifest.
- For the live demo, independently compare every recovered byte with the original input.
SHA-256 detects changes in this workflow. It does not authenticate the sender, and EDS v2 packet compression does not encrypt payloads. Use an appropriate authenticated transport and security design for production integrations.
Browser and desktop behavior
The browser uses native Compression Streams and Web Crypto SHA-256 inside a module worker. It requires HTTPS or localhost and a supporting browser. Different GZIP implementations can produce different packet bytes and sizes while remaining losslessly compatible.
The browser input limit is 8 MiB. Desktop defaults are 16 MiB input and 64 MiB recovered output. The browser UI does not import arbitrary packets; its exported v2 packets can be imported through the desktop Compressor / Decompressor. Legacy v1 dictionary/GZIP payloads and EDS model containers are separate formats.
Decode an exported browser packet
# From the installed desktop project environment:
edsddcp decode browser-output.eds_packet recovered.bin
# Or use Compressor / Decompressor → Import packet.
# Choose a v2 method, not the explicit Legacy v1 mode.
What is and is not measured
Candidate sizes and recovery checks come from real operations. Timing is one local instrumented run, affected by hardware, browser, worker startup, system load, and data. It is not a universal throughput claim. Use the desktop repeated benchmark workflow to characterize performance and variability.
The 68.70% marketing reference is specific to the included synthetic mixed dataset and the desktop Python GZIP level-9 path. It is not a claim that dictionary encoding always beats GZIP. The UI identifies whichever method actually wins.
