mirror of
https://github.com/storytold/effectcraft.git
synced 2026-10-31 05:27:08 -06:00
encode_pulses rebuilt the full V(n, k) table with saturating u64 adds for every coded band and summed the prefixes through a closure. Build the table once (n <= 176, k <= 128, saturated at u32::MAX, 91 KB) and sum the prefixes over a contiguous row slice. Shapes outside that range, which the band layout never produces, fall back to a local table. The unused scratch Vec is gone from BandEnc. The bitstream is unchanged; a test keeps the old per-call encoder and compares the coded bytes on random codewords over the whole (n, k) range. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>