人気ブログランキング | 話題のタグを見る

魔法打ち日記『怠惰る・ウェーブ』(輪廻編)


モルトウィスキーが好き。日本酒は二日酔いするので苦手。それでも日本人。
by maroso_76b
S M T W T F S
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31

zlibのdecompressobjがよくわからんのじゃよ・・・

Pythonのお話。
----
#!/usr/bin/python

import zlib

f = open("test.gz", "r")
str = f.read()
f.close
ret = zlib.decompress(str)
print ret
----
を動かすと
「zlib.error: Error -3 while decompressing data: incorrect header check」
が出るって話らしい。
で、
----
gzip.open("test.gz")
----
で開けば上手くいくんじゃないかって話。


あと、おまけ。関係あるかしら・・・?

http://handasse.blogspot.com/2008/04/python_18.html
by maroso_76b | 2009-11-18 22:17 | 独り言
カテゴリ
以前の記事
お気に入りブログ
メモ帳
検索
その他のジャンル
ファン
記事ランキング
ブログジャンル
画像一覧