reduce size of header_map and add an inverted version