(&mut self, role: usize)
| 51 | Ok(()) |
| 52 | } |
| 53 | fn count(&mut self, role: usize) -> FormatResult<usize> { |
| 54 | let n = usize::try_from(self.n(role)?).map_err(|_| invalid("predictive count overflow"))?; |
| 55 | if n > self.input.len() { |
| 56 | return Err(invalid("predictive count exceeds control bytes")); |
| 57 | } |
| 58 | Ok(n) |
| 59 | } |
| 60 | fn bytes(&mut self, has_kind: bool) -> FormatResult<()> { |
| 61 | let tag = self.n(REFERENCE)?; |
| 62 | if tag > 2 { |