[fpc-devel] zstream, fpc and lazarus

Daniël Mantione daniel.mantione at freepascal.org
Sun Dec 2 09:56:27 CET 2007



Op Sun, 2 Dec 2007, schreef Paul Ishenin:

> > This seems extremely strange to me. Are you telling that the source
> > stream is not at the start of the Zstream when you create the
> > decompression stream?
> > 
> Exactly. At least when I debugged pngreader it was at the end.

How did it get at the end?

> > By the way, I'm getting some doubts about position:=0. This basically 
> > 
> This is according codegear help. We should folow it since many code depends on
> it.

Please copy/paste that help. I can't believe that one would demand that 
a zstream starts from the start of a file; I know no file format which 
works this way, not even gzip.

> > seeks the source file to its begin. But what happens if the Zstream does
> > not start at the beginning of the file?
> > 
> My assumption is that zstream must be at the begining or one should use
> temporary memory stream to achieve that.

How does it work in Lazarus? A PNG file does not start with a zstream, it 
is in the middle of the file. If you seek to the start of a PNG file, you 
will read PNG chunks rather than a Zstream.

Daniël


More information about the fpc-devel mailing list