Serialize the bitmap to bytes for persistence.
(&self)
| 100 | |
| 101 | /// Serialize the bitmap to bytes for persistence. |
| 102 | pub fn to_bytes(&self) -> Result<Vec<u8>, ColumnarError> { |
| 103 | let mut buf = Vec::with_capacity(self.inner.serialized_size()); |
| 104 | self.inner |
| 105 | .serialize_into(&mut buf) |
| 106 | .map_err(|e| ColumnarError::Serialization(format!("delete bitmap: {e}")))?; |
| 107 | Ok(buf) |
| 108 | } |
| 109 | |
| 110 | /// Deserialize a bitmap from bytes. |
| 111 | pub fn from_bytes(data: &[u8]) -> Result<Self, ColumnarError> { |
no outgoing calls