gzip_decoder.py
def decompress_raw_data(raw_data_fd, add_bracket=True):
    """
    Decompresses raw data from file like object and return
    a byte array
    """
    obj = zlib.decompressobj(MAGIC_NUMBER + zlib.MAX_WBITS)
    writer = io.BytesIO()
    if add_bracket:
        writer.write(b'[')
    d = raw_data_fd.read(CHUNK_SIZE)
    while d:
        writer.write(obj.decompress(d))
        while obj.unused_data != b'':
            unused_data = obj.unused_data
            obj = zlib.decompressobj(MAGIC_NUMBER + zlib.MAX_WBITS)
            writer.write(obj.decompress(unused_data))
        d = raw_data_fd.read(CHUNK_SIZE)
        writer.write(obj.flush())
    if add_bracket:
        writer.write(b']')
    return writer.getvalue()

    Decompresses raw data from file like object and return
    a byte array
    
Decompresses raw data from file like object and return
a byte array
Decompresses raw data from file like object and return a byte array
def decompress_raw_data(raw_data_fd, add_bracket=True):
    obj = zlib.decompressobj(MAGIC_NUMBER + zlib.MAX_WBITS)
    writer = io.BytesIO()
    if add_bracket:
        writer.write(b'[')
    d = raw_data_fd.read(CHUNK_SIZE)
    while d:
        writer.write(obj.decompress(d))
        while obj.unused_data != b'':
            unused_data = obj.unused_data
            obj = zlib.decompressobj(MAGIC_NUMBER + zlib.MAX_WBITS)
            writer.write(obj.decompress(unused_data))
        d = raw_data_fd.read(CHUNK_SIZE)
        writer.write(obj.flush())
    if add_bracket:
        writer.write(b']')
    return writer.getvalue()
def decompress_raw_data ( raw_data_fd , add_bracket = True ) : obj = zlib . decompressobj ( MAGIC_NUMBER + zlib . MAX_WBITS ) writer = io . BytesIO ( ) if add_bracket : writer . write ( b'[' ) d = raw_data_fd . read ( CHUNK_SIZE ) while d : writer . write ( obj . decompress ( d ) ) while obj . unused_data != b'' : unused_data = obj . unused_data obj = zlib . decompressobj ( MAGIC_NUMBER + zlib . MAX_WBITS ) writer . write ( obj . decompress ( unused_data ) ) d = raw_data_fd . read ( CHUNK_SIZE ) writer . write ( obj . flush ( ) ) if add_bracket : writer . write ( b']' ) return writer . getvalue ( )
Decompresses raw data from file like object and return
a byte array
Decompresses raw data from file like object and return a byte array
"""
    Decompresses raw data from file like object and return
    a byte array
    """
raw_data_fd
add_bracket