[squeak-dev] The Inbox: Compression-jdr.48.mcz

Javier Diaz-Reinoso javier_diaz_r at mac.com
Sun Jan 3 16:33:55 UTC 2016


I was not a member, now I am.

> On Jan 3, 2016, at 01:06, David T. Lewis <lewis at mail.msen.com> wrote:
> 
> This looks like a good fix that should go into trunk, but who posted it? 
> On squeaksource.com, 'jdr' is Javier Diaz Reinoso, but I cannot connect it
> to a user on source.squeak.org ???
> 
> Dave
> 
> 
> On Thu, Dec 31, 2015 at 11:14:01PM +0000, commits at source.squeak.org wrote:
>> A new version of Compression was added to project The Inbox:
>> http://source.squeak.org/inbox/Compression-jdr.48.mcz
>> 
>> ==================== Summary ====================
>> 
>> Name: Compression-jdr.48
>> Author: jdr
>> Time: 31 December 2015, 6:13:59.974 pm
>> UUID: 7798d7c6-8f39-45cc-a3cc-e0887130a62d
>> Ancestors: Compression-dtl.47
>> 
>> It solves a problem compressing a zipfile with many files (> 200), previously all files to be processed remained open, now only the file being processed is opened.
>> 
>> =============== Diff against Compression-dtl.47 ===============
>> 
>> Item was changed:
>>  ----- Method: ZipArchive>>writeTo: (in category 'writing') -----
>>  writeTo: stream
>>  	stream binary.
>>  	members do: [ :member |
>>  		member writeTo: stream.
>>  		member endRead.
>> + 		member close
>>  	].
>>  	writeCentralDirectoryOffset := stream position.
>>  	self writeCentralDirectoryTo: stream.
>>  	!
>> 
>> Item was changed:
>>  ----- Method: ZipArchive>>writeTo:prepending: (in category 'writing') -----
>>  writeTo: stream prepending: aString
>>  	stream binary.
>>  	stream nextPutAll: aString.
>>  	members do: [ :member |
>>  		member writeTo: stream.
>>  		member endRead.
>> + 		member close
>>  	].
>>  	writeCentralDirectoryOffset := stream position.
>>  	self writeCentralDirectoryTo: stream.
>>  	!
>> 
>> Item was changed:
>>  ----- Method: ZipNewFileMember>>from: (in category 'initialization') -----
>>  from: aFileName
>>  	| entry |
>>  	compressionMethod := CompressionStored.
>>  	"Now get the size, attributes, and timestamps, and see if the file exists"
>>  	stream := StandardFileStream readOnlyFileNamed: aFileName.
>>  	self localFileName: (externalFileName := stream name).
>>  	entry := stream directoryEntry.
>>  	compressedSize := uncompressedSize := entry fileSize.
>>  	desiredCompressionMethod := compressedSize > 0 ifTrue: [ CompressionDeflated ] ifFalse: [ CompressionStored ].
>> + 	self setLastModFileDateTimeFrom: entry modificationTime.
>> + 	stream close
>> - 	self setLastModFileDateTimeFrom: entry modificationTime
>>  !
>> 
>> Item was changed:
>>  ----- Method: ZipNewFileMember>>rewindData (in category 'private-writing') -----
>>  rewindData
>>  	super rewindData.
>> + 	stream ensureOpen.
>>  	readDataRemaining := stream size.
>>  	stream position: 0.!
>> 
> 



More information about the Squeak-dev mailing list