Compressing alt.sex.pictures files

Kent Paul Dolan xanthian at zorch.SF-Bay.ORG
Thu Aug 30 19:15:27 AEST 1990


eillihca at fizzle.stanford.edu (Achille Hui) writes:

> peter at sugar.hackercorp.com (Peter da Silva) writes:

>> xanthian at zorch.SF-Bay.ORG (Kent Paul Dolan) writes:

>>> Hmmm.  Good idea.  Here's one suggestion for an experiment.  Somewhere on
>>> the net, a month or two back, there was a suggestion that a good way to
>>> compress realistic images was to XOR scan lines after the first with their
>>> predecessor line, then LZW compress the output.

>>I believe that XORing alternate scan-lines and run-length-encoding the result
>>would do a better job. I've heard of this algorithm being pretty effective
>>in past discussions. Should one do this with the image bitplane-mapped or
>>pixel-mapped?

>I have tried several things on several images:

>	lighthouse, oldmill, lush (1024x768x ~ 256 )    each ~ 600k
>	babe24 ( ~ 512 x ~ 800 x ~ 256 )		     ~ 400k

>avaliable from ticsys.tamu.edu

>1) just compress the raw image extracted from the gif files
>2) XOR neighbouring scan lines in raw image and then compress it.
>3) subtract neighbouring ......
>4) build a color index table for each scan line

>and it turns out the size of the resulting files ..
>1)	~ 90% of original gif
>2,3)	~ 110%
>4)	~ 100% if we exclude the color index table for the lines!

Well, this is not what either Peter or I suggested, but it is a data point.

I'd be interested in at least some pseudocode of what you did for 2), to
be sure you are doing what others have done.  Reports about two months
back in comp.graphics found a ~30% better compression of the XORed data
with LZ than of the raw data with LZ, certainly not what you show from
your tests.

Kent, the man from xanth.
<xanthian at Zorch.SF-Bay.ORG> <xanthian at well.sf.ca.us>



More information about the Alt.sources.d mailing list