Download and unzip the report file at the given URL.

    Downloads and unzips the CO-TRACER archive at the given URL. This is not
    intended for data outside of the CO-TRACER official site and it will
    automatically extract the first file found in the downloaded zip archive
    as the CO-TRACER website produces single file archives. Note that the
    contents of that file are loaded directly into memory.

    @param url: The URL to download the archive from.
    @type url: str
    @return: The contents of the first file found in the provided archive.
    @rtype: str

def get_zipped_file(url, encoding_error_opt='ignore'):
    """Download and unzip the report file at the given URL.

    Downloads and unzips the CO-TRACER archive at the given URL. This is not
    intended for data outside of the CO-TRACER official site and it will
    automatically extract the first file found in the downloaded zip archive
    as the CO-TRACER website produces single file archives. Note that the
    contents of that file are loaded directly into memory.

    @param url: The URL to download the archive from.
    @type url: str
    @return: The contents of the first file found in the provided archive.
    @rtype: str
    """
    remotezip = urllib2.urlopen(url)
    raw_contents = cStringIO.StringIO(remotezip.read())
    target_zip = zipfile.ZipFile(raw_contents)
    first_filename = target_zip.namelist()[0]
    return unicode(target_zip.read(first_filename), errors=encoding_error_opt)