[squeak-dev] The Trunk: Compression-ar.22.mcz

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Mon Sep 6 21:49:34 UTC 2010


Shouldn't this package include #lastIndexOfPKSignature: ?
I think that already happened in Pharo

cheers

Nicolas

2010/9/5  <commits at source.squeak.org>:
> Andreas Raab uploaded a new version of Compression to project The Trunk:
> http://source.squeak.org/trunk/Compression-ar.22.mcz
>
> ==================== Summary ====================
>
> Name: Compression-ar.22
> Author: ar
> Time: 5 September 2010, 10:53:14.026 am
> UUID: 579fde37-ea30-f14a-9799-a08eb7eac29f
> Ancestors: Compression-ar.21
>
> Restructurings to reduce package depencencies.
>
> =============== Diff against Compression-ar.21 ===============
>
> Item was changed:
>  ----- Method: GZipWriteStream class>>initialize (in category 'class initialization') -----
>  initialize
> +       FileServices registerFileReader: self!
> -       FileList registerFileReader: self!
>
> Item was added:
> + ----- Method: StandardFileStream>>compressFile (in category '*Compression') -----
> + compressFile
> +       "Write a new file that has the data in me compressed in GZip format."
> +       | zipped buffer |
> +
> +       self readOnly; binary.
> +       zipped := self directory newFileNamed: (self name, FileDirectory dot, 'gz').
> +       zipped binary; setFileTypeToObject.
> +               "Type and Creator not to be text, so can be enclosed in an email"
> +       zipped := GZipWriteStream on: zipped.
> +       buffer := ByteArray new: 50000.
> +       'Compressing ', self fullName displayProgressAt: Sensor cursorPoint
> +               from: 0 to: self size
> +               during: [:bar |
> +                       [self atEnd] whileFalse: [
> +                               bar value: self position.
> +                               zipped nextPutAll: (self nextInto: buffer)].
> +                       zipped close.
> +                       self close].
> +       ^zipped!
>
> Item was changed:
>  ----- Method: GZipWriteStream class>>unload (in category 'class initialization') -----
>  unload
> +       FileServices unregisterFileReader: self!
> -       FileList unregisterFileReader: self!
>
> Item was added:
> + ----- Method: FileStream>>viewGZipContents (in category '*Compression') -----
> + viewGZipContents
> +       "View the contents of a gzipped file"
> +
> +       | stringContents |
> +       self binary.
> +       stringContents := self contentsOfEntireFile.
> +       stringContents := Cursor wait showWhile: [(GZipReadStream on: stringContents) upToEnd].
> +       stringContents := stringContents asString withSqueakLineEndings.
> +
> +       UIManager default
> +               edit: stringContents;
> +               label: 'Decompressed contents of: ', self localName!
>
> Item was changed:
>  ----- Method: GZipReadStream class>>unload (in category 'class initialization') -----
>  unload
>
> +       FileServices unregisterFileReader: self !
> -       FileList unregisterFileReader: self !
>
>
>



More information about the Squeak-dev mailing list