Search the web
Sign In
New User? Sign Up
gbadev
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want to share photos of your group with the world? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Compression Routines   Message List  
Reply | Forward Message #14612 of 15019 |
Re: Compression Routines

--- In gbadev@yahoogroups.com, "miked0801" <katy.mike@v...> wrote:
> Any other popular compressors out there (besides RLE, LZ77)?
> PuCrunch seems pretty nice and runs fast with just a little work.

RLE is in theory a special case of LZSS with a window size of one
symbol. The big purported advantage of RLE over LZSS comes only
with the larger copy sizes that common RLE implementations have
(130 or so vs. 18 for GBA LZSS). If you have highly repetitive
data, you may be able to beat the GBA's garden-variety LZSS by
modifying the compressor to use nonlinearly increasing copy sizes
and writing a decompressor to match.

You may also want to try Huffman coding of some sort. In fact,
Deflate is in effect an LZ77 pass followed by Huffman coding.
However, Huffman can be slow because using a bitstream rather
than a bytestream involves lots of shift operations.

I've tried Pucrunch, and decompression was dog slow because
Pucrunch compressed data is also a bitstream. Pucrunch didn't
even do significantly better on my test corpus (the 4-bit tiles
and 8-bit bitmaps of Tetanus On Drugs) than GBA LZSS did.
LZO is faster, but it's under a copyleft license, which means
you have to distribute your game's source code with the binary
(or make a suitable written offer to distribute said source code
at cost) unless you negotiate an alternate agreement with the
author.

If you are trying to compress images or tile data, try storing
difference images. Sort your palette from darkest to lightest,
subtract each row from the previous row, and then use LZSS
followed by Huffman coding.

--
Damian





Mon Nov 10, 2003 4:43 pm

yerricde
Offline Offline
Send Email Send Email

Forward
Message #14612 of 15019 |
Expand Messages Author Sort by Date

Any other popular compressors out there (besides RLE, LZ77)? PuCrunch seems pretty nice and runs fast with just a little work. Mike...
miked0801
Offline Send Email
Nov 10, 2003
8:12 am

... RLE is in theory a special case of LZSS with a window size of one symbol. The big purported advantage of RLE over LZSS comes only with the larger copy...
Damian Yerrick
yerricde
Offline Send Email
Nov 10, 2003
4:50 pm

While symbol compression is slower, you can offset this quite a bit with just a little buffering. I found that buffering 32-bits of data at a time into 1...
miked0801
Offline Send Email
Nov 10, 2003
7:09 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help