Writing a library - returning a char array

That's a very inefficient. It requires 16 bits to represent 8 bits of information.