-
• #2
The output isn't encoded at all, past what heatshrink provides.
I doubt lxbase62 would do it, but there is https://www.npmjs.com/package/heatshrink-ts which might help you?
Otherwise it'd be up to someone to use emscripten to convert the existing C code to JS. For someone with a little experience with it, it should just be a few minutes work.
-
• #3
@Gordon thanks for the info.
With that typescript example, the decoder requires two parameters that I don't know the values of which I'm hoping you can tell me!
WINDOW_BITS and LOOKAHEAD_BITS. I'm guessing these are the configuration properties from https://github.com/atomicobject/heatshrink/#configuration so hopefully you have set this somewhere in the Espruino source that I can't find and you can tell me what they are :D
-
• #4
Ahh - I have! https://github.com/espruino/Espruino/blob/master/libs/compression/heatshrink/heatshrink_config.h
I'd be interested to see if they have to be correct as long as they're the same or bigger than the ones Espruino uses though.
Hi @Gordon,
Just wondering if you can provide any more details on https://www.espruino.com/Reference#t_heatshrink ?
Is the output encoded in any way? Is https://github.com/polygonplanet/lzbase62 likely to be able to decode Heatshrink compressed data? Or do you know of any other JS implementation of Heatshrink that will let me decompress?
Edit: Looks like we had exactly the same thoughts for what I'm trying to achieve: http://forum.espruino.com/comments/14468542/ still interested if you've had any further ideas on how I could decompress in JS-land.