def format_output_bytes(record, truncate):
    """Return a byte-string representation of a BlipRecord.

If `truncate` is True, the payload is replaced with the string "..."

:param record: BlipRecord object
:type record: BlipRecord
:param truncate: Boolean argument which causes truncation on True
:type truncate: bool
:rtype: bytes
    """
    fmt_string = "<Record: Exchange={}, Type={}, Length={}, Payload={}>\n"
    payload = "..." if truncate else record.payload
    return bytes(fmt_string.format(
        record.exchange, record.payload_type, len(record.payload), payload), 'utf-8')