Sometimes you need a simple and convenient way to compress and decompress files. I'm not talking about archiving, where multiple files and a directory are stored in one file (with optional compression) like ZIP, CAB, LHA, and so many others. Just compressing files singly.
Few people seem to be aware of one of the Microsoft APIs for file compression. This is meant for creating and compressing (and re-applying) patches for software updating, but it also works on non-code files and will even work without "differencing."
There are two DLLs to PatchAPI. One comes in Windows and is named mspatcha.dll and the other comes in the Windows SDK and is called mspatchc.dll. The "A" DLL applies or expands a compressed delta patch while the "C" DLL creates or compresses files to make a "patch." if you need to do both compression and decompression in your applications you'll need to deploy mspatchc.dll but it requires no registration.
The attached demo uses both parts of PatchAPI, so to run it you will need to put mspatchc.dll into the Project (and EXE's) folder. DeltaAPI.bas has all of the API constant and entrypoint definitions you'll need for most purposes.
While some of this may seem awkward, the ease of use is impressive. And those making "self updaters" may find this a great way to create update patch files. Read the MSDN article for more details.