[fpc-pascal] GZip - Stream decompress only in memory

Michael Van Canneyt michael at freepascal.org
Mon Sep 5 21:33:10 CEST 2016



On Mon, 5 Sep 2016, Marcos Douglas wrote:

> On Mon, Sep 5, 2016 at 3:09 PM, Marcos Douglas <md at delfire.net> wrote:
>> On Mon, Sep 5, 2016 at 2:50 AM, Michael Van Canneyt
>> <michael at freepascal.org> wrote:
>>> As far as I know these things can be done with all the FPC classes as well ?
>>> The implementation in base64 unit can perfectly do everything in memory.
>>> And ZUncompressStream can be done with TDecompressionStream ?
>>
>> Well, if FPC can do the job without 3rd dependencies... I will try. Thank you.
>
> No, I got an error:
> ================================
> [Debugger Exception Notification]
>
> Project project1 raised exception class 'Edecompressionerror' with message:
> data error
>
> In file '.\paszlib\src\zstream.pp' at line 302:
> raise Edecompressionerror.create(zerror(err));
> ================================

What is the stream content ? TGZFile or simply compressed ? 
If it is TGZFile, then the header must be skipped before uncompressing data.

Michael.



More information about the fpc-pascal mailing list