I have a string which contains a gzip compressed string, therefore there's no file headers, standard compress/gzip
library throws error gzip: invalid header
How can I decompress a gzip compressed string in go?
This is what I'm trying
nbody := "eNorTk0uSi0BAAjRAoc="
rdata := strings.NewReader(nbody)
r,err := gzip.NewReader(rdata)
log.Println(r)
if err != nil {
log.Fatal(err)
}
s, _ := ioutil.ReadAll(r)
fmt.Println(string(s))