I've managed to gzip my response from my server to my client, but now I also want to gzip the data send from the client to the server. I'm using zlib.js as follows:
var gzip = new Zlib.Gzip(dataUint8Array);
var compressed = gzip.compress();
Where the returned compressed is a Uint8 array. How do I send the data to the server, especially, how do I decode this in PHP? I tried using gzdecode in PHP to decode the array, but that didn't work. Then I tried to convert the compressed array in JS back to a string before sending it to the server, but gzdecode could also not decode that. Any suggestions?