Zipうんぬん
もうちょっとすすめる
http://www.python.jp/doc/2.5/tut/node13.html
このページの
11.3 バイナリデータレコードの操作
の例がZIPファイルだったので、おおっと思いながら試してみたら・・・
エラーがえらーが。
バイナリ読み込むときも
unpack('
import struct data = open('hoge.zip', 'rb').read() start = 0 for i in range(1): start += 14 fields = struct.unpack('<LLLHH', data[start:start+16]) crc32, comp_size, uncomp_size, filenamesize, extra_size = fields start += 16 filename = data[start:start+filenamesize] start += filenamesize extra = data[start:start+extra_size] print filename, hex(crc32), comp_size, uncomp_size start += extra_size + comp_size