12void ZipFileAdapter::decompress(
FileBase& f, Decompressed& d)
16 if (zlib.get32LE() != 0x04034B50) {
24 if (zlib.get16LE() != 0x0008) {
25 throw FileException(
"Unsupported zip compression method");
30 zlib.skip(2 + 2 + 4 + 4);
32 unsigned origSize = zlib.get32LE();
33 unsigned filenameLen = zlib.get16LE();
34 unsigned extraFieldLen = zlib.get16LE();
35 d.originalName = zlib.getString(filenameLen);
36 zlib.skip(extraFieldLen);
38 d.buf = zlib.inflate(origSize);
virtual std::span< const uint8_t > mmap()
ZipFileAdapter(std::unique_ptr< FileBase > file)
This file implemented 3 utility functions: