Documentation ¶
Index ¶
Constants ¶
const MaxBase37 = 6582952005840035281
MaxBase37 Max username hash for 12-rune usernames.
Variables ¶
This section is empty.
Functions ¶
func DecodeBase37 ¶
DecodeBase37 Takes a long integer for input, decodes from base37 and returns it as a string.
func FormatChatMessage ¶
FormatChatMessage Format a given string for use with the in-game chat systems. Will replace certain symbols and auto-capitalize sentences. Maybe more later.
func ModalParse ¶
ModalParse Neat command argument parsing function with support for single-quotes, ported from Java
func PackChatMessage ¶
PackChatMessage Takes a string as input, and returns a packed bitstream as output. It can fit any of the first 13 runes in the alphabet into 4 bits per rune, but for the rest of the alphabet it's 8 bits.
func UnpackChatMessage ¶
UnpackChatMessage Takes a byte slice as input, and decodes it into a human readable chat message.
Works by unpacking the bits into 2 4-bit values. 86% of the time, this is enough information for the output rune. 14% of the time, it will cache this value and use the next 4 bits to help decode the rune. The first 13 runes in the charset map 1 to 1 for 13/15 possibilities within each 4 bits.
Types ¶
This section is empty.