[FIX] ZipArchive - Cant read from ReadWriteStreams

Russell Penney russell.penney at tincanct.com
Mon Jul 26 23:50:49 UTC 2004


Hmmmm I will look at some tests tonight.

I almost didn’t send this fix because I thought I must be missing something.

> -----Original Message-----
> From: squeak-dev-bounces at lists.squeakfoundation.org [mailto:squeak-dev-
> bounces at lists.squeakfoundation.org] On Behalf Of stéphane ducasse
> Sent: Tuesday, 27 July 2004 4:23 AM
> To: The general-purpose Squeak developers list
> Subject: Re: [FIX] ZipArchive - Cant read from ReadWriteStreams
> 
> Hi russel
> 
> thanks for your fix. (If I ask nicely may be this will work) would it
> be possible to get one or two unit tests so that we can nicely document
> your bug and in the same time create active documentation for squeak.
> 
> Stef
> 
> On 26 juil. 04, at 16:35, Russell Penney wrote:
> 
> > Fixes a problem I found with ZipArchive not being able to read from a
> > ReadWriteStream. Removes any dependence on String internally, which
> > seemed strange as it forces the input stream to binary before reading.
> > FileStream does something different to ReadWriteStreams.
> >
> >
> >
> > Try:
> >
> > | buffer |
> >
> >
> >
> > s := StandardFileStream readOnlyFileNamed: 'somefile.zip'.
> >
> > s binary.
> >
> > buffer := s contents.
> >
> > s close.
> >
> > s := ReadWriteStream with: buffer.
> >
> > s reset.
> >
> > ZipArchive new readFrom: s.
> >
> >
> >
> >
> > <ZipArchiveChanges.1.cs>
> 






More information about the Squeak-dev mailing list