I want to retrieve a list of file names inside a zip file on a remote server, and a specific file (from this zip) without downloading the entire zip content, using the HTTP range method as described at http://www.codeproject.com/KB/cs/remotezip.aspx.
I know how to use the Range: ...
header, I know how to, for instance, download the image in parts and concatenate the parts together to make up an image:
- create socket
- connect
- send request:
HEAD %s HTTP/1.1\r\nHOST: %s\r\n\r\n
receive headers only and find insideContent-Length
(I know it's not always the best option, but my server supports it) in order to know the size of the image we need to download - send
GET
withRange: ...
, and receive response - repeat step 4 until you download the whole image
However, I do not know how can I accomplish the task I described (the one with zips). I saw this topic: Is there a library for retrieving a file from a remote zip? but there people use libraries. It's not my goal. I would like to know how raw HTTP operates on zips.