[Pharo-project] [COTDC] 103 - ZLibWriteStream

Max Leske maxleske at gmail.com
Wed Jan 11 08:46:48 CET 2012

I use the zlib implementation of the deflate algorithm to compress a ByteArray. See http://en.wikipedia.org/wiki/DEFLATE for details on the deflate algorithm.

This is how you get a compressed ByteArray from your input:
zipStream := ZLibWriteStream on: (ByteArray new).
	nextPutAll: myByteArray;
compressed := zipStream encodedStream contents.

On 10.01.2012, at 21:36, sean at clipperadams.com wrote:

> 102 classes done
> 794 classes remaining
> Continuing in Compression...
> Today:  ZLibWriteStream 
> Comment Of The Day Contest - One Day One Comment 
> Rules: 
> #1: Each day a not commented class is elected. Each day the best comment will be integrated with name of the author(s). 
> #2: If you cannot comment it, deprecate it. 
> Results: http://code.google.com/p/pharo/wiki/CommentOfTheDayContest
> p.s. this message was sent from a pharo image. Did you know you could easily do that?!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gforge.inria.fr/pipermail/pharo-project/attachments/20120111/f014a944/attachment.htm>

More information about the Pharo-project mailing list