[fpc-devel] zstream, fpc and lazarus

Daniël Mantione daniel.mantione at freepascal.org
Sun Dec 2 13:44:46 CET 2007



Op Sun, 2 Dec 2007, schreef Michael Van Canneyt:

> Not currently. This is in the pipeline (sic). This is one of the things I wanted
> to address when re-creating zstream. Originally I planned to do this myself, 
> remember ? ;-)
> 
> The idea is to create
> 
>   TStreamCapability = (scRead,scWrite,scSeekForward,scSeekBackward,scSize);
> 
>   Class Function TStream.StreamCapabilities : TStreamCapabilities;
> 
> And to check this. It can be used to optimize certain operations. Now,
> a non-seekable stream without size is assumed in FPC, making some operations
> slow. Delphi assumes a stream which is seekable, with size, making some 
> operations impossible, like pipes or sockets. I submitted a bugreport about
> this way back in 2000.

This looks good. One other thing that would actually solve it is to move 
the buffering into the stream, something like the Tbufferedstream from TV, 
but then with API exposed. Zstream would then no longer need to use its 
own buffer; then it is no longer a problem if too many bytes are read.

Daniël


More information about the fpc-devel mailing list