Re: [Pharo-project] [COTDC] 103 - ZLibWriteStream
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). zipStream nextPutAll: myByteArray; close. compressed := zipStream encodedStream contents. On 10.01.2012, at 21:36, sean@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?!
Thanks, Max :) -- View this message in context: http://forum.world.st/COTDC-103-ZLibWriteStream-tp4283327p4285330.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
I like class comment which refers to collaborators and have examples!! Thanks On Jan 11, 2012, at 8:46 AM, Max Leske wrote:
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). zipStream nextPutAll: myByteArray; close. compressed := zipStream encodedStream contents.
On 10.01.2012, at 21:36, sean@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?!
participants (3)
-
Max Leske -
Sean P. DeNigris -
Stéphane Ducasse