[COTDC] 70 - DeflateStream

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[COTDC] 70 - DeflateStream

laurent laffont
Today: DeflateStream


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.
Laurent


Reply | Threaded
Open this post in threaded view
|

Re: [COTDC] 70 - DeflateStream

laurent laffont
I'm the base class for "stream compressor". For example, my subclass GZipWriteStream can compress a stream contents using gzip algorithm.

Try:

gzData := String streamContents: [:aStream|
(GZipWriteStream on: aStream)
nextPutAll: 'Some data to be gzipped';
close. ].
Transcript 
show: gzData; 
cr;
show: (GZipReadStream on: gzData) upToEnd;
cr.


Laurent

On Mon, Jun 6, 2011 at 10:50 PM, laurent laffont <[hidden email]> wrote:
Today: DeflateStream


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.
Laurent