On Fri, 9 Dec 2011, Jorge Aldo G. de F. Junior wrote:

Thats an old problem on the way TStream was implemented.

I for one needed to know the result size of a uncompress stream (IE.:
i have a compressed stream and want to know in advance how many bytes
the uncompress method would yield).

This information is not stored in the compressed data. To be able to give you this number, the compression stream
would need to actually decompress the whole stream.


The stream system is currently a mess, sometimes you can know in
advance how many bytes you can read, sometimes you cant, depends on
the class you are dealing with.

There are simply streams which have no size.

In each case, I am working on the 'StreamCapabilities' property, which should be able to tell you what is available.

Michael.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to