[Q] About compressing

Lic. Edgar J. De Cleene edgardec2001 at yahoo.com.ar
Sun May 15 15:29:05 UTC 2005


I wish to have a fileOutCompressed method ( I can't find one)

unzipped := RWBinaryOrTextStream on: String new.
            unzipped header; timeStamp.
            self fileOutPreambleOn: unzipped.
            self fileOutOn: unzipped.
            self fileOutPostscriptOn: unzipped.
            unzipped trailer.
zipped :=  ZipArchive new.
zipped addMember: ((ZipStringMember newFrom: unzipped contents
                        named: nameToUse)
                        desiredCompressionMethod: ZipArchive
compressionDeflated;
                        yourself).
zipped writeToFileNamed: nameToUse.


Works but I don't figure how use GZipWriteStream instead .

Also I know Dan Ingalls long time ago cook how have compressed sources (I
use it) and answer if his method is general as reduced .sources to about 1/3
(zip reduce to about 1/2),and if possible use for all (.changes, fileOuts,
etc)

Very thanks in advance.

Edgar






More information about the Squeak-dev mailing list