pub struct BlockDecoder {
state: BlockDecoderState,
in_progress: Block,
vlq_decoder: VLQDecoder,
bytes_remaining: usize,
}展开描述
Block 的解码器
字段§
§state: BlockDecoderState§in_progress: Block§vlq_decoder: VLQDecoder§bytes_remaining: usize实现§
源代码§impl BlockDecoder
impl BlockDecoder
源代码pub fn decode(&mut self, buf: &[u8]) -> Result<usize, ArrowError>
pub fn decode(&mut self, buf: &[u8]) -> Result<usize, ArrowError>
从 buf 解析 Block,返回读取的字节数
此方法可以连续多次调用,每次传入数据块,从而允许与分块 I/O 系统(例如 BufRead::fill_buf)集成
所有错误都应被视为致命错误,并中止解码
一旦整个 Block 被解码,此方法将不再读取任何进一步的输入字节,直到调用 Self::flush。之后,可以再次使用 Self::decode 来读取下一个块(如果有)