Grauw’s blog

Gunzip for MSX

October 18th, 2015

Lately I’ve been working on a gzip (.gz) decompression implementation for MSX, which as of yesterday is functional. Although I’ve been developing it for VGMPlay, I’ve implemented it as a stand-alone “gunzip” utility.

The gunzip project page is here:

http://www.grauw.nl/projects/gunzip

And of course it is open source and liberally licensed, so you can reuse the code in any way you want.

I’m pretty happy with the end result because not only does it successfully decompress gzip files, it’s also pretty efficient in doing so. Here are some test results with the first disk of Aleste 2, comparing various decompression formats for MSX:

Test on Philips NMS 8245 MSX2 (openMSX) with Sunrise IDE:

  • gunzip 1.0 (244129 bytes): 133s
  • gunzip 1.1 (244129 bytes): 87s
  • pmext 2.22 (247552 bytes): 619s
  • lhext 1.33 (252614 bytes): 278s
  • tunzip 0.91 (247414 bytes): 341s

Test on Panasonic FS-A1GT turboR (openMSX) with Sunrise IDE:

  • gunzip 1.0 (244129 bytes): 26s
  • gunzip 1.0 (244129 bytes): 18s
  • pmext 2.22 (247552 bytes): 127s
  • lhext 1.33 (252614 bytes): 49s
  • tunzip 0.91 (247414 bytes): 46s

Note, this is just a test with a single file, however it shows the general trend. I’m pretty happy to see this result, it follows from the efficient approach I took to decoding the huffman tree.

Skipping the checksum verification further improves speed by 25% (turboR 20s 13s, MSX2 100s 55s), however I’ll let the code settle for a while before I expose that as a command line option.

Finally, I’ve tested with a fairly large set of gzip files, but if you encounter any errors, please send me the gz file to test with and I will fix it.

[Edit: Added gunzip 1.1 performance results.]

Grauw

Comments

None.