I have an array that i need to pack with python to 16bit depth with
I have been doing this with php without any issues.
Array is just just large set of numbers like this - [1, 2, 3, 4, 5, 700, 540...]
With php I do this process in one line:
$encoded_string = pack("s*", ...$array); // Done
I can not for the love of god figure out how same can be done in python I have read the documentation, I looked at examples and I can not get this done Best I have is below and it does not work in any variation i have tried.
encoded_string = struct.pack('h', *array)