BBS: Inland Empire Archive
Date: 10-04-92 (09:01) Number: 347
From: GLENN KINEN Refer#: NONE
To: BOB EDWARDS Recvd: NO
Subj: Re: Data compression Conf: (2) Quik_Bas
> -> This was all off the top of my head, but you should
> ->hopefully get the general idea of it.
> Rich, where does RLE fit in?
I know I'm not Rich (Yep, I'm quite poor <g>), but here is a brief demo
of RLE-Run Length Encoding.
Pick a character from the ascii set which is not in the file. (I'll
Now say you wanted to compress:
You find all letters which are repeated more than 3 times in a row (more
on this later). Next, you put
initializer, or for decompressor info. (The decompressor uses this so it
would know the next 2 bytes tell it what to do). Then you add the
character which is repeated more than 3 times (not 3 more than 3),
*a; then you add total number of times repeated; *a4. See you compressed
4 bytes in 3 bytes, you can't use this on 3 or more bytes becaus eyou
will get no compression, or actully make the file LARGER.
So the compressed version of the string I put above would be:
31 was the original size - 17 the compressed. Any questions? ;-D
* SLMR 2.1a * Computers All Wait at the Same Speed.
--- Maximus 2.01wb
* Origin: Miami Amateur Computer Club BBS HST/V32b/V42b (1:135/110)