Another idea would be to store them separately to add even more redundancy to the tree (as we want to do with the Names), which could make compression for the ASTs even better. We could  store the occurrences of the values in BFS order as we do with the names / symbols / types in order to easily reconstruct them at decompression. Perhaps using that we could find a more optimal way to store the literals themselves?

What do you think ?