[Pkg] The Trunk: Compression-nice.45.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Jul 17 21:10:02 UTC 2014


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

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

Name: Compression-nice.45
Author: nice
Time: 17 July 2014, 11:09:44.908 pm
UUID: 2284e804-4f32-4eaa-89cc-8d14562410b3
Ancestors: Compression-nice.44

Expunge RWBinaryOrTextStream insanity from two more methods.
Let the comment of these methods tell the awfull truth about ZipArchiveMember: uncompressing is latin1-centric.

=============== Diff against Compression-nice.44 ===============

Item was changed:
  ----- Method: ZipArchiveMember>>contents (in category 'reading') -----
  contents
+ 	"Answer my contents as a string - assuming a Latin1 encoding."
- 	"Answer my contents as a string."
  	| s |
+ 	s := (ByteArray new: self uncompressedSize) writeStream.
- 	s := RWBinaryOrTextStream on: (String new: self uncompressedSize).
  	self extractTo: s.
+ 	^s contents asString!
- 	s text.
- 	^s contents!

Item was changed:
  ----- Method: ZipArchiveMember>>contentsFrom:to: (in category 'reading') -----
  contentsFrom: start to: finish
+ 	"Answer part of my contents as a string - assuming a Latin1 encoding.."
- 	"Answer my contents as a string."
  	| s |
+ 	s := (ByteArray new: finish - start + 1) writeStream.
- 	s := RWBinaryOrTextStream on: (String new: finish - start + 1).
  	self extractTo: s from: start to: finish.
+ 	^s contents asString!
- 	s text.
- 	^s contents!



More information about the Packages mailing list