readNext static method
Implementation
static Future<ZipHeader?> readNext(FileBuffer src, int signature) async {
if (src.isEnd) return null;
ZipHeader r;
if (signature == 0x0403) {
// local file
r = ZipLocalFile(signature);
} else if (signature == 0x0201) {
// central directory
r = ZipCentralDirectory(signature);
} else if (signature == 0x0605) {
// end of central directory
r = ZipEndCentralDirectory(signature);
} else {
return null;
}
r.offsetStart = src.position - 4;
await r._read(src);
r.offsetEnd = src.position;
return r;
}