Writing a Binary String to a file
I am writing a huffman encoding program to compress a text file. I converted the text file to its huffman encoded value, and I need to write it to a file. I am currently using the python "BitVector" module, but it is far too slow when read开发者_如何学Cing and writing from/to a file. Are there any other ways of doing this(preferably much faster)?
Thanks.
You might consider using the struct package from the python standard library.
精彩评论