pub fn encode_with_sentinel(
    source: &[u8],
    dest: &mut [u8],
    sentinel: u8,
) -> usizeExpand description
Encodes the source buffer into the dest buffer using an
arbitrary sentinel value.
This is done by first encoding the message with the typical sentinel value of 0, then XOR-ing each byte of the encoded message with the chosen sentinel value. This will ensure that the sentinel value doesn’t show up in the encoded message. See the paper “Consistent Overhead Byte Stuffing” for details.
This function does not terminate the encoded message with the sentinel value. This should be done by the caller to ensure proper framing.
§Returns
The number of bytes written to in the dest buffer.