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

Ewald ewald at yellowcouch.org
Thu Mar 28 18:11:16 CET 2013


Once upon a time, Flávio Etrusco said:
> On Thu, Mar 28, 2013 at 8:51 AM, José Mejuto <joshyfun at gmail.com> wrote:
>
>> Hello,
>>
>> Just quoting the RFC1952 about .gz format:
>>
>> --- http://tools.ietf.org/html/rfc1952 --------
>>
>> 2.2. File format
>>
>>       A gzip file consists of a series of "members" (compressed data
>>       sets).  The format of each member is specified in the following
>>       section.  The members simply appear one after another in the file,
>>       with no additional information before, between, or after them.
>>
>> -----------------------------------------------
>>
>> So I think it is legal to concatenate several .gz files and get a final .gz
>> with several files inside.
>>
>> In the other hand, yes, the usual behavior in .gz is to store only one file.
>>
>> --
> "Members" refer to each available section according to the flags.
> Re-read this whole paragraph you posted and a few following you'll
> realize only one "file" is allowed in a gzip file/blob.
Alright, now I am contradicting what I said earlier, but there can
apparently be more than one file in a gzipped `thing`: see
https://en.wikipedia.org/wiki/Gzip#File_format . It is not really all
files in one container, but more like concatenating serveral of these
one-file gzipped files, if you see what I mean. Anyway, I've never seen
it happen, so I'm going to leave it at that before I start sounding
silly ;-)

-- 
Ewald




More information about the fpc-pascal mailing list