Jump to content
IGNORED

ZX02: 6502 size optimized compression


Recommended Posts

Hi!

 

I made a modified version of the ZX0 compressor to make the decompressor smaller (and faster) in the 6502, by sacrificing about 0.5% compression ratio. The intended use is compressing data up to about 10kB, or where the decompressor size should be as small as possible.

 

Current 6502 code is 130 bytes for the small decompressor (this includes the initialization) and 175 bytes for the fast version.

 

Note that the compressor is only a slightly modified version of the original ZX0 compressor by Einar Saukas, but the decompressors (C and 6502 versions) are by me.

 

Code and documentation is here: https://github.com/dmsc/zx02 , go to the releases to download the compiled compressor for linux and windows.

 

EDIT: I added a third 6502 decompressor, with a trade off between size and speed, at 138 bytes it will probably be the best to use in most situations.

 

Current stats in the "conan.gfx" file are:

 

File Size (bytes) Speed (cycles/bytes)
zx02-fast.asm 175 48.1
zx02-optim.asm 138 58.0
zx02-small.asm 130 72.6

 

 

Have Fun!

 

Edited by dmsc
Adds new "optimal" decompresor code.
  • Like 11
  • Thanks 5
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...