Rewrite KZip file parsing
The old file parser was reading the file in order looking for the local header and central directory header markers, but that breaks when those markers are part of the data of the files inside the zip file itself.
The correct way is to scan for the end of central directory record signature and then from there use the offsets to jump to the rest of the data.
TODO:
- Doesn't work on sequential IO devices, do we care?
- The two test files introduced because of https://marc.info/?l=kde-frameworks-devel&m=142402457702039&w=2 fail, the end of central directory record has a broken offset, do we care? Ark (using libarchive?) can't open them either
- Add an autotest with the files that didn't use to work and now work
Edited by Albert Astals Cid