I need to count the length of a string encoded using Huffman compression. It may have ‘\0’ characters so strlen() or any other function that searches for the NULL terminator won’t work. How can I determine the length of such a string?
I need to count the length of a string encoded using Huffman compression. It
Share
It’s not possible. Go on a field and walk until the end. There will be nothing different than the rest of the field to mark the end.
EDIT
The OP mentioned he is using Huffman for compression.
In this case you should have the compression function return the size of the compressed string.