From 421b562d27b4b7e6d69f4e53fd787c3c9925ef74 Mon Sep 17 00:00:00 2001 From: neauoire Date: Sun, 19 Nov 2023 11:15:59 -0800 Subject: [PATCH] (lz) Larger buffer --- cli/lz/ako10x10.chr | Bin 0 -> 4096 bytes cli/lz/ako10x10.chr.ulz | Bin 0 -> 2430 bytes cli/lz/build.sh | 6 ++++++ cli/lz/ulzenc.tal | 17 +++++++---------- 4 files changed, 13 insertions(+), 10 deletions(-) create mode 100644 cli/lz/ako10x10.chr create mode 100644 cli/lz/ako10x10.chr.ulz diff --git a/cli/lz/ako10x10.chr b/cli/lz/ako10x10.chr new file mode 100644 index 0000000000000000000000000000000000000000..571b2d0e5ff7b96f074078bdf0f5546a5c99f3f8 GIT binary patch literal 4096 zcmcgvZ*1Gf6+c;)Xe&;rcG2eakLk8S60pE*Y{=%It*Ied`=y3S($m zc-~`R;f3?%n;~y?c}`%NF8DzLYDeW!>1hbEo%9p87gx*j%ekVq*if zsZ9h#&_-c6#LrF!LJ2V;&J6qdK_#$_kE8zQIM!va*Xb-Qkr-W?kTC73NE{Q}9~W!C z<@rT8-j%@p7iK;hBg8|3;im#dp(ccewZs>|iGry z4+ZSiHd=4g+0Smre%!%bbbov(5u*P3L;dJ)R2)S-x_fjtjK{?b-@EXN7(Wo-8`~=< z#PLJ#KK+~T0{eJpyfem&4?e}elzSF}@Ze-k-Kf2v@dMN!*ialwoJJh#5ApVRV$2>7 z^#e7_Gzv2|TaO>091s%{;@!L`17_atOjHnu<6_Ot3PwX>eKZ;b_5;t2&nwhlz*hr@ zf{*B^1WyNAn5$^W2j%fYzwP+YG<4WKjW<6=x_0e<`-xEh-d&%(bKutxhguFx+_mi1 z{?2AXl9}T2?BwWJi{$b90=__y{Nb734`j1v&xT`R8TWMQAIBT^9930cU2At3Fxzo$ z$*8Eg)*y}&^6*z$4l9yrZhfw^8D}KM_%TS6Cqq0&qbv632**j1Wi?Q1;@oS?a^P*a ztba`Bg*0P%Wi{Qi+(w>QEG zLRjw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x10.chr.ulz b/cli/lz/ako10x10.chr.ulz new file mode 100644 index 0000000000000000000000000000000000000000..4c1162ac55a341b2f3d28fcfefcebb1f26db59df GIT binary patch literal 2430 zcmW+%e{dVc72dm(ZYA0A%1%Tae)vpbNGb-LmZnVx;uAv}{sC-?E-5pmPKxm`E{$PQ z3Yj{-y_5VSt{Wv2%s6RgRJKfyv``-7yZx^u$LMVbrp^~qZtCqcS<3?dE=k-KdkTZ%o2k98u6uTVrtWTl! zYm0gyI6vbHB$cExr@MP0BxxPxB4X+}!cB&C59*8%UPY6dhes%+5mHknJo$7&aXrdK zLy2&b8V$v{562PWkU#XK&o1(sA-Is+N813(58>+2)(Nn%JN10}7(rpp6(J}Xk%UV@ zB{8H}+&FgzIo_({cK6!A(DX~+e5ZrB>(6<*MZOG#e(>V~$R4+eav`p_t> zvnA4orXYrOgAXJF@MdqISAPJFQu3YAEu&kKNhP72e(v-^CGkw+vB}41QkmNQhadd@ zM@llB=uC7@29<9-8GJSWf&w=)yk|7hg`R;cp^32G8}Qp32u9vSA13F*UI_Le*K?y_pfj3GE~P|_hM%&{Z?~wJU9-Wcp?xCK&|1)zr`d;RT-<-ALI}S zD$?+4!ngg))Cl(v&!EH`Bs(N|l2D$_LDwP#$IMC^K4A1W6umYdNL9-#=icOeNZ@!; z9P#fFVv;O}=pJF1Nb)OQSIM&N>dPKi$u!Lpvmc&SRapiBJ^q?3OB)Y=o`1*8FS-sBus0o>a)TW(jl5xyXQDJpBrYSxLSc(%1N) zDY|}{bDW`qyEqq%_a7J{0?E!wLm9-VAF)FOqHCDAXuD&TqXgULFebCH;V5bBUdiRt znRuH^6h#6gt?da=2K-WLi(bInbNHZL#X4_`1 z>h#xa)3mJZXa2g~kOu~unv48?}DnG>{+uiI^Cr+8N)q{nd0fokoo zLIiGW)oS^dFW(-G3;Ef&K@W{&w9p~K)s~?K+e*tr5=v|PhRFJpM~)sl_QmJc~ zW)JG<1K2UrN2_2Vmd@&%QB24DG9wyx&oQ@Cxfwn9O~x{e8HxcdG+C8Z%VpF2;vLIc zUN~r3);80&e{PzK{zcQ)AK(i6qbh%sIa(ufNBzFLN6x}Lif9N?P8bK$nct%vHjcra{Ty&K1hGcfyNEDZKm9(z8_WbNaLob z6EFvh`aDg$S9dW5A0mxY%0ixyc-)W$jAQAzWDJiYhwkSLRYQ~wJ)z4QdH`6jS=D?2 zpm7{0;27rU$l-Jz3lPU$7 zP=IYNFT^CMGnFsUJ~vIBo5@{^9;29M#z^#CTBnl+=rt4#o6)Z1uIXJey-ZJXvK;jt zLT)3T&KGUkA*8ZJlQweZVicMwq*vi!o(O;Y4^EU=Mah&=@1E3TmyEE39f+F%|@Y;}E9q)li^cHW`MI zPRHYt6qkT>2TWC?q8pN1hOGY<2f^FDa26b6$cEGD$2CVs0*Kb3j}pfo=x_P>;>Xjw zUi!tI7oXS(U>K=XDl3)TN^XC-RLa3P$!OXIxgh67IM&dwp5oM^c0(u@JKxjsn2cl{ zxg<%FB~Y#f_NZjDS<@;l*rH2 zPO>qyY78xnfx)&maFhNUu`Yg?2pZ;w+&XTWm>B!G z=X(!rIO;urwdbBjf34?Zz_y*?<4?tWqCj_&*JySKG&*)LRt}K18I>25sP(V-EC1;r!v)0 zje!sL?%jJ2MdYRIfjTh}Lmxk`E_ace_6Jr_{*Ca2s$O8^V_>S)eKTU>{;r|24 C`D=Cn literal 0 HcmV?d00001 diff --git a/cli/lz/build.sh b/cli/lz/build.sh index dbbc581..11a2cad 100755 --- a/cli/lz/build.sh +++ b/cli/lz/build.sh @@ -52,9 +52,15 @@ echo "Result(Uxn):" cat b.bin echo "" +echo "" +echo "Image Encoding" +./ulzenc ako10x10.chr ako10x10.chr.ulz +uxncli ulzenc.rom ako10x10.chr ako10x10.chr.ulz + rm ./ulzdec rm ./ulzenc rm ./a.ulz rm ./b.bin rm ./ulzdec.rom +rm ./ulzenc.rom rm *.sym diff --git a/cli/lz/ulzenc.tal b/cli/lz/ulzenc.tal index e52bfa1..4ac1d5e 100644 --- a/cli/lz/ulzenc.tal +++ b/cli/lz/ulzenc.tal @@ -5,9 +5,9 @@ |0000 + @pad $2 @src $30 @dst $30 - @ptr $1 @match-len $2 @output-ptr $2 @match-ctl $2 @@ -55,9 +55,9 @@ ;compressed .File/write DEO2 ( | summary ) ;dict/decompressed - ;src + ;src / ;dict/spacer - ;dst + ;dst / [ LIT2 "( 18 ] DEO .output-ptr LDZ2 ;compressed SUB2 ;dict/bytes @@ -101,6 +101,7 @@ ( res ) LDA STHr NEQ ?&end-for2 INC2 ORAk ?&for2 &end-for2 ( | i > match_len ) + DUP2 .match-len LDZ2 LTH2 ?{ DUP2 .match-len STZ2 .dict-data LDZ2 .dict-best STZ2 } @@ -172,11 +173,6 @@ STA JMP2r -@getc ( -- b ) - #0001 .File/length DEO2 - ;&b .File/read DEO2 - [ LIT &b $1 ] JMP2r - @ ( str* -- ) &w LDAk #18 DEO INC2 & LDAk ?&w @@ -204,7 +200,8 @@ &spacer 20 "-> 20 $1 &bytes 20 "bytes $1 -@raw $4000 +@raw $8000 + +@compressed -@compressed $4000