(lz) Faster encoding
This commit is contained in:
parent
cd51f8e559
commit
6a3ca87e97
|
@ -10,7 +10,6 @@
|
||||||
@dst $30
|
@dst $30
|
||||||
@match-len $2
|
@match-len $2
|
||||||
@output-ptr $2
|
@output-ptr $2
|
||||||
@match-ctl $2
|
|
||||||
@dict-best $2
|
@dict-best $2
|
||||||
@combine $2
|
@combine $2
|
||||||
@dict-data $2
|
@dict-data $2
|
||||||
|
@ -119,14 +118,14 @@
|
||||||
|
|
||||||
@op-cpy ( in* -- )
|
@op-cpy ( in* -- )
|
||||||
( | More numeric range: treat 0 as 4, 1 as 5, etc. )
|
( | More numeric range: treat 0 as 4, 1 as 5, etc. )
|
||||||
.match-len LDZ2 #0004 SUB2 .match-ctl STZ2
|
.match-len LDZ2 #0004 SUB2
|
||||||
( | CPY2 )
|
( | CPY2 )
|
||||||
.match-ctl LDZ2 #003f GTH2 ?&cpy2
|
DUP2 #003f GTH2 ?&cpy2
|
||||||
( | *output_ptr++ = match_ctl | 0x80; )
|
( | *output_ptr++ = match_ctl | 0x80; )
|
||||||
.match-ctl LDZ2 NIP #80 ORA <append-byte>
|
NIP #80 ORA <append-byte>
|
||||||
!&cpy-resume
|
!&cpy-resume
|
||||||
&cpy2 ( -- )
|
&cpy2 ( match-ctl* -- )
|
||||||
.match-ctl LDZ2 SWP #c0 ORA <append-byte>
|
SWP #c0 ORA <append-byte>
|
||||||
<append-byte>
|
<append-byte>
|
||||||
&cpy-resume ( -- )
|
&cpy-resume ( -- )
|
||||||
( | *output_ptr++ = in - dict_best - 1; )
|
( | *output_ptr++ = in - dict_best - 1; )
|
||||||
|
|
Loading…
Reference in New Issue