def get_compressed_file_content(location, decompressor):
    """
    Uncompress a compressed file at location and return its content as a byte
    string and a list of warning messages. Raise Exceptions on errors. Use the
    `decompressor` object for decompression.
    """
    warnings = []
    with decompressor(location, 'rb') as compressed:
        content = compressed.read()
        if getattr(decompressor, 'has_trailing_garbage', False):
            warnings.append(location + ': Trailing garbage found and ignored.')
    return content, warnings
