Skip to content

Commit dc11c38

Browse files
committed
Stripped leading zeros from packed string construction.
1 parent 742e436 commit dc11c38

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

arch/INFLATE.LUA

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ function inflate(r, w, z)
193193
-- cl = clen
194194
-- le = lens
195195
-- ch = chuff
196-
local hl, hd, hc, od, cl, le, ch = bs.r(5) + 257, bs.r(5) + 1, bs.r(4) + 4, "\016\017\018\000\008\007\009\006\010\005\011\004\012\003\013\002\014\001\015", {}, {}
196+
local hl, hd, hc, od, cl, le, ch = bs.r(5) + 257, bs.r(5) + 1, bs.r(4) + 4, "\16\17\18\0\8\7\9\6\10\5\11\4\12\3\13\2\14\1\15", {}, {}
197197

198198
for i = 1, 19 do cl[i] = 0 end
199199
for i = 1, hc do cl[od:byte(i) + 1] = bs.r(3) end
@@ -227,9 +227,9 @@ function inflate(r, w, z)
227227
-- dix = distance extra bits (1 byte per entry)
228228
-- dib = distance base (packed 32-bit LE)
229229
local lex, dix, dib =
230-
"\003\000\004\000\005\000\006\000\007\000\008\000\009\000\010\000\011\001\013\001\015\001\017\001\019\002\023\002\027\002\031\002\035\003\043\003\051\003\059\003\067\004\083\004\099\004\115\004\131\005\163\005\195\005\227\005\002\000",
231-
"\000\000\000\000\001\001\002\002\003\003\004\004\005\005\006\006\007\007\008\008\009\009\010\010\011\011\012\012\013\013\014\014\015\015\016\016\017\017\018\018\019\019\020\020\021\021\022\022\023\023\024\024\025\025\026\026\027\027\028\028\029\029\030\030",
232-
"\001\000\000\000\002\000\000\000\003\000\000\000\004\000\000\000\005\000\000\000\007\000\000\000\009\000\000\000\013\000\000\000\017\000\000\000\025\000\000\000\033\000\000\000\049\000\000\000\065\000\000\000\097\000\000\000\129\000\000\000\193\000\000\000\001\001\000\000\129\001\000\000\001\002\000\000\001\003\000\000\001\004\000\000\001\006\000\000\001\008\000\000\001\012\000\000\001\016\000\000\001\024\000\000\001\032\000\000\001\048\000\000\001\064\000\000\001\096\000\000\001\128\000\000\001\192\000\000\001\000\001\000\001\128\001\000\001\000\002\000\001\128\002\000\001\000\004\000\001\128\004\000\001\000\008\000\001\128\008\000\001\000\016\000\001\128\16\000\001\000\032\000\001\128\032\000\001\000\064\000\001\128\064\000\001\000\128\000\001\128\128\000\001\000\000\001\001\128\000\001\001\000\000\002\001\128\000\002\001\000\000\004\001\128\000\004\001\000\000\008\001\128\000\008\001\000\000\016\001\128\000\016\001\000\000\032\001\128\000\032\001\000\000\064\001\128\000\064\001\000\000\128\001\128\000\128\001\000\000\000\192"
230+
"\3\0\4\0\5\0\6\0\7\0\8\0\9\0\10\0\11\1\13\1\15\1\17\1\19\2\23\2\27\2\31\2\35\3\43\3\51\3\59\3\67\4\83\4\99\4\115\4\131\5\163\5\195\5\227\5\2\0",
231+
"\0\0\0\0\1\1\2\2\3\3\4\4\5\5\6\6\7\7\8\8\9\9\10\10\11\11\12\12\13\13\14\14\15\15\16\16\17\17\18\18\19\19\20\20\21\21\22\22\23\23\24\24\25\25\26\26\27\27\28\28\29\29\30\30",
232+
"\1\0\0\0\2\0\0\0\3\0\0\0\4\0\0\0\5\0\0\0\7\0\0\0\9\0\0\0\13\0\0\0\17\0\0\0\25\0\0\0\33\0\0\0\49\0\0\0\65\0\0\0\97\0\0\0\129\0\0\0\193\0\0\0\1\1\0\0\129\1\0\0\1\2\0\0\1\3\0\0\1\4\0\0\1\6\0\0\1\8\0\0\1\12\0\0\1\16\0\0\1\24\0\0\1\32\0\0\1\48\0\0\1\64\0\0\1\96\0\0\1\128\0\0\1\192\0\0\1\0\1\0\1\128\1\0\1\0\2\0\1\128\2\0\1\0\4\0\1\128\4\0\1\0\8\0\1\128\8\0\1\0\16\0\1\128\16\0\1\0\32\0\1\128\32\0\1\0\64\0\1\128\64\0\1\0\128\0\1\128\128\0\1\0\0\1\1\128\0\1\1\0\0\2\1\128\0\2\1\0\0\4\1\128\0\4\1\0\0\8\1\128\0\8\1\0\0\16\1\128\0\16\1\0\0\32\1\128\0\32\1\0\0\64\1\128\0\64\1\0\0\128\1\128\0\128\1\0\0\0\192"
233233

234234
while true do
235235
-- s = sym

0 commit comments

Comments
 (0)