added gzip support via popen