I made a silly library, mojibake.
https://github.com/MinisculeGirraffe/mojibake
There are at least 2048 unique emoji graphemes in the unicode specification. Therefore an emoji is actually just an 11 bit unsigned integer with extra steps.
This library packs bytes bytes into 11 bit unsigned integers, which are then mapped to sequences of unicode characters that display as a single grapheme. Functionally base2048 encoding bytes in emoji.
The cool thing is that it minimizes the number of graphemes, while drastically increasing the bytes and character count.
Example
Original Text:
Value: Shrek 2 was the greatest film ever made!!
Bytes: 41,
Characters: 41,
Graphemes: 41
Mojibake Encoded:
Value: 🇻🇳👌🏿🪀🔶🫳🏿🧏🏻📼🕺🏾🤛🏻🦺🤵🏽👦🏼🗄️💆🏿⚗️↗️2️⃣🧥🤵🏻🕤🙆🫚🪙😟🇦🇪🫳🏽🇸🇲😹🏴🛌🏻
Bytes: 210,
Characters: 55,
Graphemes: 30
Decoded Text:
Value: Shrek 2 was the greatest film ever made!!
Bytes: 41,
Characters: 41,
Graphemes: 41
Please use in production on your companies web server instead of base64.