more efficient serialization for LociSet, LociMap