mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-06-20 11:22:56 +02:00
12 lines
258 B
Rust
12 lines
258 B
Rust
use std::mem;
|
|
|
|
pub struct BoRoaringBitmapLenCodec;
|
|
|
|
impl heed::BytesDecode<'_> for BoRoaringBitmapLenCodec {
|
|
type DItem = u64;
|
|
|
|
fn bytes_decode(bytes: &[u8]) -> Option<Self::DItem> {
|
|
Some((bytes.len() / mem::size_of::<u32>()) as u64)
|
|
}
|
|
}
|