perf: brotli bit refill reads a u32
This commit is contained in:
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
|
||||
|
||||
Reference in new issue
Block a user