Huffman Code and save to file

I've written code to create Huffman codes for text. The encoded text is a string of 1s and 0s. I want to save that string along with a hashmap of chars, usize so that I can decode later. How can I persist that as binary data? Thanks

https://serde.rs

1 Like

Serde to an extent. But the Huffman codes - 101100101... etc - were taken 8 chars at a time and bit manipulated into a u8 and the whole string saved as a vec

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.