Skip to main content

resync_decision

Function resync_decision 

Source
pub fn resync_decision(input: &[u8], at_eof: bool) -> ResyncDecision
Expand description

Decide what to do with the bytes at the front of a streaming buffer, using the same consistency rule tags_resync walks with.

Unlike tags_resync, nothing is retained here: the caller keeps the buffer and acts on the decision, so a streaming demux can resynchronise while holding at most the bytes one candidate tag’s own header declares.