add a util function for ungzip.