decode_uu_data

Function decode_uu_data 

Source
pub fn decode_uu_data<'a, I>(lines: I) -> Result<Vec<u8>, CoreError>
where I: Iterator<Item = &'a str>,
Expand description

Decode UU-encoded data commonly found in ASS [Fonts] and [Graphics] sections

UU-encoding (Unix-to-Unix encoding) embeds binary data as ASCII text. Each line starts with a length character followed by encoded data.

§Arguments

  • lines - Iterator of UU-encoded text lines

§Returns

Decoded binary data or error if encoding is invalid.

§Example

let lines = vec![""];
let decoded = decode_uu_data(lines.iter().map(|s| *s))?;
// UU-decode implementation handles empty input gracefully
assert!(decoded.len() >= 0);

§Errors

Returns an error if the UU-encoded data is malformed or cannot be decoded.