[fpc-pascal] TStream descendant to compress/decompress gzip data from another stream

José Mejuto joshyfun at gmail.com
Wed Mar 27 19:54:25 CET 2013


El 27/03/2013 19:22, Michalis Kamburelis escribió:

> Google found an old thread on lazarus mailing list about this ("FPC,
> gzip and stream") but without any solution, everything mentioned there
> has either the limitations of TCompressionStream/TDecompressionStream
> (no gzip format) or TGZFileStream (not able to work wit ObjectPascal
> streams).
>

Hello,

.gz is a quite simple format, but it can not be implemented as a TStream 
(only) descendant because in a single .gz file many files could be added 
so something like the class to handle .zip files should be used.

Parsing the .gz header is easy, and calling TCompressionStream and 
TDecompressionstream over the payload should be easy, but only for the 
first file in the .gz

-- 




More information about the fpc-pascal mailing list