Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
テキストファイルを圧縮するハフマン符号化プログラムを書いています。テキストファイルをハフマンでエンコードされた値に変換したので、ファイルに書き込む必要があります。私は現在Pythonの「BitVector」モジュールを使用していますが、ファイルの読み取りと書き込みを行う場合は遅すぎます。これを行う他の方法はありますか(できればはるかに高速です)?
ありがとう。
Python標準ライブラリのstructパッケージの使用を検討してください。