The Inbox: Compression-jdr.48.mcz

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

The Inbox: Compression-jdr.48.mcz

commits-2
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.!


Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Compression-jdr.48.mcz

David T. Lewis
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, [hidden email] 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.!
>

Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Compression-jdr.48.mcz

Javier Diaz-Reinoso
I was not a member, now I am.

> On Jan 3, 2016, at 01:06, David T. Lewis <[hidden email]> 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, [hidden email] 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.!
>>
>


Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Compression-jdr.48.mcz

David T. Lewis
Excellent! Thank you.

Dave

On Sun, Jan 03, 2016 at 11:33:55AM -0500, Javier Diaz-Reinoso wrote:

> I was not a member, now I am.
>
> > On Jan 3, 2016, at 01:06, David T. Lewis <[hidden email]> 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, [hidden email] 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.!
> >>
> >
>

Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Compression-jdr.48.mcz

David T. Lewis
I see now that Chris Muller has committed this change (or something very
similar) in trunk as Compression-cmm.48.

But the Compression-jdr.48 in the inbox has some additional changes that
may be important, so I'm not sure if a merge is required.

Chris, when you get a chance, can you please check this and advise?

Thanks,
Dave


On Sun, Jan 03, 2016 at 11:55:57AM -0500, David T. Lewis wrote:

> Excellent! Thank you.
>
> Dave
>
> On Sun, Jan 03, 2016 at 11:33:55AM -0500, Javier Diaz-Reinoso wrote:
> > I was not a member, now I am.
> >
> > > On Jan 3, 2016, at 01:06, David T. Lewis <[hidden email]> 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, [hidden email] 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.!
> > >>
> > >
> >