News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

CD - Compress-Decompress Utility

Started by fearless, October 22, 2023, 02:13:10 AM

Previous topic - Next topic

Biterider

Hi
I did some programming around the functionality of the CD.exe application to decompress bitmaps as shown in the CD source code, but also to create icons from compressed .ico files stored as RCDATA in the resources section.
In my test case, 408kB of resources are compressed into a 152kB binary file. 
Not all resources can be compressed, such as the application's main icon, which needs to remain accessible to the operating system so that the applications icon displays properly in File Explorer, among other things. In my test application, this icon consumes another 23kB from the 152kB, which makes compression a really excellent feature.

The clue to extract icons from a file structure is to replicate what the resource compiler does. It is explained here: 
https://devblogs.microsoft.com/oldnewthing/20231025-00/?p=108925

Attached the source and the demo binary.

Biterider

fearless


TimoVJL

Now on, all code for Windows 10/11 should be mentioned.
Programming world goes further, so have to clearly tell, for what Windows OS code is for.
I write this message from Windows 7 PC, as i have a very little usage for Windows 10 PC, even it had two monitors.
May the source be with you

fearless

Thanks Timo, I have updated the first post to indicate that, as it has been mentioned in this thread a few times, and it is a relevant point.