Is there anyway to compress a local html file?

1

I've got a program I've written that outputs a report in html format. This report can get very large (20-30Mb), and this tool can be run hundreds of times.

To reduce disk usage, I'd like to compress the report, but have it still readable by a browser. I know most modern browsers can accept compressed html from a web server - is there any way to make then accept it from a disk file?

xorsyst

Posted 2011-03-03T09:09:54.193

Reputation: 479

Answers

3

Assuming you are on Windows and all the report files are output to the same location you could just compress the folder.

Right click over the folder name then click on the Advanced button in the General tab.

The Advanced Attributes dialog has a "Compress contents to save disk space" option.

Advanced Attributes dialog

Obviously this only compresses the file locally. If you want to send it so someone else it will still need to be added to a zip file.

ChrisF

Posted 2011-03-03T09:09:54.193

Reputation: 39 650

This isn't a bad idea - but I also will have to send these reports to customers via email, preferably without making their life complicated by having them extract a zip file or similar. I was hoping there was a way of having a "compressed html" file that browsers would just read. – xorsyst – 2011-03-07T09:27:23.340

@xorsyst - you should have included that information in the question. – ChrisF – 2011-03-07T09:31:27.107