How does one find the start of the “Central Directory” in zip files?

后端 未结 4 1788
说谎
说谎 2021-02-05 04:20

Wikipedia has an excellent description of the ZIP file format, but the \"central directory\" structure is confusing to me. Specifically this:

This orderin

4条回答
  •  心在旅途
    2021-02-05 04:47

    In case someone out there is still struggling with this problem - have a look at the repository I hosted on GitHub containing my project that could answer your questions.

    Zip file reader Basically what it does is download the central directory part of the .zip file which resides in the end of the file. Then it will read out every file and folder name with it's path from the bytes and print it out to console.

    I have made comments about the more complicated steps in my source code.

    The program can work only till about 4GB .zip files. After that you will have to do some changes to the VM size and maybe more.

    Enjoy :)

提交回复
热议问题