Try using the gzip source code which can be found here http://www.gzip.org/#sources