开发者

Writing a Binary String to a file

开发者 https://www.devze.com 2023-02-15 20:52 出处:网络
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\"

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消