[A82] Re: the compression


[Prev][Next][Index][Thread]

[A82] Re: the compression




2 questions:

What does non-compressed data look like

and

(stupid question) Any padding?


>From: "Roger Levy" <trip_n_save@hotmail.com>
>Reply-To: assembly-82@lists.ticalc.org
>To: assembly-82@lists.ticalc.org
>Subject: [A82] Re: the compression
>Date: Sat, 24 Feb 2001 17:41:32 -0000
>
> >.db %11111111
> >.db %10000000
> >.db %10000000
> >.db %10000000
> >.db %11111111
> >.db %00001000
> >.db %00001000
> >.db %00001000
>this would be encoded like this:
>
>the header:
>%110  %1 = this tile has redundant bytes
>       %10 = there are 2 repeated bytes
>
>then the bytes that are repeated:
>%10000000 = byte0
>%00001000 = byte1
>
>then the rest:
>%101  %1 = encoded
>       %01 = $FF
>%110,%110,%110  %1 = encoded
>                 %10 = byte0
>%101
>%111,%111,%111  %1 = encoded
>                 %11 = byte1
>
>so the total bits would be 43 or 67% :]
>
>now, for this one....
> >.db %11110111 X
> >.db %00000111
> >.db %01111111 X
> >.db %01100011
> >.db %01111111 X
> >.db %01110000 .db %11110111 X
> >.db %00110110
>unfortunately it wouldn't be compressable and would be indicated as not
>compressed and thus turn to 67 bits.
>if the compresser did attempt to encode the two repeated bytes (marked with
>X's) it would inflate the data to 67 bits as well, ironically. so it isn't
>perfect... this is because of the 16 bits needed to define exactly what
>those repeated bytes are. however with some tweaking of the actual image,
>better compression could be achieved.
>im including a table in Word format that shows how it performs on all types
>of tiles. The trick with the format is to make the tiles catored to it. 
>They
>can still look good, and be compressed. For instance, the tiles for Metroid
>on average get 6:8, just because of the way they happen to be, which is 
>with
>lots of %FF's strewn about. Tiles that are sort of like "wallpaper", or a
>pattern of some sort that doesn't have any blank bytes, don't compress 
>well;
>mostly "block"-type tiles or ones with 2 or more blank or filled lines
>compress well.
>
>again, anyone who is able to write the PC-based encoder, even if you don't
>understand the format i included this morning (it really was just a little
>thingy i made for my own reference when making the analysis chart and
>decoder), please e-mail me and I'll explain to you exactly how it should
>work. i want to be able to release this soon so people can start using it 
>in
>their games.
>
>_________________________________________________________________
>Get your FREE download of MSN Explorer at http://explorer.msn.com
>
>
>-- Binary/unsupported file stripped by Listar --
>-- Type: application/octet-stream
>-- File: 6 to 8 Non-aligned Tile Compression Statistics Analysis Chart.doc
>
>
>

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com