barracudanetworks/ArchiveStream-php — pull request #8 by JohnMaguire (2014-09-03 15:58:44+00:00)
Title: fixes corrupt ZIPs when archive size is over 4GB

I also included some cleanup (code style, removing non-ZIP64 functionality, name cleanup, comments) - sorry for making it a bit more difficult to read, but it made debugging much easier.

When a ZIP file was over 4GB, but every file inside of it was under 4GB, the ZIP64 format would never get triggered. As such, the offsets for where different data existed within the archive were overflowing uint32's. The solution was to switch to using ZIP64 as there isn't really a great way to detect whether the archive is going to be over a ZIP64 size before data gets sent down to the client.

If this causes incompatibility issues (which is unlikely as the ZIP64 standard was added in 2001) then we can investigate other methods.