pub fn encode_binary<R: AsRef<[u8]>>(input: R) -> Vec<u8> 
Expand description

Encodes some bytes into quoted-printable format, treating the input as binary.

The quoted-printable transfer-encoding is defined in IETF RFC 2045, section 6.7. This function encodes a set of raw bytes into a format conformant with that spec. The output contains CRLF pairs as needed so that each line is wrapped to 76 characters or less (not including the CRLF).

Examples

    use quoted_printable::encode_binary;
    let encoded = encode_binary("hello, \u{20ac} zone!\r\n");
    assert_eq!("hello, =E2=82=AC zone!=0D=0A", String::from_utf8(encoded).unwrap());