I’ve been working on a project for university that involves Arduino, LoRaWAN, and TheThingsNewtork. To transmit data efficiently, we decided to use MessagePack, which is supposed to be efficient and fast (disclaimer: I haven’t done much research to confirm if this is the best option).

However, I wasn’t able to find a JavaScript function with no external dependencies to decode the MessagePack message. So, with the help of Github Copilot, my debugging skills, and ChatGPT, I arrived at this solution:

It’s not a complete solution, but it seems to work for my use case. Hopefully, it can be useful for you too.