def extract_serialized_bytes(filename: str) ->bytes:
    """ Return uncompressed serialized NBT
    """
    with open(filename, 'rb') as nbt_file:
        file_data = nbt_file.read()
    if file_data[0:2] == b'\x1f\x8b':
        import gzip
        decompressed_data: bytes = gzip.decompress(file_data)
        return decompressed_data
    return file_data
