def auto_decompress_stream(src):
block = next(src)<EOL>compression = guess_compression(block)<EOL>if compression == '<STR_LIT>':<EOL><INDENT>src = bz2_decompress_stream(chain([block], src))<EOL><DEDENT>elif compression == '<STR_LIT>':<EOL><INDENT>src = xz_decompress_stream(chain([block], src))<EOL><DEDENT>else:<EOL><INDENT>src = chain([block], src)<EOL><DEDENT>for block in src:<EOL><INDENT>yield block<EOL><DEDENT>
Decompress data from `src` if required.

    If the first block of `src` appears to be compressed, then the entire
    stream will be uncompressed. Otherwise the stream will be passed along
    as-is.

    Args:
        src (iterable): iterable that yields blocks of data

    Yields:
        blocks of uncompressed data