Shared
Codec
LZ77 and LZH (Deflate) compression for large payloads — available manually or as an opt-in flag on any App route.
Import
local Codec = RoExpress.Codec
encode
Compress
Compress a string with LZ77 or LZH (Deflate). Check whether a buffer is already compressed before trying to compress again.
Codec.Compress · Codec.IsCompressed
→
decode
Decompress
Decompress a previously compressed buffer. The Network layer calls this automatically when a route uses compress = true, so you rarely need to call it manually.
Codec.Decompress
→
opt-in
Route Integration
Add compress = true to any route options and App handles the rest. The client decompresses automatically — no client-side API changes needed.
{ compress = true } on routes
→
See also
Stream | binary typed channels (better for structured high-frequency data) ·
Base64 | encoding utility used internally by Codec ·
App | options.compress route flag ·
Inventory Example | large payload compression