The Trunk: Compression-nice.11.mcz

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

The Trunk: Compression-nice.11.mcz

commits-2
Nicolas Cellier uploaded a new version of Compression to project The Trunk:
http://source.squeak.org/trunk/Compression-nice.11.mcz

==================== Summary ====================

Name: Compression-nice.11
Author: nice
Time: 14 December 2009, 2:27:24 am
UUID: 8ca3fdc7-88b2-144d-b248-9762b16e55c3
Ancestors: Compression-ul.10

Make nextLine work in an InflateStream

=============== Diff against Compression-ul.10 ===============

Item was added:
+ ----- Method: InflateStream>>upToAnyOf:do: (in category 'accessing') -----
+ upToAnyOf: subcollection do: aBlock
+ "re-implement super super again...
+ This is a strong indicator that ReadStream SHOULD be abstract"
+
+ ^self collectionSpecies new: 1000 streamContents: [ :stream |
+ | ch |
+ [ self atEnd or: [ (subcollection includes: (ch := self next)) and: [aBlock value: ch. true] ] ]
+ whileFalse: [ stream nextPut: ch ] ]!