Code tells all:
#encoding=utf-8
#author: walker
#date: 2015-10-26
#summary: 测试gzip压缩/解压文件
import gzip...
BufSize = 1024*8
def gZipFile(src, dst):
fin = open(src, 'rb')
fout = gzip.open(dst..., 'wb')
in2out(fin, fout)
def gunZipFile(gzFile, dst):
fin = gzip.open(gzFile, 'rb'...self.fout = None
def compress(self, src, dst):
self.fin = open(src, 'rb')
self.fout = gzip.open...__in2out()
def decompress(self, gzFile, dst):
self.fin = gzip.open(gzFile, 'rb')