diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-12-20 20:18:11 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-12-20 20:18:11 +0100 |
commit | 9666001e570275fa08a5766639c437d40bbb0545 (patch) | |
tree | 174566817e3b11f09cbc5dbdb02dd72558e629fc /module/network/HTTPDownload.py | |
parent | bucket improvement (diff) | |
download | pyload-9666001e570275fa08a5766639c437d40bbb0545.tar.xz |
improved bucket
Diffstat (limited to 'module/network/HTTPDownload.py')
-rw-r--r-- | module/network/HTTPDownload.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/module/network/HTTPDownload.py b/module/network/HTTPDownload.py index d0e2eeb1f..f17e16492 100644 --- a/module/network/HTTPDownload.py +++ b/module/network/HTTPDownload.py @@ -22,6 +22,7 @@ from helper import * from os.path import exists, getsize from os import remove #from shutil import move, copyfileobj +from zlib import decompressobj, MAX_WBITS from cookielib import CookieJar @@ -163,10 +164,10 @@ class HTTPDownload(): decompress = lambda data: data if encoding == "gzip": - gz = zlib.decompressobj(16+zlib.MAX_WBITS) + gz = decompressobj(16+MAX_WBITS) decompress = lambda data: gz.decompress(data) if encoding == "deflate": - df = zlib.decompressobj(-zlib.MAX_WBITS) + df = decompressobj(-MAX_WBITS) decompress = lambda data: df.decompress(data) fname = "%s.chunk%d" % (self.filename, i) @@ -271,7 +272,7 @@ if __name__ == "__main__": import sys from Bucket import Bucket bucket = Bucket() - bucket.setRate(200*1024) + bucket.setRate(3000*1024) bucket = None url = "http://speedtest.netcologne.de/test_100mb.bin" |