Your comments

Please don't think that I would change the code I would be printing. It can be used for written exams, research papers, etc.

Do you plan on supporting other compression format maybe rar, tar, gz, etc? This would be extremely useful because some open source codes are compressed in different formats.

If you are succesful creating the file for the first time, delete it and do the process again. Happens for me everytime. I'm not using any filename so it's output would be .html.

Great for teachers and students alike.