How to find the position of Central Directory in a Zip file?

前端 未结 3 1266
一向
一向 2021-02-20 13:02

I am trying to find the position of the first Central Directory file header in a Zip file.

I\'m reading these: http://en.wikipedia.org/wiki/Zip_(file_format) http://www.

3条回答
  •  再見小時候
    2021-02-20 13:31

    I ended up looping through the bytes starting from the end. The loop stops if it finds a matching byte sequence, the index is below zero or if it already went through 64k bytes.

提交回复
热议问题