zipfile supports ZIP archives with prepended data (such as SFX executable or zipapp program). Normally, ZIP archive contains offsets from the beginning of the ZIP file, but if it detects that the central directory is located at other position, it corrects locations of all files by the corresponding offset.
There is also "Zip64 end of central directory record" offset for which is written explicitly and can be used to calculate the size of prepended data. Currently its consistency with the central directory offset is not tested.
Linked PRs
zipfilesupports ZIP archives with prepended data (such as SFX executable or zipapp program). Normally, ZIP archive contains offsets from the beginning of the ZIP file, but if it detects that the central directory is located at other position, it corrects locations of all files by the corresponding offset.There is also "Zip64 end of central directory record" offset for which is written explicitly and can be used to calculate the size of prepended data. Currently its consistency with the central directory offset is not tested.
Linked PRs