Create a remote Zip reader Class #115
Labels
Digital Preservation
enhancement
New feature or request
help wanted
Extra attention is needed
question
Further information is requested
What is Diego talking about? Gosh...
Ok. We may want to have Zipped files somewhere remote, but also maybe somewhere local. For the remotes, to know/get a file we may not want to read the whole thing!
ZipArchive
class and the zip:// stream wrapper in PHP do a pretty good job of getting for a local file one-specific file out of a ZIP file. But what if we do not want to download it?Well happens that ZIP is a pretty well structured file format and the Central Directory (may have a different name but I can't remember it) is at the end inside the last 65K bytes.
Here is a Python Script that does exactly that, we need this translated to PHP. I can read the code and I totally get it, I may need some help with the unpacking. But, maybe there is a Library already in PHP? If not we may want to create it. Super simple but also quite powerful. Most of the time we really just want to get one file (e.g a manifest.json). This is not for ZIP64 by the way.
The text was updated successfully, but these errors were encountered: