I have trouble with saving binary data to the file.
For example, I am reading data from test.txt
:
this is test of Huffman algorithm
When I 'compress' that I got binary:
101010111110001101111000110101010000001011101000111011000101100111110111001110011011011100011011000100110001001011111010101011100100
How to save it to the file like a binary? Because if I save like a string - file size equals to 132*8 cause that's UTF-8. All bytes methods work badly because they translate binary to bytes.