[A83] Re: ZPic83 compression
[Prev][Next][Index][Thread]
[A83] Re: ZPic83 compression
So you waste a byte on 5 bits? (your example)
A picture is one huge string of data. One big horizontal line, so
RLE is a good compression technique. Everything is one big horizontal line
if you think about it like that though. RLE is good enough for monochrome
pics simply because there are often large areas of black and white and
because of it's speed/size. David Phillips has written an RLE
decompression routine that is only about 30 bytes.
Sometimes, a picture will have better compression through vertical
RLE, but I have been unable to find a routine for decompressing this. Paul
Marks's Spite Master is a great utility for turning bitmaps (.bmp files)
into sprites, RLE or otherwise. It can be found at
http://paul248.cjb.net. Some information on RLE can be found in the
contests section of http://void.ticalc.org.
Some information on other forms of compression (ZCP [ZShell
Compressed PIctures] and EZCMP [EZCMP Zshell CoMPression] ) can be found in
the Programs-Misc. section of the same site.
After reading all of that stuff maybe I'll go experiment with a
little compression:)
> > I guess it's a lot better than RLE on most pictures. RLE is just a system
> > that marks repeated bytes, so:
> >
> > $12,$12,$12,$12,$12
> >
> > will be stored as [special byte],$05,$12. Since these repetitions are not
> > very rare in monchrome pictures you can use it to compress it. But you can
> > see that there are lots of possibilities that wouldn't compress at all.
>
>I use a pixel-per-pixel RLE encoding for my pics, with this method you get
>very little or no overhead at all if you have many places with over eight
>pixels
>of the same kind in succession.
>
>0b,0b,0b,0b,0b would become
>
>$5
>
>/Jens
Follow-Ups: