He designed it so you can fit a saved town in a tweet.
"It's my own very context specific implementation. I know how many bits I need for each bit of data, so I just store it all in a big bit array. I then convert that bit array to my own custom base 64 format, based on 64 web safe characters."
Worth reading the whole thread, as will all of Oskars twitter feed its super interesting.
The lookup key would be if the backend stores all the generated towns, and you're just referencing them. But I think simple encoding as you say is more probable
You have a fixed 3D grid, which appears to only need to store either a color or 'null' in every spot. You can encode this entire grid in any number of ways such that it creates a valid URL. Base64 most likely.