Skip to content

v1.7.2 — Compression without a bundled package

Back to all updates
v1.7.2August 24, 2026

Compress is Twill’s own code end to end, and never reads past the end of a stream.

Compress no longer relies on a bundled package

Section titled “Compress no longer relies on a bundled package”

Compress used to hand its work to the bundled BytePress package, which is now removed. The serializer and the entropy coder are Twill modules, Compress.Serializer and Compress.Lzw.

Encode, Decode and the byte format are unchanged, so a value already stored in a DataStore reads back the same:

local packed = Twill.Compress.Encode(save)
local restored = Twill.Compress.Decode(packed)

A saved payload can arrive truncated, altered in place, or shaped by someone who means the server harm. Every read now checks the bytes it is about to take before taking them.

  • A stream that is too short, nested too deep, or tagged with something unknown returns nil instead of reading past its end.
  • A payload crafted to drive the reader into unbounded recursion is refused at a fixed depth instead of exhausting the stack.
  • A Color3 channel is rounded to its nearest 8-bit step instead of floored, which halves the largest error a stored colour can carry.
  • The entropy coder rebuilds its dictionary once it fills, so a long payload whose repetition changes partway through keeps compressing.

Every change in this release is listed in the changelog.