import zipfile
import io


def _unzip_as_string(data):
    """Unzip stream of data in bytes as string.

    Arguments:
        data {bytes} -- Zipped data as bytes

    Returns:
        str -- Unzipped data as string

    """
    z = zipfile.ZipFile(io.BytesIO(data))
    unzipped_data = z.read(z.infolist()[0])
    return unzipped_data.decode()