dump_prefixes_to_binary_file() tested on python 2 & 3