On Thu, Dec 8, 2011 at 5:09 PM, Sven Van Caekenberghe <s...@beta9.be> wrote:

> It is certainly a bug ;-)
>
> Strangely, non-empty strings work:
>
>
Yes, in fact, we found that gzip was not working in some "random" cases and
Martin could come to the gulty!


> | aStream zipStream |
>
> aStream := ByteArray new writeStream binary.
> zipStream := GZipWriteStream on: aStream.
> zipStream nextStringPut: '123'.
> zipStream nextStringPut: 'ABC'.
> zipStream close.
> aStream close.
>
> aStream := aStream contents readStream binary.
> zipStream := GZipReadStream on: aStream.
> zipStream nextString.
> zipStream nextString.
> zipStream close.
> aStream close.
>
> I guess you could add a guard for the #nextInto: message send in
> GZipReadStream>>#nextString when the length is 0. But I haven't tried.
>
>
Ok, we will try. Thanks, we wanted to know whether we were doing something
wrong or not.
Don't you use this stream for Zinc as well ?


> Sven
>
> On 08 Dec 2011, at 16:53, Mariano Martinez Peck wrote:
>
> > no one?  :(
> >
> > On Tue, Dec 6, 2011 at 7:32 AM, Martin Dias <tinchod...@gmail.com>
> wrote:
> > I forgot to say that I am working on a recent Pharo 1.3.
> >
> >  And it is not only GZipWriteStream but also ZipWriteStream  and
> ZLibWriteStream .
> >
> > Martín
> >
> > On Mon, Dec 5, 2011 at 10:47 AM, Martin Dias <tinchod...@gmail.com>
> wrote:
> > Hi,
> >
> > I get a SubscriptOutOfBounds error when I evaluate:
> >
> > | aStream zipStream |
> >
> > aStream := ByteArray new writeStream binary.
> > zipStream := GZipWriteStream on: aStream.
> > zipStream nextStringPut: ''.
> > zipStream nextStringPut: ''.
> > zipStream close.
> > aStream close.
> >
> > aStream := aStream contents readStream binary.
> > zipStream := GZipReadStream on: aStream.
> > zipStream nextString.
> > zipStream nextString.
> > zipStream close.
> > aStream close.
> >
> > The error doesn't happen when I put just one string (instead of two).
> >
> > Do you see something wrong in the code? Should I report a bug?
> >
> > Thanks,
> > Martín
> >
> >
> >
> >
> > --
> > Mariano
> > http://marianopeck.wordpress.com
> >
>
>
>


-- 
Mariano
http://marianopeck.wordpress.com

Reply via email to