Skip to content

Instantly share code, notes, and snippets.

@jmoiron
Created July 23, 2014 16:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jmoiron/6330b79888974ad94380 to your computer and use it in GitHub Desktop.
Save jmoiron/6330b79888974ad94380 to your computer and use it in GitHub Desktop.
func LoadGzippedJSON(r io.Reader, v interface{}) error {
raw, err := gzip.NewReader(r)
if err != nil {
return err
}
return json.NewDecoder(raw).Decode(&v)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment