Squeak 2.0 Beta Release
DanI at wdi.disney.com
Mon May 11 07:29:52 UTC 1998
>> High-speed compression and a compact forms package
>> We have improved Squeak's bitmap compression and compiled
>> it into a primitive. It is possible to compress every form in the
>> system, and only decompress when BitBlt acutally needs it.
>Just wondering about this... exactly what speed is high-speed? Is it
>100kb/sec? More? Less? What algorithm did you implement?
The entire code is in Squeak (of course) in the beta image.
You can find it as Bitmap>>compressToByteArray.
The algorithm is an Ingalls original designed to be dog-simple
and optimized for full-word operations (in case we ever want
to do a front-end for BitBlt that will expand on the fly).
Here is a simple timing test done on my display bitmap (1008x716 in 16-bit color). Most of the screen is covered by 4 large browsers, and there are 15 collapsed windows running down the left-hand side...
Display bits size*4 ==> 1443456
Display bits compressToByteArray size ==> 149902
Time millisecondsToRun: [10 timesRepeat: [Display bits compressToByteArray]] ==> 1179
So it's compressing 1.4MB by nearly a factor of 10 in under .12 seconds, a throughput of around 12MB/sec. This is on a 180MHz Mac 8600. Expansion is naturally a little faster.
More information about the Squeak-dev