I have Numpy Array of floats which I compress using zlib and store in database. Then I want to send compressed data over HTTP and decompress on client side using JavaScript. How can I do it? I am compressing data using below code:
import numpy as np
import zlib
compressedData = zlib.compress(np.array([1.5, 2.5, 1.0]))
I can simply decompress in in python using:
import numpy as np
import zlib
decomrpessedData = np.fromstring(zlib.decompress(compressedData), np.float)
But how can I decompress it in JS? I tried pako but without success. Is it wrong approach? Should I compress array using some other library?