Skip to content

Commit

Permalink
Merge pull request #43 from Nemo157/version_bump
Browse files Browse the repository at this point in the history
Version bump
  • Loading branch information
Nemo157 authored Apr 7, 2017
2 parents a86104d + 79d17bb commit 25610dc
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
6 changes: 5 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "roaring"
version = "0.5.0"
version = "0.5.1"
authors = ["Wim Looman <[email protected]>"]
description = "http://roaringbitmap.org : A better compressed bitset - pure Rust implementation "

Expand All @@ -9,8 +9,12 @@ repository = "https://github.com/Nemo157/roaring-rs"

readme = "README.md"
keywords = ["roaring", "data-structure", "bitmap"]
categories = ["data-structures"]

license = "MIT/Apache-2.0"

[badges]
travis-ci = { repository = "Nemo157/roaring-rs" }

[dependencies]
byteorder = "0.5.3"
13 changes: 13 additions & 0 deletions src/bitmap/serialization.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,19 @@ const SERIAL_COOKIE: u16 = 12347;
impl RoaringBitmap {
/// Return the size in bytes of the serialized output.
/// This is compatible with the official C/C++, Java and Go implementations.
///
/// # Examples
///
/// ```rust
/// use roaring::RoaringBitmap;
///
/// let rb1: RoaringBitmap = (1..4).collect();
/// let mut bytes = Vec::with_capacity(rb1.serialized_size());
/// rb1.serialize_into(&mut bytes).unwrap();
/// let rb2 = RoaringBitmap::deserialize_from(&mut &bytes[..]).unwrap();
///
/// assert_eq!(rb1, rb2);
/// ```
pub fn serialized_size(&self) -> usize {
let container_sizes: usize = self.containers.iter().map(|container| {
match container.store {
Expand Down
2 changes: 1 addition & 1 deletion src/treemap/iter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ impl Iterator for IntoIter {
}

impl RoaringTreemap {
/// Iterator over each value stored in the RoaringBitmap, guarantees values are ordered by
/// Iterator over each value stored in the RoaringTreemap, guarantees values are ordered by
/// value.
///
/// # Examples
Expand Down

0 comments on commit 25610dc

Please sign in to comment.