From 8198d4a1605ad615f7bf00e5851d9e784015af66 Mon Sep 17 00:00:00 2001
From: lemire Read a bitmap from a serialized buffer safely (reading up to maxbytes). In case of failure, NULL is returned. Read a bitmap from a serialized buffer (reading up to maxbytes). In case of failure, NULL is returned. This is meant to be compatible with other languages https://github.com/RoaringBitmap/RoaringFormatSpec#extension-for-64-bit-implementations The function itself is safe in the sense that it will not cause buffer overflows. However, for correct operations, it is assumed that the bitmap read was once serialized from a valid bitmap (i.e., it follows the format specification). If you provided an incorrect input (garbage), then the bitmap read may not be in a valid state and following operations may not lead to sensible results. In particular, the serialized array containers need to be in sorted order, and the run containers should be in sorted non-overlapping order. This is is guaranteed to happen when serializing an existing bitmap, but not for random inputs. The function itself is safe in the sense that it will not cause buffer overflows: it will not read beyond the scope of the provided buffer (buf,maxbytes). However, for correct operations, it is assumed that the bitmap read was once serialized from a valid bitmap (i.e., it follows the format specification). If you provided an incorrect input (garbage), then the bitmap read may not be in a valid state and following operations may not lead to sensible results. In particular, the serialized array containers need to be in sorted order, and the run containers should be in sorted non-overlapping order. This is is guaranteed to happen when serializing an existing bitmap, but not for random inputs. You may use roaring64_bitmap_internal_validate to check the validity of the bitmap prior to using it. We recommend that you use checksums to check that serialized data corresponds to a serialized bitmap. This function is endian-sensitive. If you have a big-endian system (e.g., a mainframe IBM s390x), the data format is going to be big-endian and not compatible with little-endian systems.
-
https://github.com/RoaringBitmap/RoaringFormatSpec#extension-for-64-bit-implementations
This function is endian-sensitive. If you have a big-endian system (e.g., a mainframe IBM s390x), the data format is going to be big-endian and not compatible with little-endian systems.
+This function is endian-sensitive. If you have a big-endian system (e.g., a mainframe IBM s390x), the data format is going to be big-endian and not compatible with little-endian systems.
+When serializing data to a file, we recommend that you also use checksums so that, at deserialization, you can be confident that you are recovering the correct data.
diff --git a/d8/d01/roaring64_8h_source.html b/d8/d01/roaring64_8h_source.html index dc8011df..0d7fbc33 100644 --- a/d8/d01/roaring64_8h_source.html +++ b/d8/d01/roaring64_8h_source.html @@ -297,56 +297,56 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + +roaring_bitmap_t *r =... roaring_uint32_iterator_t i; roaring_iterator_create(r, &i); while(i.has_value) { printf("value = %d\n", i.current_value); roaring_uint32_iterator_advance(&i); }
Obviously, if you modify the underlying bitmap, the iterator becomes invalid. So don't. A struct used to keep iterator state. Users should only access current_value
and has_value
, the rest of the type should be treated as opaque.
Definition at line 960 of file roaring.h.
+Definition at line 977 of file roaring.h.
Definition at line 962 of file roaring.h.
+Definition at line 979 of file roaring.h.
@@ -150,7 +150,7 @@Definition at line 964 of file roaring.h.
+Definition at line 981 of file roaring.h.
@@ -166,7 +166,7 @@Definition at line 966 of file roaring.h.
+Definition at line 983 of file roaring.h.
@@ -182,7 +182,7 @@Definition at line 968 of file roaring.h.
+Definition at line 985 of file roaring.h.
@@ -198,7 +198,7 @@Definition at line 969 of file roaring.h.
+Definition at line 986 of file roaring.h.
@@ -214,7 +214,7 @@Definition at line 965 of file roaring.h.
+Definition at line 982 of file roaring.h.
@@ -230,7 +230,7 @@Definition at line 961 of file roaring.h.
+Definition at line 978 of file roaring.h.
@@ -246,7 +246,7 @@Definition at line 963 of file roaring.h.
+Definition at line 980 of file roaring.h.
diff --git a/dc/d56/roaring_8h.html b/dc/d56/roaring_8h.html index 8f2fd4cc..dc3fd41f 100644 --- a/dc/d56/roaring_8h.html +++ b/dc/d56/roaring_8h.html @@ -450,7 +450,7 @@DEPRECATED, use roaring_uint32_iterator_advance
.
Definition at line 1028 of file roaring.h.
+Definition at line 1045 of file roaring.h.
References roaring_uint32_iterator_advance().
@@ -1340,7 +1340,8 @@Serializes bitmap using frozen format. Buffer size must be at least roaring_bitmap_frozen_size_in_bytes().
-This function is endian-sensitive. If you have a big-endian system (e.g., a mainframe IBM s390x), the data format is going to be big-endian and not compatible with little-endian systems.
+This function is endian-sensitive. If you have a big-endian system (e.g., a mainframe IBM s390x), the data format is going to be big-endian and not compatible with little-endian systems.
+When serializing data to a file, we recommend that you also use checksums so that, at deserialization, you can be confident that you are recovering the correct data.
Referenced by roaring::Roaring::writeFrozen().
@@ -2261,8 +2262,10 @@Read bitmap from a serialized buffer safely (reading up to maxbytes). In case of failure, NULL is returned.
This is meant to be compatible with the Java and Go versions: https://github.com/RoaringBitmap/RoaringFormatSpec
-The function itself is safe in the sense that it will not cause buffer overflows. However, for correct operations, it is assumed that the bitmap read was once serialized from a valid bitmap (i.e., it follows the format specification). If you provided an incorrect input (garbage), then the bitmap read may not be in a valid state and following operations may not lead to sensible results. In particular, the serialized array containers need to be in sorted order, and the run containers should be in sorted non-overlapping order. This is is guaranteed to happen when serializing an existing bitmap, but not for random inputs.
-You may use roaring_bitmap_internal_validate to check the validity of the bitmap prior to using it. You may also use other strategies to check for corrupted inputs (e.g., checksums).
+The function itself is safe in the sense that it will not cause buffer overflows: it will not read beyond the scope of the provided buffer (buf,maxbytes).
+However, for correct operations, it is assumed that the bitmap read was once serialized from a valid bitmap (i.e., it follows the format specification). If you provided an incorrect input (garbage), then the bitmap read may not be in a valid state and following operations may not lead to sensible results. In particular, the serialized array containers need to be in sorted order, and the run containers should be in sorted non-overlapping order. This is is guaranteed to happen when serializing an existing bitmap, but not for random inputs.
+You may use roaring_bitmap_internal_validate to check the validity of the bitmap prior to using it.
+We recommend that you use checksums to check that serialized data corresponds to a serialized bitmap.
This function is endian-sensitive. If you have a big-endian system (e.g., a mainframe IBM s390x), the data format is going to be big-endian and not compatible with little-endian systems.
Referenced by roaring::Roaring::readSafe().
@@ -2327,7 +2330,8 @@This function is endian-sensitive. If you have a big-endian system (e.g., a mainframe IBM s390x), the data format is going to be big-endian and not compatible with little-endian systems.
+This function is endian-sensitive. If you have a big-endian system (e.g., a mainframe IBM s390x), the data format is going to be big-endian and not compatible with little-endian systems.
+When serializing data to a file, we recommend that you also use checksums so that, at deserialization, you can be confident that you are recovering the correct data.
Referenced by roaring::Roaring::write().
@@ -2862,7 +2866,8 @@Returns how many bytes written, should be roaring_bitmap_size_in_bytes(r)
.
This function is endian-sensitive. If you have a big-endian system (e.g., a mainframe IBM s390x), the data format is going to be big-endian and not compatible with little-endian systems.
+This function is endian-sensitive. If you have a big-endian system (e.g., a mainframe IBM s390x), the data format is going to be big-endian and not compatible with little-endian systems.
+When serializing data to a file, we recommend that you also use checksums so that, at deserialization, you can be confident that you are recovering the correct data.
Referenced by roaring::Roaring::write().
@@ -3191,7 +3196,7 @@DEPRECATED, use roaring_uint32_iterator_copy
.
Definition at line 1074 of file roaring.h.
+Definition at line 1091 of file roaring.h.
References roaring_uint32_iterator_copy().
@@ -3222,7 +3227,7 @@DEPRECATED, use roaring_iterator_create
.
Definition at line 1012 of file roaring.h.
+Definition at line 1029 of file roaring.h.
References roaring_iterator_create().
@@ -3253,7 +3258,7 @@DEPRECATED, use roaring_uint32_iterator_free
.
Definition at line 1084 of file roaring.h.
+Definition at line 1101 of file roaring.h.
References roaring_uint32_iterator_free().
@@ -3294,7 +3299,7 @@DEPRECATED, use roaring_iterator_init
.
Definition at line 981 of file roaring.h.
+Definition at line 998 of file roaring.h.
References roaring_iterator_init().
@@ -3335,7 +3340,7 @@DEPRECATED, use roaring_iterator_init_last
.
Definition at line 995 of file roaring.h.
+Definition at line 1012 of file roaring.h.
References roaring_iterator_init_last().
@@ -3542,7 +3547,7 @@DEPRECATED, use roaring_uint32_iterator_move_equalorlarger
.
Definition at line 1060 of file roaring.h.
+Definition at line 1077 of file roaring.h.
References roaring_uint32_iterator_move_equalorlarger().
@@ -3573,7 +3578,7 @@DEPRECATED, use roaring_uint32_iterator_previous
.
Definition at line 1045 of file roaring.h.
+Definition at line 1062 of file roaring.h.
References roaring_uint32_iterator_previous().
@@ -3620,7 +3625,7 @@DEPRECATED, use roaring_uint32_iterator_read
.
Definition at line 1104 of file roaring.h.
+Definition at line 1121 of file roaring.h.
References roaring_uint32_iterator_read().
diff --git a/dc/d56/roaring_8h_source.html b/dc/d56/roaring_8h_source.html index d95ead6e..525025d5 100644 --- a/dc/d56/roaring_8h_source.html +++ b/dc/d56/roaring_8h_source.html @@ -325,218 +325,218 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +We also support efficient 64-bit compressed bitmaps in C:
@@ -459,7 +470,8 @@The API is similar to the conventional 32-bit bitmaps. Please see the header file roaring64.h
(compare with roaring.h
).
We support convention bitsets (uncompressed) as part of the library.
Simple example: