pub fn decode_str(data: String, encoding: Encoding) -> Result<Vec<u8>>
Decode a string into a vector of bytes using the given encoding.