//! Read and write from and to Apache Avro12pub use avro_schema;34pub mod read;5pub mod write;67// macros that can operate in sync and async code.8macro_rules! avro_decode {9($reader:ident $($_await:tt)*) => {10{11let mut i = 0u64;12let mut buf = [0u8; 1];13let mut j = 0;14loop {15if j > 9 {16// if j * 7 > 6417polars_error::polars_bail!(oos = "zigzag decoding failed - corrupt avro file")18}19$reader.read_exact(&mut buf[..])$($_await)*?;20i |= (u64::from(buf[0] & 0x7F)) << (j * 7);21if (buf[0] >> 7) == 0 {22break;23} else {24j += 1;25}26}2728Ok(i)29}30}31}3233pub(crate) use avro_decode;343536