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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Compressed data in a .res file

Status
Not open for further replies.

bobbie100

Programmer
Aug 29, 2003
64
GB
The program I am working on incorporates a large amount of ascii data which is input as RC_Data within a .res file.
This data dominates the size of the executable.

Is there any way of storing the data in a compressed format (e.g. zip) within a res file, and then uncompressing when it is loaded at run-time via a resource stream?
 
I have used the ZLib data compression library which comes with Delphi 7 (and possibly earlier versions) to do something similar. It seems to work okay.

You would need to write a small Delphi program that compressed your data and wrote it as a resource file.

You then build your main program which would have another ZLib routine to decompress the data.

I would guess that the ZLib compression is reasonably good but I haven't compared it to something like WinZip.

Andrew
Hampshire, UK
 
I have used the Zipmaster 3rd party component, free to download. Always works ok for me.


Steve: Delphi a feersum engin indeed.
 
Many thanks to you all for your suggestions. Plenty of options for me choose from.

Bob

"To err is human, but you have to be a programmer to really screw things up!"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top