tags:

views:

20

answers:

1

I'm really kind of surprised I couldn't find an answer to this on Google. Especially since xml files lend themselves to being zipped since they are so verbose.

I'm implementing the sax reader from the msxml library in my VB6 program to read large multi-gigabyte xml files from a zip file. Unzipping these files to the hard drive and then reading them is not the way to go since unzipping to disk is not necessary and so slow. This is where my problem comes in.

I can use zlib to read chunks of data from the zip file and process those chunks, but I don't see any way in the SAXXMLReader to process chunks. I've read that the parse method accepts IStream, but I haven't been able to find any method using Google to get an IStream from a zip file.

Can anyone here please provide me an answer to this problem or a pointer in the right direction? Thank you so much for your time.

+1  A: 

The idea of getting a stream from the zip file is certainly how I'd deal with this in Java.

I'm not a .Net developer, so it's hard for me to certify this, but it sort of looks like SharpZipLib may have what you're looking for.

Don Roby
Unfortunately that is .NET and I am using the older VB6. If I don't find a solution soon, I'll have to use this method and call it from VB6 using COM.
dmaruca
No idea for VB6. I've coded VB6, but a long time ago, and never streams.
Don Roby