[ANN] Nile: a trait-based stream library
Keith Hodges
keith_hodges at yahoo.co.uk
Wed May 2 19:50:19 UTC 2007
> Yes, pipes of streams.
>
> s := GzipStream on: (Base64Stream on: (WriteStream on: String new))
> s nextPutAll: 'foobar'
>
> s contents would return a string of 'foobar' zipped and converted to
> BASE64.
This would be great!
Rio uses this form for gzip support and it makes sense to add further
adaptors like this. In Rio I made a stream to stream copyTo: function,
so you can compress, by copying from a readStream to a writeStream
configured as above.
Do you have a stream to stream copy function? If not I added one to
Stream, you could steal it from Rio.
I do not know if you are aware that Flow is now available in 3.9, and
since this is a streams based implementation it may make more sense to
use Flows primitives for file/socket support.
best regards
Keith
More information about the Squeak-dev
mailing list
|