Python/0x02-gzip1 gzip class ][ gzip header 정보가져오기 gzip class ][ gzip header 정보가져오기 # -*- coding: utf-8 -*- # # write by kyoung chip , jang # import urllib.request import gzip class CGzip : def __init__( self ) : pass def getFileHeader( self , url ) : with urllib.request.urlopen(url) as response : with gzip.GzipFile(fileobj=response) as uncompressed: file_header = uncompressed.read(64) print( ( "file header = %s ") % ( file_header ) ) if __name_.. 2017. 10. 6. 이전 1 다음