MCPcopy Create free account
hub / github.com/beefytech/Beef / Get

Method Get

BeefySysLib/util/ZipFile.cpp:97–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

95
96
97bool ZipFile::Get(const StringImpl& fileName, Array<uint8>& data)
98{
99 if (mData == NULL)
100 return false;
101
102 int idx = mz_zip_reader_locate_file(&mData->mZip, fileName.c_str(), NULL, 0);
103 if (idx < 0)
104 return false;
105
106 size_t size = 0;
107 void* ptr = mz_zip_reader_extract_to_heap(&mData->mZip, idx, &size, 0);
108 data.Insert(data.mSize, (uint8*)ptr, (intptr)size);
109 return true;
110}

Callers 9

Res_JPEGCompressFunction · 0.45
Res_WritePNGFunction · 0.45
Res_SerializeModelFunction · 0.45
ReadFileMethod · 0.45
Compression_CompressFunction · 0.45
Compression_DecompressFunction · 0.45

Calls 2

c_strMethod · 0.45
InsertMethod · 0.45

Tested by

no test coverage detected