Recent

Author Topic: fix for docs about TDecompressionStream.Create  (Read 840 times)

domasz

  • Sr. Member
  • ****
  • Posts: 478
fix for docs about TDecompressionStream.Create
« on: June 20, 2024, 08:55:38 am »
Original text:
Quote
Description

Create creates and initializes a new instance of the TDecompressionStream class. It calls the inherited Create and passes it the Source stream. The source stream is the stream from which the compressed (deflated) data is read.

If ASkipHeader is true, then the gzip data header is skipped, allowing TDecompressionStream to read deflated data in a .zip file. (this data does not have the gzip header record prepended to it).

Note that the source stream is by default not owned by the decompression stream, and is not freed when the decompression stream is destroyed.

TDecompressionStream cannot handle gzip data (unlike Delphi implementation which has a special 15+16 mode). It can only handle zlib data and pure deflate.
So the docs should be:


Quote
Description

Create creates and initializes a new instance of the TDecompressionStream class. It calls the inherited Create and passes it the Source stream. The source stream is the stream from which the compressed (deflated) data is read.

If ASkipHeader is true, then the zlib data header is skipped, allowing TDecompressionStream to read deflated data in a .zip file. (this data does not have the zlib header record prepended to it).

Note that the source stream is by default not owned by the decompression stream, and is not freed when the decompression stream is destroyed.

 

TinyPortal © 2005-2018