MCPcopy Create free account
hub / github.com/assaultcube/AC / zipmanualopen

Function zipmanualopen

source/src/zip.cpp:713–727  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

711// simple interface to read zip contents without mounting them first
712
713void *zipmanualopen(stream *f, vector<const char *> &files)
714{
715 if(!f) return NULL;
716 zipdirectoryheader h;
717 ziparchive *arch = new ziparchive;
718 if(!findzipdirectory(f, h) || !readzipdirectory(f, h.entries, h.offset, h.size, arch->files))
719 {
720 delete arch;
721 delete f;
722 return NULL;
723 }
724 arch->data = f;
725 loopv(arch->files) files.add(arch->files[i].name);
726 return (void *)arch;
727}
728
729stream *zipmanualstream(void *a, int n)
730{

Callers 5

zipmodgetdescFunction · 0.85
zipmodgetfilesFunction · 0.85
zipmodgetrevisionFunction · 0.85
createconfigtemplatesFunction · 0.85
processdownloadFunction · 0.85

Calls 4

findzipdirectoryFunction · 0.85
readzipdirectoryFunction · 0.85
loopvFunction · 0.70
addMethod · 0.45

Tested by

no test coverage detected