Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

File compression?

Status
Not open for further replies.

Mats

Technical User
Feb 18, 2000
83
EU
Hello,

Does anyone have code for creating simple .zip file? I am not interested in using third party components (WinAPI are o.k. since I can assume that they are present on any machine running windows) but I would like to be able to include this functionality into my projects straight away. I just need to be able to zip large textfiles (15 MB or so) so that they can be attached to email without jamming up the system.


Thanks,
Mats
 
Hello

As far as I'm aware there are no inherent windows compression api's or utilities.
The closest they get is NTFS file compression used by NT, but you can't use that for this purpose.

I'm sorry to say but I think you will have to get a tool i.e. DynaZip (which is very easy) or shell out to something like WinZip or pkZip.
The problem with this is that you would then need the component on every machine (unless you register it on a server using a component manager)

Hope this helps
 
Since about IE3, there have been inherent APIs for compression and decompression on Windows (actually, AFAICR, the Internet Explorer requirement is for W95; all later versions of Windows and NT include the necessary DLL)! Basically, the DLL that provides decompression (and compression) of CAB files can be used. Whilst CAB files can have a proprietary MS compression, they can also use MSZIP, which is more-or-less a straightforwqard ZIP format. The file of interest is called CABINET.DLL

Trouble is that it is not terribly straightforward to use, so softwarescience's advice may be worth following.

However, for those that are curious, the following link may be of some assistance:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top