Codec implementations for HashMap.
For portability and consistency between architectures, the size of the map must fit within a u32.
u32