This is basically a binary string & NOT a character string. So I don't think you can use any of the string related functions with this kind of data & achieve a valid result.
This is why we actually use a NULL character in our character array to differentiate between valid/invalid characters (end of string).
If this was an array & NOT a pointer, you could probably use sizeof(array) & you would get the total size of array & NOT the number of bytes of actual data.
You can use some sort of packing mechanism(encoding) & avoid the use of NULL character in the actual data.