In c++ I have an array of signed long long (63bit numbers), array of variable lenght.
std::array<long long, n> encodedString
This array is in fact holding an UTF-8 encoded string. Meaning that if you concatenate the binaries of each element of the array, the result will be an UTF-8 encoded text.
For example the array :
(621878499550 , 2339461068677718049)
If you translate those signed long long in 63 bit binary it gives :
621878499550 = 000000000000000000000001001000011001010110110001101100011011110
2339461068677718049 = 010000001110111011011110111001001101100011001000010000000100001
If you concatenate those binaries into : 000000000000000000000001001000011001010110110001101100011011110010000001110111011011110111001001101100011001000010000000100001
This is the UTF8 for "Hello world !"
So the question is what is the easiest way to get a string with "Hello world !" starting with the array (621878499550 , 2339461068677718049)
Best solution I currently have is to write the array to a file in binary mode (fwrite) then read the file in text mode to a string.