Lazy LZD Data Packer

Basic and Machine Language

Moderator: Moderators

Post Reply
aeb
Vic 20 Amateur
Posts: 68
Joined: Sat Jun 19, 2004 2:06 pm

Lazy LZD Data Packer

Post by aeb »

Lazy LZD Data Packer is a C64/VIC 20 frontend for the minimal LZ compressor LZD I wrote two years ago for a specific purpose - fast decrunch of data from VIC 20 cartridge ROM. I wrote Lazy now, because I was too lazy to load, crunch and save files manually while working on a new C-64 game.

lazylzd-vic20.png
lazylzd-vic20.png (1.12 KiB) Viewed 364 times
lazylzd.zip
(4.99 KiB) Downloaded 46 times

LZD is great for compressing level data, fonts, bitmap images or any other data, considering decrunch speed over efficiency. It is more efficient than just a simple RLE, though. The decompressor code is relatively tiny too.

LZD works at byte level and uses only 8-bit lz distances. As such, it is not nearly as efficient as PuCrunch or Exomizer, but it is indeed much faster.

LZD is for data blocks, it doesn't handle executables and it ignores (doesn't skip or recognize) CBM header load address.

LZD decompresses backwards in memory, starting from the end address, and doesn't allow the source and destination areas to overlap. Source is read forwards and you can read the source from a file if wanted (replace getbyte with file input).

Decompressor versions:
lz.s - decompressor for zeropage (copy to zeropage, set pointers and execute)
lzrom.s - small (~50 something bytes) cartridge version without self-mod code
lw-inline.s - as lzrom, but getbyte and byteout as inline for speed, but bigger decruncher

Maybe someone else finds it useful too :)
Post Reply