build: regenerate bundles after the audio perf pass

This commit is contained in:
4DBug committed 2026-11-01 20:38:20 -06:00
1 parent a5a03ecb8d
commit c0766614bc
4 files changed
+1757 -1215

No files matched your search

+25 -2
View File
@@ -29541,10 +29541,33 @@ for i = 0, 255 do
CRC16[i + 1] = d
end
-- slice-by-4: C1 = CRC16; Ck[i] = the CRC16 state after i (high byte) and k - 1 zero bytes
local C1, C2, C3, C4 = table.create(256, 0), table.create(256, 0), table.create(256, 0), table.create(256, 0)
for i = 0, 255 do
C1[i + 1] = CRC16[i + 1]
end
for i = 0, 255 do
local c = C1[i + 1]
c = bxor(band(lshift(c, 8), 0xFFFF), C1[rshift(c, 8) + 1])
C2[i + 1] = c
c = bxor(band(lshift(c, 8), 0xFFFF), C1[rshift(c, 8) + 1])
C3[i + 1] = c
c = bxor(band(lshift(c, 8), 0xFFFF), C1[rshift(c, 8) + 1])
C4[i + 1] = c
end
local function crc16(b, from, to)
local c = 0
for i = from, to - 1 do
c = bxor(band(lshift(c, 8), 0xFFFF), CRC16[bxor(rshift(c, 8), readu8(b, i)) + 1])
local i = from
-- four bytes w (big-endian) at a time: the state is linear, so the new state is the xor of each byte of
-- (c << 16) ~ w pushed through 4, 3, 2 and 1 table steps
while i + 4 <= to do
local x = bxor(lshift(c, 16), byteswap(readu32(b, i)))
c = bxor(bxor(C4[rshift(x, 24) + 1], C3[band(rshift(x, 16), 255) + 1]), bxor(C2[band(rshift(x, 8), 255) + 1], C1[band(x, 255) + 1]))
i =i+ 4
end
for j = i, to - 1 do
c = bxor(band(lshift(c, 8), 0xFFFF), CRC16[bxor(rshift(c, 8), readu8(b, j)) + 1])
end
return c
end