Hi,
I have been working on a project that needs qoi encoding and decoding, but the final results should be put in a pre allocated memory. Although we can provide our own allocator, but i want to provide a pre allocated memory to the encoded function.
Something like this:
void *qoi_encode(const void *data, const qoi_desc *desc, int *out_len, void *dest);
This dest adress can be optional, i.e if NULL then go ahead and allocate the memory using QOI_MALLOC