def METHOD_NAME(src_stream: IO[bytes]) -> tuple[IO[bytes], int]:
    """Compresses a stream of bytes with GZIP.
    Args:
        src_stream: bytes stream
    Returns:
        A tuple of byte stream and size.
    """
    compressed_data = gzip.compress(src_stream.read())
    src_stream.seek(0)
    return BytesIO(compressed_data), len(compressed_data)