Skip to content

uniabis/lzee

Repository files navigation

LZEe - LZE enhancement for Z80

LZE Copyright (C)1995,2008 GORRY.

Porting for Z80 by Kei Moroboshi 2017/SEP.

LZEe - LZE enhancement for Z80 by uniabis LZEee - LZE extra enhancement for Z80 by uniabis

License:zlib license or original LZE license

Description

LZEe is file compressor/decompressor derived from LZE.

LZEe is designed to be effective with fast depacking on Z80 machines.

Usage

Usage: lzee [option] {command} {infile} {outfile}

  {command}
    e : Encode without header
    E : Encode with header
    d : Decode without header
    D : Decode with header

  [option]
    f[format]...

  [format]
    1 : lze
    2 : LZEe(default)
    3 : LZEXE
    4 : LZEee f4(obsoleted)
    5 : LZEee f5
    r : Force without header

 header is unpacked size in big endian 32bit integer

Compression rate

test data:DEOCM-PLD-CV BIOS(16x16KB)

Packer ALL MEGASDHC.B00 MEGASDHC.B01 MEGASDHC.B02 MEGASDHC.B03 MSX2MAIN.B00 MSX2MAIN.B01 MSXMUSIC.B00 MSX2EXT.B00 KANJJ1.B00 KANJJ1.B01 KANJJ1.B02 KANJJ1.B03 KANJJ1.B04 KANJJ1.B05 KANJJ1.B06 KANJJ1.B07
ApLib
(OaPACK)
161,422
(61.58%)
9,367
(57.17%)
4,926
(30.07%)
12,594
(76.87%)
12,340
(75.32%)
12,835
(78.34%)
13,579
(82.88%)
10,048
(61.33%)
12,361
(75.45%)
6,222
(37.98%)
4,090
(24.96%)
10,834
(66.13%)
10,642
(64.95%)
10,519
(64.20%)
10,453
(63.80%)
10,815
(66.01%)
9,797
(59.80%)
Bitbuster Extreme 172,080
(65.64%)
9,830
(60.00%)
5,133
(31.33%)
13,188
(80.49%)
12,856
(78.47%)
13,293
(81.13%)
14,088
(85.99%)
10,551
(64.40%)
13,013
(79.43%)
6,683
(40.79%)
4,507
(27.51%)
11,785
(71.93%)
11,599
(70.79%)
11,542
(70.45%)
11,493
(70.15%)
11,778
(71.89%)
10,741
(65.56%)
Exomizer2
(-P0)
160,011
(61.04%)
9,373
(57.21%)
4,902
(29.92%)
12,494
(76.26%)
12,297
(75.05%)
12,740
(77.76%)
13,402
(81.80%)
10,068
(61.45%)
12,351
(75.38%)
6,097
(37.21%)
3,975
(24.26%)
10,688
(65.23%)
10,510
(64.15%)
10,415
(63.57%)
10,348
(63.16%)
10,650
(65.00%)
9,701
(59.21%)
Exomizer3
(-P7)
160,007
(61.04%)
9,373
(57.21%)
4,902
(29.92%)
12,494
(76.26%)
12,297
(75.05%)
12,739
(77.75%)
13,402
(81.80%)
10,068
(61.45%)
12,351
(75.38%)
6,097
(37.21%)
3,974
(24.26%)
10,688
(65.23%)
10,509
(64.14%)
10,415
(63.57%)
10,347
(63.15%)
10,650
(65.00%)
9,701
(59.21%)
hruST
(oh1c -r)
162,217
(61.88%)
9,369
(57.18%)
4,895
(29.88%)
12,563
(76.68%)
12,282
(74.96%)
12,768
(77.93%)
13,454
(82.12%)
10,079
(61.52%)
12,331
(75.26%)
6,434
(39.27%)
4,230
(25.82%)
10,940
(66.77%)
10,753
(65.63%)
10,679
(65.18%)
10,597
(64.68%)
10,906
(66.56%)
9,937
(60.65%)
lz4
(lz4ultra)
191,416
(73.02%)
10,833
(66.12%)
5,794
(35.36%)
14,742
(89.98%)
14,290
(87.22%)
14,837
(90.56%)
15,448
(94.29%)
11,630
(70.98%)
14,578
(88.98%)
8,088
(49.37%)
5,431
(33.15%)
13,003
(79.36%)
12,732
(77.71%)
12,673
(77.35%)
12,535
(76.51%)
12,972
(79.17%)
11,830
(72.20%)
lz48 198,227
(75.62%)
10,717
(65.41%)
5,752
(35.11%)
14,588
(89.04%)
14,250
(86.98%)
14,268
(87.08%)
15,305
(93.41%)
12,121
(73.98%)
14,074
(85.90%)
8,167
(49.85%)
5,532
(33.76%)
14,290
(87.22%)
14,024
(85.60%)
13,960
(85.21%)
13,952
(85.16%)
14,179
(86.54%)
13,048
(79.64%)
lz49 195,027
(74.40%)
10,628
(64.87%)
5,559
(33.93%)
14,512
(88.57%)
14,030
(85.63%)
14,196
(86.65%)
15,254
(93.10%)
11,980
(73.12%)
13,969
(85.26%)
7,824
(47.75%)
5,240
(31.98%)
13,985
(85.36%)
13,761
(83.99%)
13,717
(83.72%)
13,674
(83.46%)
13,920
(84.96%)
12,778
(77.99%)
LZE
(lzee f1r)
174,118
(66.42%)
10,088
(61.57%)
5,459
(33.32%)
13,468
(82.20%)
13,183
(80.46%)
13,694
(83.58%)
14,385
(87.80%)
10,826
(66.08%)
13,299
(81.17%)
7,023
(42.86%)
4,660
(28.44%)
11,692
(71.36%)
11,489
(70.12%)
11,369
(69.39%)
11,279
(68.84%)
11,630
(70.98%)
10,574
(64.54%)
LZEee
(lzee f5)
174,118
(66.42%)
10,088
(61.57%)
5,459
(33.32%)
13,468
(82.20%)
13,183
(80.46%)
13,694
(83.58%)
14,385
(87.80%)
10,826
(66.08%)
13,299
(81.17%)
7,023
(42.86%)
4,660
(28.44%)
11,692
(71.36%)
11,489
(70.12%)
11,369
(69.39%)
11,279
(68.84%)
11,630
(70.98%)
10,574
(64.54%)
LZEXE
(lzee f3)
174,132
(66.43%)
10,089
(61.58%)
5,460
(33.33%)
13,469
(82.21%)
13,184
(80.47%)
13,695
(83.59%)
14,386
(87.81%)
10,828
(66.09%)
13,300
(81.18%)
7,023
(42.86%)
4,660
(28.44%)
11,692
(71.36%)
11,490
(70.13%)
11,370
(69.40%)
11,280
(68.85%)
11,631
(70.99%)
10,575
(64.54%)
lzsa1
(-f1)
182,295
(69.54%)
10,338
(63.10%)
5,391
(32.90%)
14,043
(85.71%)
13,703
(83.64%)
14,087
(85.98%)
14,892
(90.89%)
11,047
(67.43%)
13,719
(83.73%)
7,316
(44.65%)
4,804
(29.32%)
12,544
(76.56%)
12,252
(74.78%)
12,189
(74.40%)
12,075
(73.70%)
12,507
(76.34%)
11,388
(69.51%)
lzsa2
(-f2)
167,502
(63.90%)
9,670
(59.02%)
5,091
(31.07%)
13,125
(80.11%)
12,803
(78.14%)
13,291
(81.12%)
14,057
(85.80%)
10,339
(63.10%)
12,806
(78.16%)
6,421
(39.19%)
4,249
(25.93%)
11,288
(68.90%)
11,056
(67.48%)
10,936
(66.75%)
10,848
(66.21%)
11,275
(68.82%)
10,247
(62.54%)
megalz 167,609
(63.94%)
9,718
(59.31%)
5,124
(31.27%)
12,965
(79.13%)
12,660
(77.27%)
13,072
(79.79%)
13,917
(84.94%)
10,407
(63.52%)
12,833
(78.33%)
6,514
(39.76%)
4,320
(26.37%)
11,362
(69.35%)
11,161
(68.12%)
11,016
(67.24%)
11,012
(67.21%)
11,281
(68.85%)
10,247
(62.54%)
pletter 167,494
(63.89%)
9,706
(59.24%)
5,083
(31.02%)
12,945
(79.01%)
12,700
(77.51%)
13,205
(80.60%)
13,909
(84.89%)
10,466
(63.88%)
12,858
(78.48%)
6,511
(39.74%)
4,269
(26.06%)
11,340
(69.21%)
11,105
(67.78%)
10,992
(67.09%)
10,908
(66.58%)
11,252
(68.68%)
10,245
(62.53%)
shrinkler 153,168
(58.43%)
8,984
(54.83%)
4,680
(28.56%)
12,148
(74.15%)
11,916
(72.73%)
12,276
(74.93%)
13,100
(79.96%)
9,536
(58.20%)
11,820
(72.14%)
5,728
(34.96%)
3,700
(22.58%)
10,212
(62.33%)
10,020
(61.16%)
9,876
(60.28%)
9,808
(59.86%)
10,148
(61.94%)
9,216
(56.25%)
shrinkler(NP) 152,324
(58.11%)
8,912
(54.39%)
4,644
(28.34%)
12,092
(73.80%)
11,844
(72.29%)
12,176
(74.32%)
13,020
(79.47%)
9,516
(58.08%)
11,772
(71.85%)
5,664
(34.57%)
3,656
(22.31%)
10,164
(62.04%)
9,980
(60.91%)
9,840
(60.06%)
9,756
(59.55%)
10,116
(61.74%)
9,172
(55.98%)
zx7 170,296
(64.96%)
9,781
(59.70%)
5,080
(31.01%)
13,104
(79.98%)
12,784
(78.03%)
13,224
(80.71%)
14,021
(85.58%)
10,515
(64.18%)
12,943
(79.00%)
6,532
(39.87%)
4,401
(26.86%)
11,623
(70.94%)
11,436
(69.80%)
11,337
(69.20%)
11,331
(69.16%)
11,612
(70.87%)
10,572
(64.53%)
zx7b 170,425
(65.01%)
9,762
(59.58%)
5,091
(31.07%)
13,103
(79.97%)
12,810
(78.19%)
13,248
(80.86%)
14,002
(85.46%)
10,495
(64.06%)
12,964
(79.13%)
6,591
(40.23%)
4,424
(27.00%)
11,629
(70.98%)
11,451
(69.89%)
11,327
(69.13%)
11,341
(69.22%)
11,601
(70.81%)
10,586
(64.61%)
zx7mini
(back)
190,540
(72.69%)
10,580
(64.58%)
5,702
(34.80%)
14,358
(87.63%)
14,064
(85.84%)
14,015
(85.54%)
15,267
(93.18%)
12,073
(73.69%)
13,874
(84.68%)
7,390
(45.10%)
4,921
(30.04%)
13,428
(81.96%)
13,182
(80.46%)
13,091
(79.90%)
13,039
(79.58%)
13,311
(81.24%)
12,245
(74.74%)

Decompression speed

test data:DEOCM-PLD-CV BIOS(16x16KB)

packer unpacker unpacker size packed size unpacking clocks
ApLib aplib156b 156 161,422
(61.57%)
59,168,483
(LDIR x 9.81)
ApLib aplib247b 249 161,422
(61.57%)
35,485,949
(LDIR x 5.88)
ApLib aplib247b_180_minimal 152 161,422
(61.57%)
44,514,579
(LDIR x 7.38)
ApLib aplib247b_180_small 171 161,422
(61.57%)
34,169,981
(LDIR x 5.66)
ApLib aplib247b_180_fast 234 161,422
(61.57%)
32,552,096
(LDIR x 5.39)
ApLib unaplib_fast 235 161,422
(61.57%)
29,350,495
(LDIR x 4.86)
ApLib unaplib_fast_180 233 161,422
(61.57%)
29,636,463
(LDIR x 4.91)
ApLib unaplib_small 139 161,422
(61.57%)
45,350,252
(LDIR x 7.52)
BitbusterExtreme debitbust 89 172,080
(65.64%)
35,875,562
(LDIR x 5.95)
BitbusterExtreme debitbustp1 88 172,080
(65.64%)
32,099,423
(LDIR x 5.32)
BitbusterExtreme debitbustp2 96 172,080
(65.64%)
26,884,565
(LDIR x 4.45)
Exomizer2 deexo 169 160,011
(61.03%)
108,490,817
(LDIR x 17.99)
Exomizer2 deexo_180 166 160,011
(61.03%)
108,490,229
(LDIR x 17.99)
Exomizer2 deexo_180_fast_jp 176 160,011
(61.03%)
92,969,945
(LDIR x 15.41)
Exomizer2 deexoopt_f3_180_p0 242 160,011
(61.03%)
74,159,660
(LDIR x 12.29)
Exomizer3 deexo3p7 176 160,007
(61.03%)
82,034,254
(LDIR x 13.60)
Exomizer3 deexo3p7_fast_jp 181 160,007
(61.03%)
70,324,722
(LDIR x 11.66)
Exomizer3 deexoopt_p7 219 160,007
(61.03%)
63,745,458
(LDIR x 10.57)
Exomizer3 deexoopt_f3_p7 212 160,007
(61.03%)
61,265,322
(LDIR x 10.16)
Exomizer3 deexoopt_f3_180_p7 219 160,007
(61.03%)
63,774,934
(LDIR x 10.57)
Exomizer3 deexo3 191 160,007
(61.03%)
68,910,122
(LDIR x 11.42)
hrust dehrust_ix 234 162,217
(61.88%)
45,520,962
(LDIR x 7.54)
hrust dehrust_ix_232b 232 162,217
(61.88%)
45,413,861
(LDIR x 7.53)
hrust dehrust_hl 226 162,217
(61.88%)
44,726,210
(LDIR x 7.41)
hrust dehrust_stk 209 162,217
(61.88%)
41,277,317
(LDIR x 6.84)
lz4 lz4dec 97 191,416
(73.01%)
10,893,051
(LDIR x 1.80)
lz4 unlz4_spke 103 191,416
(73.01%)
10,031,857
(LDIR x 1.66)
lz4 unlz4_spke_fast 96 191,416
(73.01%)
9,650,674
(LDIR x 1.60)
lz4 unlz4_spke_small 65 191,416
(73.01%)
9,970,571
(LDIR x 1.65)
lz48 lz48decrunch_v006_ 70 198,227
(75.61%)
9,987,125
(LDIR x 1.65)
lz48 lz48decrunch_v006__180 71 198,227
(75.61%)
9,503,964
(LDIR x 1.57)
lz49 lz49decrunch_v001 106 195,027
(74.39%)
11,349,204
(LDIR x 1.88)
lz49 lz49decrunch_v001_180 101 195,027
(74.39%)
11,002,608
(LDIR x 1.82)
lze lzdec 119 174,118
(66.42%)
21,831,226
(LDIR x 3.62)
lze dlze_fast 90 174,118
(66.42%)
17,122,936
(LDIR x 2.83)
lze dlze_small 79 174,118
(66.42%)
21,975,061
(LDIR x 3.64)
lzeee dlzeee_fast 87 174,118
(66.42%)
15,771,965
(LDIR x 2.61)
lzeee dlzeee_fast2 97 174,118
(66.42%)
15,533,041
(LDIR x 2.57)
lzeee dlzeee_small 72 174,118
(66.42%)
21,330,646
(LDIR x 3.53)
lzexe z80unlze 156 174,132
(66.42%)
25,663,296
(LDIR x 4.25)
lzexe z80unlzep2 133 174,132
(66.42%)
23,882,407
(LDIR x 3.96)
lzexe z80unlze_small 112 174,132
(66.42%)
31,984,416
(LDIR x 5.30)
lzexe z80unlzep2_small 88 174,132
(66.42%)
30,313,875
(LDIR x 5.02)
lzsa1 unlzsa1_fast 109 182,295
(69.54%)
10,141,189
(LDIR x 1.68)
lzsa1 unlzsa1_small 67 182,295
(69.54%)
11,309,112
(LDIR x 1.87)
lzsa2 unlzsa2_fast 216 167,502
(63.89%)
15,810,936
(LDIR x 2.62)
lzsa2 unlzsa2_fast_180 214 167,502
(63.89%)
16,079,288
(LDIR x 2.66)
lzsa2 unlzsa2_small 139 167,502
(63.89%)
17,997,952
(LDIR x 2.98)
lzsa2 unlzsa2_small_180 137 167,502
(63.89%)
18,266,304
(LDIR x 3.02)
MegaLZ megalz_dec40 110 167,609
(63.93%)
45,653,296
(LDIR x 7.57)
MegaLZ unmegalz_fast_v2 233 167,609
(63.93%)
20,775,177
(LDIR x 3.44)
MegaLZ unmegalz_fast_v2p1 229 167,609
(63.93%)
20,533,028
(LDIR x 3.40)
MegaLZ unmegalz_small_v2 92 167,609
(63.93%)
32,642,661
(LDIR x 5.41)
Pletter unpletter 170 167,494
(63.89%)
28,812,190
(LDIR x 4.77)
Pletter unpletter_180 146 167,494
(63.89%)
26,619,594
(LDIR x 4.41)
Shrinkler shrinkler_recall_209 209 153,168
(58.42%)
2,648,202,619
(LDIR x 439.21)
Shrinkler shrinkler_recall_209_r800_rom 207 153,168
(58.42%)
2,636,690,003
(LDIR x 437.30)
Shrinkler(NP) deshrink_np 202 152,324
(58.10%)
2,643,754,822
(LDIR x 438.47)
Shrinkler(NP) deshrink_np_r800 201 152,324
(58.10%)
2,632,444,897
(LDIR x 436.60)
zx7 dzx7_lom_v1 214 170,296
(64.96%)
23,446,544
(LDIR x 3.88)
zx7 dzx7_lom_v1p1 198 170,296
(64.96%)
22,383,853
(LDIR x 3.71)
zx7 dzx7_turbo 88 170,296
(64.96%)
27,346,595
(LDIR x 4.53)
zx7 dzx7_standard 69 170,296
(64.96%)
36,700,476
(LDIR x 6.08)
zx7b dzx7b_fast 191 170,425
(65.01%)
20,907,617
(LDIR x 3.46)
zx7b dzx7b_fast_r800 184 170,425
(65.01%)
20,659,431
(LDIR x 3.42)
zx7b dzx7b_slow 64 170,425
(65.01%)
33,688,687
(LDIR x 5.58)
zx7b dzx7b_slow_r800 64 170,425
(65.01%)
33,688,687
(LDIR x 5.58)
zx7mini dzx7mini 39 190,540
(72.68%)
20,556,427
(LDIR x 3.40)

Original readme

------------------------------------------------------------------------
lze LZSS亜種データ圧縮/展開ツール
------------------------------------------------------------------------


------------------------------------------------------------------------
■ 履歴

・20080228a
  最初のバージョン。

------------------------------------------------------------------------
■ 概要

LZSS亜種圧縮/展開アルゴリズムにより作られたデータ圧縮/展開ツールとデコー
ダです。
デコーダはアセンブラでわずか100ステップ程度で書かれており、非常に高速に
動作します。
圧縮データはzipで圧縮した場合の20~30%増程度となります。

------------------------------------------------------------------------
■ インストール方法

win32コマンドラインツールとそのソースであり、インストールは特に必要あり
ません。

------------------------------------------------------------------------
■ 使用方法

   lze.exe e infile outfile
        infileを圧縮してoutfileへ出力します。

   lze.exe d infile outfile
        圧縮済みのinfileを展開してoutfileへ出力します。

   lzed.exe infile outfile
        圧縮済みのinfileを展開してoutfileへ出力します。
        lzedec.cを使用します。

------------------------------------------------------------------------
■ ソースと歴史的経緯

   lzedec.c         Cによるデコーダ
   lzedec_8086.asm  MASM(8086)アセンブラによるデコーダ
                    入力・出力ともに1セグメント内のみ有効
   lzedec_x68k.has  has(MC68000)アセンブラによるデコーダ

デコーダの対象CPUが古いものしかないのは、歴史的理由によるものです。

lzeの圧縮方式は、TONBE氏のX68000用汎用データ圧縮プログラム「BZ.X」を元に
作られています。
TONBE氏のBZ.Xは、F&I氏のX68000用実行ファイル圧縮プログラム「lzx」を元に
作られています。
F&I氏のlzxは、Fabrice Bellard氏のMS-DOS用実行ファイル圧縮プログラム
「LZEXE」を元に作られています。
これらはいずれもソースコードが公開されておらず、リバースエンジニアリング
によって作られ、実行ファイルのみが公開されてきました。

本lzeは、当方の学習用および実務用として1995年に作られたものですが、これ
らの圧縮方式をソースコードとして残しておくために公開するものです。

------------------------------------------------------------------------
■ その他

このプログラムおよびソースコードは、一切の制限なく使用・改造・配布等を
行うことができます。

--
Hiroaki GOTO as GORRY : 後藤 浩昭
E-mail: gorry@hauN.org
Homepage: http://GORRY.hauN.org/

[EOF]