Replies: 2 comments 2 replies
-
|
Update 3: Universal 10-language model — multilingual is solved
Got this question on Reddit — how would this work on devices not connected to a phone? The full model is 94 MB — way too big. But with pruning:
Compression quality would drop from 5-7x to roughly 2-3x, but still a significant improvement over raw UTF-8. |
Beta Was this translation helpful? Give feedback.
-
|
What would this mean for standalone nodes w/o a companion phone? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Portnum 7 has been unused since Unishox2 was removed due to buffer overflow (#3841, PR #3606). I built an alternative approach that avoids those issues.
How it works: Character-level 11-gram language model + arithmetic coding. The model predicts the next character from context, and the coder spends fewer bits on predictable characters. Unlike zlib/Unishox2 which look for patterns inside the message, this uses external language statistics — so even short messages compress well.
Results on typical mesh messages:
100% lossless, verified on 2000 test messages.
Safety: Compressed format includes original text length in header → decompression is always bounded. No unbounded buffer writes, no expansion beyond input+1 byte. Graceful fallback if compressed > original.
Architecture: Compression runs on client apps (Android/iOS/Web), not on ESP32. Model needs ~15 MB RAM — doesn't fit on ESP32, but phones have plenty. The radio just relays bytes, no firmware changes needed.
Working demo: https://dimapanov.github.io/mesh-compressor/
Code: https://github.com/dimapanov/mesh-compressor
Questions:
Beta Was this translation helpful? Give feedback.
All reactions