Bits.js () implements a succinct trie for fast lookup of words in a large dictionary and does not take much space at the same time. I have an application which has about 200,000+ words to be encoded. It takes a lot of time (over 30 minutes) to finish the job, so I decided to re-implement the succinct trie in Golang. The result  is great. It takes less than 2 minutes to finish encoding the words. This post shows you how to use the Go implementation of succinct trie.
The following code gives an example of encoding and decoding:
Note that you must include space " " in your alphabet if default alphabet is not used. The default alphabet is [a-z ].
|||siongui/go-succinct-data-structure-trie: Succinct Trie in Go - GitHub|