admin管理员组

文章数量:1122832

Does anyone know whether it would be possible to read a zip inside another zip?

For example:

helloworld.zip
 + test1.zip
 + test2.zip
 + ...
bool open_inner(
   struct archive_entry *entry,
   struct archive *parent)
{
    struct archive *a = archive_read_new();
    int rc = archive_read_open_memory(a,
                                      // what to pass?
                                      archive_entry_size(entry));
    if (rc == ARCHIVE_OK)
    {
        // do stuff with inner zip
        archive_read_free(a);
        return true;
    }
    
    archive_read_free(a);
    return false;
}

There is no examples from GitHub on how to use archive_read_open_memory with inner archive... not even sure if that's not even possible. Could someone give me some hint?

本文标签: gzipHow to read an inner zip within a zip using libarchiveStack Overflow