3

has anyone of you got some experience with working on zip-archives? I have a programm which searches on a filesystem and searches for keywords in XML files. But the XML files are stored in zip64 archives. So every time I want to search something I have to unzip the files. Since I'm working with Qt the first thing I tried was Quazip but just like libarchive it doesn't seem to support zip64. Than I found libraries like the poco-library or zipstream, but having trouble getting it going.

Now I wanted to ask if anyone can tell how much longer it might take to perform a search on zipped files. Because the search already takes up to 15min. And if it is a lot slower it might not be worth the effort( e.g. if it takes more than 20minutes afterwards I wouldn't use it).

Is it possible to make a prognosis about the additional time to work with the zipped files?

Thanks in advance for any help!

samoncode
  • 466
  • 2
  • 7
  • 23
  • 1
    there are several approaches to this, but I think none will make you happy performance wise. Eg ZLIB can handle zip64 if you take care of the Zip64 headers yourself - but this will of course take CPU power and since you want to search inside archives (even the full files?) it most likely has to fetch to memory, decompress, search, clear memory -> bad performance. – Najzero Dec 13 '12 at 07:35
  • @Najzero thank you for your comment! If there isn't a fast way to do this I might just stay with the existing solution. – samoncode Dec 13 '12 at 07:56
  • http://stackoverflow.com/questions/8291465/free-c-c-based-zip-zip64-library – kol Dec 13 '12 at 07:57
  • http://www.codeproject.com/script/Articles/ViewDownloads.aspx?aid=7530 - good eaxmaple of working with zip archives – Ruslan F. Dec 13 '12 at 09:17
  • libarchive 3.0 used zlib. If the zip64 support is not present in it, I don't think it will be too complicate to add it – benjarobin Dec 13 '12 at 10:03

1 Answers1

0

InfoZip supports zip64. However, anyway to search in compressed XML you should decompress them and this takes most of your time.

Nickolay Olshevsky
  • 13,706
  • 1
  • 34
  • 48