Question:
This question is about converting a gzip deflate message from a websocket message and convert it to array OR raw text that I can apply JSON.parse on it…*** to be also clear: In this question : i use a websocket from a crypto exchange…. but the question is about the received message NOT about crypto exchange
in the documentation they say “please use zlib deflate”
HERE THE JAVASCRIPT
<script src="https://cdnjs.cloudflare.com/ajax/libs/pako/2.0.4/pako.min.js" ...></script>
if I do pako.deflate(jsonx);
I getdecoder = new TextDecoder("utf8");
and log(decoder.decode(jsonx));
I getAnswer:
If I decompress your data twice, I get:pako.inflate()
.If you have better answer, please add a comment about this, thank you!