I've been experimenting with the ZIP format, specifically random access to contents inside it.
I know that ZIP supports random access, but AFAIK that is only to entires files inside the ZIP archive.
I was wondering if it was possible to load only a chunk of a file inside a ZIP file, without loading the entire subfile into memory
Note: I am working only with non-compressed zip files
If you are running on Windows or a POSIX-compatible system (like Linux), you can use memory-mapped files. Using this solution, the ZIP file will be mapped to virtual memory so that you can iterate through its content without loading and parsing the whole file in memory. You can find more information here and there. Most modern operating systems implement this nowadays.
While memory-mapped files is great as it can be integrated with many existing tools, you can read the file yourself using low-level seek & reads. Since files are not compressed, you can:
Plain files in the zip data format are written contiguously and can be retrieved so safely.
You can find more information about the ZIP file format here.