It took me two days total, but I finally got an LZW decompression algorithm for the Keen EGA format working in Visual Basic. It uses all manner of crazy stuff, from bit lists to multiline lambdas. It could definitely use some cleaning up and refactoring; during my work I switched from byte arrays to strings.
It successfully decompressed Keen 1's "egalatch" and "egasprit" files, which the game accepted after I changed the "egahead" compression flag manually. Tomorrow, I will do my refactoring on the decompressor and implement compression, which hopefully will be easier.
View the algorithm on PasteBin
No comments:
Post a Comment