import sys, zlibdefmain(fn): data =open(fn, 'rb').read() i =0 first =True last =NonewhileTrue: i = data.find(b'>>\nstream\n', i)if i ==-1:break i +=10try: last = cdata = zlib.decompress(data[i:])if first: first =Falseelse:pass#print cdataexcept:passprint(last.decode('utf-8'))if__name__=='__main__':main(*sys.argv[1:])