BLYNK
HOME       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

How do I decompress Blynk history pin data using Javascript

I’m trying to decompress the data (mydata.csv.gzip) into csv format of the blynk history pin Api:
https://{my-local-server-address}:8080/auth_token/data/{pin}
Here I’m using pako after making an Ajax request using Jquery. My Code looks like this:

$.ajax({

                    url:"https://{my-local-server-address}:8080/auth_token/data/{pin}",

                    type: "GET",

                    success: function(data){

                        try {
                            // convert to binary

                            const binData = new Uint8Array(data);

                            // inflate

                            const result = pako.inflate(binData, { to: 'string' });

                            console.log(result);

                        } catch (err){

                            console.log(err);

                        }

                    }

                })

I’m getting “incorrect header check” on the console. Please help me out if anyone used this library before.