[Cuis-dev] Documentation on the Compression package

Luciano Notarfrancesco luchiano at gmail.com
Thu Mar 19 04:36:02 PDT 2026


This seems to work. You have to send close to the GZipWriteStream in order
to make it flush the darpta to the underlying write stream.

'/tmp/asdf.gz' asFileEntry forceWriteStreamDo: [:fileStream|
| gzipStream |
gzipStream := GZipWriteStream on: fileStream.
(ReferenceStream on: gzipStream) nextPut: 'qwer'.
gzipStream close]


On Thu, Mar 19, 2026 at 16:37 Hilaire Fernandes via Cuis-dev <
cuis-dev at lists.cuis.st> wrote:

> I tried this, but failed:
>
> ReferenceStream class>>dumpOnCompressedFile: aFileEntry object: anObject
>     | compressor |
>     compressor := GZipWriteStream on: ByteArray new.
>     (self on: compressor) nextPut: anObject.
>
>     aFileEntry forceWriteStreamDo: [ :stream |
>         stream nextPut: compressor contents]
>
> #next shouldnot be used on gzipwritestream
>
> Hilaire
>
> -- http://mamot.fr/@drgeo
>
> --
> Cuis-dev mailing list
> Cuis-dev at lists.cuis.st
> https://lists.cuis.st/mailman/listinfo/cuis-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20260319/333bee4c/attachment-0001.htm>


More information about the Cuis-dev mailing list