import base64


def load_bytes(storage: str, value: str) -> bytes:
    """
    Given a storage, load bytes

    Storage may be a 'raw', 'base64', 'base85', 'file'
    Value is an encoded string or a path to local file
    """
    if storage == 'raw':
        return value.encode('utf-8')
    if storage == 'base64':
        return base64.b64decode(value)
    if storage == 'base85':
        return base64.b85decode(value)
    if storage == 'file':
        with open(value, "rb") as file:
            return file.read()

    # ease formatting
    if len(value) > 20:
        condensed_value = f'{value[:8]}...{value[-8:]}'
    else:
        condensed_value = value
    raise ValueError(f"Unknown storage {storage} for value {condensed_value}")