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=2452 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.