pub fn decode_edit(input: &[u8]) -> Result<Edit<'_>, DecodeError>Expand description
Decodes an Edit from binary data with zero-copy borrowing.
Handles both compressed (GRC2Z) and uncompressed (GRC2) formats.
For true zero-copy with compressed data, use decompress first:
ⓘ
// Zero-copy for compressed data:
let uncompressed = decompress(&compressed)?;
let edit = decode_edit(&uncompressed)?;
// Zero-copy for uncompressed data:
let edit = decode_edit(&uncompressed_bytes)?;If you pass compressed data directly, it will decompress internally and allocate owned strings (no zero-copy benefit).