Jani Poikela
Jani Poikela
tried to use npm package "lzh" but it does not compile :unamused:
I tried to make a simple node command line with lzh package ( https://www.npmjs.com/package/lzh), to try if it can decompress MSX lzh files.. it has a C-implementation, that does not...
well, the lhasa implementation is not too complex either.. starting at: https://github.com/fragglet/lhasa/blob/master/src/extract.c#L575
in a search for an easy solution I made a Kaitai struct https://gist.github.com/jpoikela/f4be749de62bb9716856835829f9a03f that can be tried with https://ide.kaitai.io/# and some lzh file.. seems to get the file parts correctly...
btw, I followed this information about the level 0 and level 1 headers: https://ist.uwaterloo.ca/~schepers/formats/LHA.TXT
I try to make a POC with Kaitai, it can be dropped if we get to write stand-alone file parsing..
also, running lhasa through emscripten could be worth a POC..
well, both seems too cumbersome.. I'll be writing a lhasa-inspired LHZ decoder in JS.
it's definitely my goal to make it usable for your great WebMSX 🙂 I already wrote some parts, but it may take a week or two to have anything usable...
hi! I just got first decompression hacked and run in webMSX :sweat_smile: the biggest struggle was with the bit buffer. now, I only have lh0 and lh5 decoders, but I...