All Projects â†’ keith-turner â†’ Ecoji

keith-turner / Ecoji

Licence: apache-2.0
Encodes (and decodes) data as emojis

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Ecoji

unicode-emoji-json
Emoji data from unicode.org as easily consumable JSON files.
Stars: ✭ 149 (-77.79%)
Mutual labels:  emoji, unicode
umoji
😄 A lib convert emoji unicode to Surrogate pairs
Stars: ✭ 68 (-89.87%)
Mutual labels:  emoji, unicode
Wordle2Townscaper
Wordle2Townscaper is meant to convert Wordle tweets into Townscaper houses using yellow and green building blocks.
Stars: ✭ 64 (-90.46%)
Mutual labels:  emoji, unicode
unicodemoticon
Trayicon with Unicode Emoticons using Python3 Qt5
Stars: ✭ 21 (-96.87%)
Mutual labels:  emoji, unicode
Uni
Query the Unicode database from the commandline, with good support for emojis
Stars: ✭ 633 (-5.66%)
Mutual labels:  unicode, emoji
urdu-characters
📄 Complete collection of Urdu language characters & unicode code points.
Stars: ✭ 24 (-96.42%)
Mutual labels:  unicode, encoding
rm-emoji-picker
A modern, ES2015 emoji picker and editor.
Stars: ✭ 76 (-88.67%)
Mutual labels:  emoji, unicode
Js Codepage
ðŸ’ą Codepages for JS
Stars: ✭ 119 (-82.27%)
Mutual labels:  encoding, unicode
Xmorse
🌞 ~1.5Kb morse code library for all. äļ€äļŠæ”Ŋ持 Unicode äļ­æ–‡æ‘Đæ–ŊåŊ†į įž–į įš„ Javascript 嚓。
Stars: ✭ 266 (-60.36%)
Mutual labels:  encoding, unicode
no-facebook-emoji
Get rid of those ugly emojis now! [stopped working ðŸ˜Ē]
Stars: ✭ 15 (-97.76%)
Mutual labels:  emoji, unicode
emoji-db
A database of Apple-supported emojis in JSON format. Used by my Alfred emoji workflow.
Stars: ✭ 32 (-95.23%)
Mutual labels:  emoji, unicode
Smile
😄 Emoji in Swift
Stars: ✭ 359 (-46.5%)
Mutual labels:  unicode, emoji
emoji-to-scale
Your favorite emojis. To scale.
Stars: ✭ 334 (-50.22%)
Mutual labels:  emoji, fun
Lingo
Text encoding for modern C++
Stars: ✭ 28 (-95.83%)
Mutual labels:  unicode, encoding
Encoding rs
A Gecko-oriented implementation of the Encoding Standard in Rust
Stars: ✭ 196 (-70.79%)
Mutual labels:  encoding, unicode
contour
Modern C++ Terminal Emulator
Stars: ✭ 761 (+13.41%)
Mutual labels:  emoji, unicode
Twitter Text
Twitter Text Libraries. This code is used at Twitter to tokenize and parse text to meet the expectations for what can be used on the platform.
Stars: ✭ 2,627 (+291.51%)
Mutual labels:  unicode, emoji
V Emoji Picker
🌟 A Lightweight and customizable package of Emoji Picker in Vue using emojis natives (unicode).
Stars: ✭ 231 (-65.57%)
Mutual labels:  unicode, emoji
ngx-emoj
A simple, theme-able emoji mart/picker for angular 4+
Stars: ✭ 18 (-97.32%)
Mutual labels:  emoji, unicode
Rofimoji
An emoji and character picker for rofi 😁
Stars: ✭ 319 (-52.46%)
Mutual labels:  unicode, emoji

Ecoji ðŸĢ🔉ðŸĶðŸ”ž

Ecoji encodes data as 1024 emojis. It's base1024 with an emoji character set and it preserves sort order. This repository implements Ecoji using Go. There are links to other implementations below. Visit ecoji.io to try Ecoji in your browser.

Many have asked how Ecoji compares to base64. The short answer is that a string encoded with Ecoji will have more bytes, but fewer visible characters, than the same string encoded with base64. With Ecoji, each visible char represents 10 bits, but each character is multi-byte. With base64 each char represents 6 bits and is one byte. The following table shows encoding sha256 in different ways.

Encoding Bytes Characters
none 32 N/A
hex 64 64
base64 44 44
ecoji 112 28

Installing

Ecoji is published on snapcraft.io and can be installed with :

sudo snap install ecoji

Usage

$ ecoji -h
usage: ecoji [OPTIONS]... [FILE]

Encode or decode data as Unicode emojis. 😁

Options:
    -d, --decode          decode data
    -w, --wrap=COLS       wrap encoded lines after COLS character (default 76).
                          Use 0 to disable line wrapping
    -h, --help            Print this message
    -v, --version         Print version information.

Examples

Encoding:

$ echo "Base64 is so 1999, isn't there something better?" | ecoji
🏗ðŸ“ĐðŸŽĶ🐇🎛📘ðŸ”ŊðŸšœðŸ’žðŸ˜―ðŸ†–ðŸŠðŸŽąðŸĨðŸš„ðŸŒąðŸ’žðŸ˜­ðŸ’ŪðŸ‡ĩðŸ’ĒðŸ•Ĩ🐭ðŸ”ļ🍉ðŸšēðŸĶ‘ðŸķðŸ’ĒðŸ•ĨðŸ”Ū🔚🍉ðŸ“ļðŸŪ🌞ðŸ‘Ķ🚟ðŸĨī📑

Decoding:

$ echo 🏗ðŸ“ĐðŸŽĶ🐇🎛📘ðŸ”ŊðŸšœðŸ’žðŸ˜―ðŸ†–ðŸŠðŸŽąðŸĨðŸš„ðŸŒąðŸ’žðŸ˜­ðŸ’ŪðŸ‡ĩðŸ’ĒðŸ•Ĩ🐭ðŸ”ļ🍉ðŸšēðŸĶ‘ðŸķðŸ’ĒðŸ•ĨðŸ”Ū🔚🍉ðŸ“ļðŸŪ🌞ðŸ‘Ķ🚟ðŸĨī📑 | ecoji -d
Base64 is so 1999, isn't there something better?

Concatenation:

$ echo -n abc | ecoji
👖ðŸ“ļ🎈☕
$ echo -n 6789 | ecoji
ðŸŽĨðŸĪ ðŸ“ ðŸ
$ echo XY | ecoji
ðŸēðŸ‘ĄðŸ•Ÿâ˜•
$ echo 👖ðŸ“ļ🎈☕ðŸŽĨðŸĪ ðŸ“ ðŸðŸēðŸ‘ĄðŸ•Ÿâ˜• | ecoji -d
abc6789XY

Making Hashes More Interesting

$ cat encode.go  | openssl dgst -binary -sha1 | ecoji
ðŸŒ°ðŸðŸĄðŸšŸðŸ”ķðŸĶ…ðŸ˜ĄðŸ˜šðŸš†ðŸ‘ðŸ•ĄðŸĶžðŸ“ðŸ–ŠðŸ™€ðŸĶ‰
$ echo ðŸŒ°ðŸðŸĄðŸšŸðŸ”ķðŸĶ…ðŸ˜ĄðŸ˜šðŸš†ðŸ‘ðŸ•ĄðŸĶžðŸ“ðŸ–ŠðŸ™€ðŸĶ‰ | ecoji -d | openssl base64
GhAkTyOY/Pta78KImgvofylL19M=
$ cat encode.go  | openssl dgst -binary -sha1 | openssl base64
GhAkTyOY/Pta78KImgvofylL19M=

(If you want to use Ecoji for hashes, consider the dangers inherent in older systems without utf8 emoji support, different fonts, and similar emojis.)

A URL Shortener

Four base1024 emojis can represent 1 trillion unique IDs. In the example below af82dd48f7 represents a 5 byte id for a URL in a key value store like Accumulo. When someone enters the URL, the 5 byte id could be used to obtain the actual URL from the database and then redirect.

$ printf "https://ecoji.io/%s\n" $(echo af82dd48f7 | xxd -r -p | ecoji)
https://ecoji.io/😉🈚🛠🏄

Sorting Ecoji-Encoded Data

Data encoded with Ecoji sorts the same as the input data.

$ echo -n a | ecoji > /tmp/test.ecoji
$ echo -n ab | ecoji >> /tmp/test.ecoji
$ echo -n abc | ecoji >> /tmp/test.ecoji
$ echo -n abcd | ecoji >> /tmp/test.ecoji
$ echo -n ac | ecoji >> /tmp/test.ecoji
$ echo -n b | ecoji >> /tmp/test.ecoji
$ echo -n ba | ecoji >> /tmp/test.ecoji
$ export LC_ALL=C
$ sort /tmp/test.ecoji > /tmp/test-sorted.ecoji
$ diff /tmp/test.ecoji /tmp/test-sorted.ecoji
$ cat /tmp/test-sorted.ecoji
👕☕☕☕
👖ðŸ“ē☕☕
👖ðŸ“ļ🎈☕
👖ðŸ“ļðŸŽĶ⚜
👖🔃☕☕
👙☕☕☕
👚ðŸ“Ē☕☕

Implementations

Libraries implementing the Ecoji encoding standard. Submit PR to add a library to the table.

Language Comments
D Implementation of Ecoji written in the D programming language.
Go This repository offers a Go library package with two functions ecoji.Encode() and ecoji.Decode().
Java Implementation of Ecoji written in Java, usable in any JVM language.
.NET Implementation of Ecoji written in C# targeting .NET Standard 2.0: dotnet add package Ecoji.
PHP PHP 7.x implementation of Ecoji. Available as rayne/ecoji on Packagist.
Python Implementation of Ecoji written in the Python3 programming language.
Rust Implementation of Ecoji written in the Rust programming language.
Swift Implementation of Ecoji written in the Swift programming language.

Building

This is my first Go project and I am starting to get my bearings. If you are new to Go I would recommend this video and the tour.

# The following are general Go setup instructions.  Ignore if you know Go, I am new to it.
export GOPATH=~/go
export PATH=$GOPATH/bin:$PATH

# This will download Ecoji to $GOPATH/src
go get github.com/keith-turner/ecoji

# This will build the ecoji command and put it in $GOPATH/bin
go install github.com/keith-turner/ecoji/cmd/ecoji
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].