L
L
lukoie2020-12-03 02:10:53
Data archiving
lukoie, 2020-12-03 02:10:53

How to get the file size in it without downloading the whole zip?

Hello
There is a source of open data, where large xml files are laid out in an archive.
The problem is that there are several files in the archive. And if one of them is updated, then the archive is re-uploaded. When only one file of them is needed so as not to download again, unpacking and comparing the CRC with the previous download, is it possible to somehow find out the size of the file inside the archive without downloading the entire file?

Someone may have done this, knows how to work with the zip format, maybe there is a header, or just the end of the file (I see that the file names are stored there) can be downloaded to go through the listing without downloading a large archive every time?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Korotenko, 2020-12-03
@firedragon

Hmm, here it is in python,
https://gist.github.com/davide-romanini/cec3bab01c...
There is something similar in C# too

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question