Issue 245 in glassdb: Missing methods on ZipArchiveMember, prevent creation of zip archives with new members

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

Issue 245 in glassdb: Missing methods on ZipArchiveMember, prevent creation of zip archives with new members

glassdb
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium GLASS-Server Version-GLASS0.231

New issue 245 by [hidden email]: Missing methods on ZipArchiveMember,  
prevent creation of zip archives with new members
http://code.google.com/p/glassdb/issues/detail?id=245

2 methods are missing on ZipArchiveMember. This prevents the writing of zip  
archives with ZipStringMembers that require to be compressed before being  
written to file.

The code comes directly from a Pharo1.1 image. So this should be MIT code?
The two methods are:

ZipArchiveMember>>copyDataTo: aStream

        compressionMethod = CompressionStored ifTrue: [ ^self copyDataWithCRCTo:  
aStream ].
        self copyRawDataTo: aStream.


ZipArchiveMember>>copyDataWithCRCTo: aStream
        "Copy my data to aStream. Also set the CRC-32.
        Only used when compressionMethod = desiredCompressionMethod =  
CompressionStored"

        uncompressedSize := compressedSize := readDataRemaining.

        crc32 := 16rFFFFFFFF.

        [ readDataRemaining > 0 ] whileTrue: [ | data |
                data := self readRawChunk: (4096 min: readDataRemaining).
                aStream nextPutAll: data.
                crc32 := ZipWriteStream updateCrc: crc32 from: 1 to: data size in: data.
                readDataRemaining := readDataRemaining - data size.
        ].

        crc32 := crc32 bitXor: 16rFFFFFFFF.


Reply | Threaded
Open this post in threaded view
|

Re: Issue 245 in glassdb: Missing methods on ZipArchiveMember, prevent creation of zip archives with new members

glassdb
Updates:
        Status: Fixed
        Labels: Fixed-1.0-beta.8.6

Comment #1 on issue 245 by [hidden email]: Missing methods on  
ZipArchiveMember, prevent creation of zip archives with new members
http://code.google.com/p/glassdb/issues/detail?id=245

integrated Johan's fix.

Name: Core-DaleHenrichs.40
Author: DaleHenrichs
Time: 03/02/2011, 15:24:08
UUID: 272a2c18-a41d-46b6-9a00-e61cc0bac332
Ancestors: Core-DaleHenrichs.39