Archive & Extract Files with these components

Applies To

OS:
VB:
NT, 9x, 2000
5, 6

Download... (15 kb)

archiver image Sometimes you need to put a couple of files together into one and send them somewhere. Zipping them would be overkill, since you would need to buy an extra component. I had a need like that not too long ago. I needed to ferry an HTML file with all the images, CSS and JavaScript files from the intranet protected by proxy to a place on the network available to the Internet. Another component would take the file, unpack it and display the HTML with all the images, etc…

So I came up with 2 components, CArchive and CExtract. As you probably guessed, CArchive takes a bunch of files and packs it into one archive file. CExtract takes the archive file and outputs its contents. Basically the operations are similar to WinZip, except that the archive file is not compressed.

Both components raise events to show their progress. While these components are good enough for light work, some more work is needed to be able to easily handle large files 10 MB and higher. For instance, the components are missing a Cancel method, which is easily added.

Included in the download is a demo program that archives and extracts files. To start the demo, download, then double click on g.vbg - that starts both the ActiveX DLL and the Standard EXE demo projects. Then, press the Run button. Enjoy.

Download... (15 kb)