File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -1099,7 +1099,11 @@ impl Bitmap {
1099
1099
unsafe { ffi:: roaring_bitmap_shrink_to_fit ( & mut self . bitmap ) }
1100
1100
}
1101
1101
1102
- /// Compresses of the bitmap. Returns true if the bitmap was modified.
1102
+ /// Optimize the type of containers used in the bitmap.
1103
+ ///
1104
+ /// Returns true if the result contains at least one run container.
1105
+ ///
1106
+ /// Additional space savings may be achieved by calling [`Self::shrink_to_fit`].
1103
1107
///
1104
1108
/// # Examples
1105
1109
///
@@ -1111,6 +1115,8 @@ impl Bitmap {
1111
1115
/// assert_eq!(bitmap.cardinality(), 900);
1112
1116
/// let old_size = bitmap.get_serialized_size_in_bytes::<Portable>();
1113
1117
/// assert!(bitmap.run_optimize());
1118
+ /// # // run_optimize returns true if there's at least one run, not if the bitmap was changed
1119
+ /// # assert!(bitmap.run_optimize());
1114
1120
/// let new_size = bitmap.get_serialized_size_in_bytes::<Portable>();
1115
1121
/// assert!(new_size < old_size);
1116
1122
/// ```
Original file line number Diff line number Diff line change @@ -1158,8 +1158,11 @@ impl Treemap {
1158
1158
treemap
1159
1159
}
1160
1160
1161
- /// Compresses treemap's bitmaps. Returns true if any of the bitmaps
1162
- /// were modified.
1161
+ /// Optimize the type of containers used in the treemap.
1162
+ ///
1163
+ /// Returns true if the result contains at least one run container.
1164
+ ///
1165
+ /// Additional space savings may be achieved by calling [`Self::shrink_to_fit`].
1163
1166
///
1164
1167
/// # Examples
1165
1168
///
You can’t perform that action at this time.
0 commit comments