List Archive


Thread Index


From: Andreas Falkenhahn <>
To: Dieter Baron <>
Subject: Re: Why should I return the size in ZIP_SOURCE_STAT?
Date: Wed, 1 Nov 2017 16:17:18 +0100

On 01.11.2017 at 10:10 Dieter Baron wrote:

> The only information you have to report accurately is
> ZIP_STAT_SIZE and ZIP_STAT_CRC if your data is compressed or
> encrypted). libzip can’t figure those out on its own.

Hmm, this is still confusing me. I'm not setting any of those
when adding a file from a source using zip_file_add(). My
code is just this:

        case ZIP_SOURCE_STAT: {
                struct zip_stat *st = (struct zip_stat *) data;         
                return sizeof(struct zip_stat);

And it's working fine so it looks like none of the ZIP_STAT_XXX
flags have to be set when adding files using zip_file_add()...

Best regards,
 Andreas Falkenhahn                   

Made by MHonArc.