perf: brotli bit refill reads a u32

This commit is contained in:
4DBug committed 2026-11-01 19:51:01 -06:00
1 parent dbca9d5670
commit 53290f0e0c
1 file changed
+7
@@ -202,6 +202,13 @@ function Decode.decompress(src: buffer, off: number, len: number, maxBytes: numb
local bb, bc = 0, 0
local function fill()
if bc <= 24 and ip + 4 <= lim then
bb = bor(bb, lshift(readu32(src, ip), bc))
local nb = rshift(32 - bc, 3)
ip += nb
bc += nb * 8
return
end
while bc <= 24 do
local byte = 0
if ip < lim then