Add readMap and writeMap to BinaryReaderWriter