I've just ported the APack decompressor to Z80. The size of the decompressor is exactly 250 bytes large (about half the size of pucrunch decompressor), and the compression rates provided by APack are often better than Pucrunch!
For example, the game plus chapters of The Verdante Forest are about 70k in size. Apack gets it down to 41.3k, and Pucrunch gets it down to 40.7k. So pucrunch wins in one case, but...
Other games (like Joltima and Dying Eyes) favor Apack over pucrunch. Dying eyes gets 500 bytes smaller if compressed with Apack instead of Pucrunch, while Joltima gets 250 bytes smaller.
Here's a sample program that merely draws a picture, but it also includes the full decompression code and compression tool.
http://home.comcast.net/~alanweiss3/dwe ... k_demo.zip
APack decompression for Z80!
Moderator: MaxCoderz Staff
APack decompression for Z80!
You know your hexadecimal output routine is broken when it displays the character 'G'.
It's LZ based, and it works by storing references to data that has occurred previously in the file.
While decompressing, the entire output file must be intact up to the current decompression pointer.
You can also overlap the input file with the output file, just as long as the output is written before the input, and the output never overwrites the current input file position. I used that on the GBA to run big roms in pocketnes.
Apack uses some crazy hybrid of a bit stream, and byte aligned data. It makes reading bytes faster, since they are always aligned.
From what I see, an uncompressed byte that has not occurred within 15 bytes back is encoded with 9 bits, while an uncompressed byte that has appeared within 15 bytes back is encoded with 7 bits. This is exculding all the LZ compression stuff it also does.
While decompressing, the entire output file must be intact up to the current decompression pointer.
You can also overlap the input file with the output file, just as long as the output is written before the input, and the output never overwrites the current input file position. I used that on the GBA to run big roms in pocketnes.
Apack uses some crazy hybrid of a bit stream, and byte aligned data. It makes reading bytes faster, since they are always aligned.
From what I see, an uncompressed byte that has not occurred within 15 bytes back is encoded with 9 bits, while an uncompressed byte that has appeared within 15 bytes back is encoded with 7 bits. This is exculding all the LZ compression stuff it also does.
You know your hexadecimal output routine is broken when it displays the character 'G'.
-
- New Member
- Posts: 67
- Joined: Sun 09 Nov, 2008 1:56 pm
Re: APack decompression for Z80!
sorry for the necropost , but the site is down... and i cant seem to find the program on ticalc or google
i may use this to compress supaplex levels (RLE compresses by about 62% (21 possible tiles), i need 80...)
i may use this to compress supaplex levels (RLE compresses by about 62% (21 possible tiles), i need 80...)
Re: APack decompression for Z80!
- Attachments
-
- apack_demo.zip
- (28.98 KiB) Downloaded 991 times
You know your hexadecimal output routine is broken when it displays the character 'G'.