mirror of
https://github.com/RPCS3/discord-bot.git
synced 2026-01-31 01:25:22 +01:00
7Z Stream reader is broken Zip Stream reader doesn't exist Supported formats: - .gz - .log Add manual library load report. Last problems still not fixed. Disable .zip and .7z logs. Turn on feedback for invalid/non-tested serials. Fixup Log Analysis
17 lines
361 B
Python
17 lines
361 B
Python
import zlib
|
|
|
|
|
|
def stream_text_log(stream):
|
|
for chunk in stream.iter_content(chunk_size=1024):
|
|
yield chunk
|
|
|
|
|
|
def stream_gzip_decompress(stream):
|
|
dec = zlib.decompressobj(32 + zlib.MAX_WBITS) # offset 32 to skip the header
|
|
for chunk in stream:
|
|
rv = dec.decompress(chunk)
|
|
if rv:
|
|
yield rv
|
|
del rv
|
|
del dec
|