arrow_back Is it possible to save the connection to the zip archive between requests?

2 votes
Good afternoon.
Given: several hundred thousand images in a zip archive. ZipArchive is used to access them.
Task: display a web page with several dozen images.
Problem: long loading of images, probably due to the fact that for each image must be in php to open the archive, get the name of the image and send.
Question: is there a mechanism to maintain an open archive connection between multiple queries (similar to attr_persistent in databases).
Clarification: do not offer to unpack the archive.
Thank you.


Roman Mirr , zero compression CM_STORE. Thanks for the idea, I will try it.
cohen ,
Doesn't it make sense that unpacking images from an archive takes time every time?
The archive is updated from the outside. Images are both added and removed. It is easier to replace the entire archive.
1. if it's updating, then how do you keep it open all the time?
2. Let's say it is being updated. How does that prevent it from being unpacked?
So you have to work with one single archive all the time? Why not unpack it then?

1 Answer

8 votes
Another question in the series of "can I drink water with my nose, because I put tape over my mouth.

Unzip the archive and don't do anything stupid


Path lengths exceed 259 characters, last parts of the name exceed the allowed maximum of 256 characters, and there are Unicode characters. ZipArchive handles all this, the operating system does not. Names and paths cannot be changed.
And you're overly emotional.
It's all solvable.
If you initially try to solve the original problem, rather than looking for a crutch to prop up other crutches.