Hello all,
I am porting some code to Pharo and ran across some of my uses ZLib to put things into byte arrays. Knowing that Squeak and Pharo contain compression, it seemed reasonable to use that. I found some discussion on squeak-dev and created the following:
| out zip in |
out := ByteArray writeStream.
zip := GZipWriteStream on:out.
zip nextPutAll:( ByteArray new:1000 ); finish.
in := out contents readStream.
zip := GZipReadStream on:in.
zip contents.
It seems to work, crunching the 1000 bytes down to size and then back up. Aside from its being a pointless exercise in this case, do you see any problems?
The next step would be to store "real" compressed data into a global variable and then package that; at least that is what I have done in Dolphin. Is there a similar MC trick? I suppose I could write something to code the compressed data into a method and package that. Simpler/better ideas are always welcome.
Bill
_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project