|
|
back to boardbitstream via C/C++ I solved this problem with the Huffman encoding. It was not so complicated, but I wanna know how we can efficiently save out bitstream (1-0-encoded planetext) into the file? 1) I used only 7 bits from char and last (msb) bit always was '1' - because if we will use all 8 bits, we will get some unprintable characters. How can we avoid this problem? 2) Also, did anybody think about using wchar_t for encode 16 bits in 1 character? Is it possible for our problem? 3) And last question. How can we store all char-encoded bitset in one string? I can't compile very long char sequences like > const char *str = "asdjgagsd....asdgah"; with MSVC++. I have divided all char stream into > char str[][10000] + {"ewfw..ewf","afe...",...}; Can we do it more efficiently? Thanks :) Edited by author 26.10.2008 20:06 |
|
|