pub enum Portable {}
Expand description
The Portable
format is meant to be compatible with other roaring bitmap libraries, such as Go or Java.
Note despite the name, it is not fully portable: it depends on native endianness.
It’s defined here: https://github.com/RoaringBitmap/RoaringFormatSpec
Trait Implementations§
source§impl Deserializer for Portable
impl Deserializer for Portable
source§impl Deserializer for Portable
impl Deserializer for Portable
source§fn try_deserialize(buffer: &[u8]) -> Option<Bitmap>
fn try_deserialize(buffer: &[u8]) -> Option<Bitmap>
Given a serialized bitmap as slice of bytes in portable format, returns a Bitmap
instance.
See Bitmap::try_deserialize
for examples.
source§impl Serializer for Portable
impl Serializer for Portable
source§fn serialize_into_writer<W>(treemap: &Treemap, dst: W) -> Result<usize>where
W: Write,
fn serialize_into_writer<W>(treemap: &Treemap, dst: W) -> Result<usize>where
W: Write,
Serializes a Treemap to a writer in portable format.
See Treemap::serialize_into_writer
for examples.
source§fn serialize_into<'a>(treemap: &Treemap, dst: &'a mut Vec<u8>) -> &'a [u8] ⓘ
fn serialize_into<'a>(treemap: &Treemap, dst: &'a mut Vec<u8>) -> &'a [u8] ⓘ
Serializes a Treemap to a slice of bytes in portable format.
See Treemap::serialize_into
for examples.
source§fn get_serialized_size_in_bytes(treemap: &Treemap) -> usize
fn get_serialized_size_in_bytes(treemap: &Treemap) -> usize
Computes the serialized size in bytes of the Treemap in portable format.
See Treemap::get_serialized_size_in_bytes
for examples.
source§impl Serializer for Portable
impl Serializer for Portable
source§fn serialize_into<'a>(bitmap: &Bitmap, dst: &'a mut Vec<u8>) -> &'a [u8] ⓘ
fn serialize_into<'a>(bitmap: &Bitmap, dst: &'a mut Vec<u8>) -> &'a [u8] ⓘ
Serializes a bitmap to a slice of bytes in portable format.
See Bitmap::serialize_into
for examples.
source§fn get_serialized_size_in_bytes(bitmap: &Bitmap) -> usize
fn get_serialized_size_in_bytes(bitmap: &Bitmap) -> usize
Computes the serialized size in bytes of the Bitmap in portable format.
See Bitmap::get_serialized_size_in_bytes
for examples.
source§impl ViewDeserializer for Portable
impl ViewDeserializer for Portable
source§unsafe fn deserialize_view(data: &[u8]) -> BitmapView<'_>
unsafe fn deserialize_view(data: &[u8]) -> BitmapView<'_>
Read bitmap from a serialized buffer
This is meant to be compatible with the Java and Go versions
Safety
data
must be the result of serializing a roaring bitmap in portable mode (followinghttps://github.com/RoaringBitmap/RoaringFormatSpec
), for example, withBitmap::serialize
- Using this function (or the returned bitmap in any way) may execute unaligned memory accesses