Parse an encapsulated message
(buf: &[u8])
| 927 | /// |
| 928 | /// <https://arrow.apache.org/docs/format/Columnar.html#encapsulated-message-format> |
| 929 | fn parse_message(buf: &[u8]) -> Result<Message::Message<'_>, ArrowError> { |
| 930 | let buf = match buf[..4] == CONTINUATION_MARKER { |
| 931 | true => &buf[8..], |
| 932 | false => &buf[4..], |
| 933 | }; |
| 934 | crate::root_as_message(buf) |
| 935 | .map_err(|err| ArrowError::ParseError(format!("Unable to get root as message: {err:?}"))) |
| 936 | } |
| 937 | |
| 938 | /// Read the footer length from the last 10 bytes of an Arrow IPC file |
| 939 | /// |