package multibaseimport ()var base256emojiTable = [256]rune{// Curated list, this is just a list of things that *somwhat* are related to our comunity'๐', '๐ช', 'โ', '๐ฐ', '๐', // Space'๐', '๐', '๐', '๐', '๐', '๐', '๐', '๐', // Moon'๐', '๐', '๐', // Our Home, for now (earth)'๐', // Dragon!!!'โ', // Our Garden, for now (sol)'๐ป', '๐ฅ', '๐พ', '๐ฟ', // Computer// The rest is completed from https://home.unicode.org/emoji/emoji-frequency/ at the time of creation (december 2021) (the data is from 2019), most used first until we reach 256. // We exclude modifier based emojies (such as flags) as they are bigger than one single codepoint. // Some other emojies were removed adhoc for various reasons.'๐', 'โค', '๐', '๐คฃ', '๐', '๐', '๐', '๐ญ', '๐', '๐','๐ ', '๐', '๐', '๐ฅ', '๐ฅฐ', '๐', '๐', '๐', '๐ข', '๐ค','๐', '๐', '๐ช', '๐', 'โบ', '๐', '๐ค', '๐', '๐', '๐','๐', '๐น', '๐คฆ', '๐', '๐', 'โ', 'โจ', '๐คท', '๐ฑ', '๐','๐ธ', '๐', '๐', '๐', '๐', '๐', '๐', '๐', '๐', '๐คฉ','๐', '๐', '๐ค', '๐', '๐ฏ', '๐', '๐', '๐ถ', '๐', '๐คญ','โฃ', '๐', '๐', '๐', '๐ช', '๐', '๐ฅ', '๐', '๐', '๐ฉ','๐ก', '๐คช', '๐', '๐ฅณ', '๐ฅ', '๐คค', '๐', '๐', '๐ณ', 'โ','๐', '๐', '๐ด', '๐', '๐ฌ', '๐', '๐', '๐ท', '๐ป', '๐','โญ', 'โ ', '๐ฅบ', '๐', '๐', '๐ค', '๐ฆ', 'โ', '๐ฃ', '๐','๐', 'โน', '๐', '๐', '๐ ', 'โ', '๐', '๐บ', '๐', '๐ป','๐', '๐', '๐', '๐', '๐น', '๐ฃ', '๐ซ', '๐', '๐', '๐ต','๐ค', '๐', '๐ด', '๐ค', '๐ผ', '๐ซ', 'โฝ', '๐ค', 'โ', '๐','๐คซ', '๐', '๐ฎ', '๐', '๐ป', '๐', '๐ถ', '๐', '๐ฒ', '๐ฟ','๐งก', '๐', 'โก', '๐', '๐', 'โ', 'โ', '๐', '๐ฐ', '๐คจ','๐ถ', '๐ค', '๐ถ', '๐ฐ', '๐', '๐ข', '๐ค', '๐', '๐จ', '๐จ','๐คฌ', 'โ', '๐', '๐บ', '๐ค', '๐', '๐', '๐ฑ', '๐', '๐ถ','๐ฅด', 'โถ', 'โก', 'โ', '๐', '๐ธ', 'โฌ', '๐จ', '๐', '๐ฆ','๐ท', '๐บ', 'โ ', '๐ ', '๐', '๐ต', '๐', '๐คฒ', '๐ค ', '๐คง','๐', '๐ต', '๐ ', '๐ง', '๐พ', '๐', '๐', '๐ค', '๐', '๐คฏ','๐ท', 'โ', '๐ง', '๐ฏ', '๐', '๐', '๐ค', '๐', '๐', 'โ','๐ด', '๐ฃ', '๐ธ', '๐', '๐', '๐ฅ', '๐คข', '๐ ', '๐ก', '๐ฉ','๐', '๐ธ', '๐ป', '๐ค', '๐คฎ', '๐ผ', '๐ฅต', '๐ฉ', '๐', '๐','๐ผ', '๐', '๐ฃ', '๐ฅ',}var base256emojiReverseTable map[rune]bytefunc init() {base256emojiReverseTable = make(map[rune]byte, len(base256emojiTable))for , := rangebase256emojiTable {base256emojiReverseTable[] = byte() }}func base256emojiEncode( []byte) string {varintfor , := range { += utf8.RuneLen(base256emojiTable[]) }varstrings.Builder .Grow()for , := range { .WriteRune(base256emojiTable[]) }return .String()}type base256emojiCorruptInputError struct { index int char rune}func ( base256emojiCorruptInputError) () string {return"illegal base256emoji data at input byte " + strconv.FormatInt(int64(.index), 10) + ", char: '" + string(.char) + "'"}func ( base256emojiCorruptInputError) () string {return .Error()}func base256emojiDecode( string) ([]byte, error) { := make([]byte, utf8.RuneCountInString())varintfor := 0; len() > 0; ++ { , := utf8.DecodeRuneInString() = [:]varbool [], = base256emojiReverseTable[]if ! {returnnil, base256emojiCorruptInputError{, } } += }return , nil}
The pages are generated with Goldsv0.8.2. (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds.