python challenge 8

#-*- coding:utf8-*-
import time
start = time.time()

#un: 'BZh91AY&SYA\xaf\x82\r\x00\x00\x01\x01\x80\x02\xc0\x02\x00 \x00!\x9ah3M\x07<]\xc9\x14\xe1BA\x06\xbe\x084'
#
pw: 'BZh91AY&SY\x94$|\x0e\x00\x00\x00\x81\x00\x03$ \x00!\x9ah3M\x13<]\xc9\x14\xe1BBP\x91\xf08'
'''
bz2
compress(data)
decompress(data)
'''
from bz2 import compress,decompress
un = '''BZh91AY&SYA\xaf\x82\r\x00\x00\x01\x01\x80\x02\xc0\x02\x00 \x00!\x9ah3M\x07<]\xc9\x14\xe1BA\x06\xbe\x084'''
pw = '''BZh91AY&SY\x94$|\x0e\x00\x00\x00\x81\x00\x03$ \x00!\x9ah3M\x13<]\xc9\x14\xe1BBP\x91\xf08'''
sun = decompress(un)
spw = decompress(pw)
print sun,spw
#huge file

#print "耗时:"+str(time.time() - start)
posted @ 2012-02-10 18:27  lcyang  阅读(277)  评论(0编辑  收藏  举报