[squeak-dev] The Trunk: Graphics-nice.294.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Jul 17 21:38:52 UTC 2014

Nicolas Cellier uploaded a new version of Graphics to project The Trunk:

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

Name: Graphics-nice.294
Author: nice
Time: 17 July 2014, 11:37:07.225 pm
UUID: 2f4d0e12-5574-4f20-8bbb-5c742076427e
Ancestors: Graphics-nice.293

Remove an ounce of Stream complexity...
Next question is why the hell shall we return a ReadWriteStream?

=============== Diff against Graphics-nice.293 ===============

Item was changed:
  ----- Method: TextStyle>>compressedMIMEEncodedStream (in category 'mime file in/out') -----
  	"Answer a ReadWriteStream with my compressed, stored representation as Base64"
+ 	| s ff ffcontents |
- 	| s ff ffcontents s2 gzs |
  	self fontArray do: [:f | f releaseCachedState].
  	s := RWBinaryOrTextStream on: ''.
  	ff := SmartRefStream on: s reset.
  	TextConstants at: #forceFontWriting put: true.
  	[ff nextPut: self] 
  		ensure: [TextConstants at: #forceFontWriting put: false].
  	ffcontents := s contents.
+ 	s := RWBinaryOrTextStream with: ffcontents asByteArray zipped base64Encoded.
- 	ff close.
- 	s2 := RWBinaryOrTextStream on: ''.
- 	gzs := GZipWriteStream on: s2.
- 	gzs nextPutAll: ffcontents.
- 	gzs close.
- 	s2 reset.
- 	s := RWBinaryOrTextStream on: (ByteArray new: 10000).
- 	Base64MimeConverter mimeEncode: s2 to: s.

More information about the Squeak-dev mailing list