1
1
// !!! DO NOT EDIT - THIS IS AN AUTO-GENERATED FILE !!!
2
- // Created by amalgamation.sh on 2022-11-11T14 :36:13Z
2
+ // Created by amalgamation.sh on 2023-02-09T21 :36:47Z
3
3
4
4
/*
5
5
* The CRoaring project is under a dual license (Apache/MIT).
58
58
// /include/roaring/roaring_version.h automatically generated by release.py, do not change by hand
59
59
#ifndef ROARING_INCLUDE_ROARING_VERSION
60
60
#define ROARING_INCLUDE_ROARING_VERSION
61
- #define ROARING_VERSION "0.7.3 "
61
+ #define ROARING_VERSION "0.9.5 "
62
62
enum {
63
63
ROARING_VERSION_MAJOR = 0 ,
64
- ROARING_VERSION_MINOR = 7 ,
65
- ROARING_VERSION_REVISION = 3
64
+ ROARING_VERSION_MINOR = 9 ,
65
+ ROARING_VERSION_REVISION = 5
66
66
};
67
67
#endif // ROARING_INCLUDE_ROARING_VERSION
68
68
/* end file include/roaring/roaring_version.h */
@@ -294,6 +294,11 @@ void roaring_bitmap_printf(const roaring_bitmap_t *r);
294
294
/**
295
295
* Computes the intersection between two bitmaps and returns new bitmap. The
296
296
* caller is responsible for memory management.
297
+ *
298
+ * Performance hint: if you are computing the intersection between several
299
+ * bitmaps, two-by-two, it is best to start with the smallest bitmap.
300
+ * You may also rely on roaring_bitmap_and_inplace to avoid creating
301
+ * many temporary bitmaps.
297
302
*/
298
303
roaring_bitmap_t * roaring_bitmap_and (const roaring_bitmap_t * r1 ,
299
304
const roaring_bitmap_t * r2 );
@@ -345,7 +350,10 @@ uint64_t roaring_bitmap_xor_cardinality(const roaring_bitmap_t *r1,
345
350
346
351
/**
347
352
* Inplace version of `roaring_bitmap_and()`, modifies r1
348
- * r1 == r2 is allowed
353
+ * r1 == r2 is allowed.
354
+ *
355
+ * Performance hint: if you are computing the intersection between several
356
+ * bitmaps, two-by-two, it is best to start with the smallest bitmap.
349
357
*/
350
358
void roaring_bitmap_and_inplace (roaring_bitmap_t * r1 ,
351
359
const roaring_bitmap_t * r2 );
@@ -643,14 +651,20 @@ size_t roaring_bitmap_shrink_to_fit(roaring_bitmap_t *r);
643
651
* more space efficient than the portable form, e.g. when the data is sparse.
644
652
*
645
653
* Returns how many bytes written, should be `roaring_bitmap_size_in_bytes(r)`.
654
+ *
655
+ * This function is endian-sensitive. If you have a big-endian system (e.g., a mainframe IBM s390x),
656
+ * the data format is going to be big-endian and not compatible with little-endian systems.
646
657
*/
647
658
size_t roaring_bitmap_serialize (const roaring_bitmap_t * r , char * buf );
648
659
649
660
/**
650
661
* Use with `roaring_bitmap_serialize()`.
651
662
*
652
663
* (See `roaring_bitmap_portable_deserialize()` if you want a format that's
653
- * compatible with Java and Go implementations)
664
+ * compatible with Java and Go implementations).
665
+ *
666
+ * This function is endian-sensitive. If you have a big-endian system (e.g., a mainframe IBM s390x),
667
+ * the data format is going to be big-endian and not compatible with little-endian systems.
654
668
*/
655
669
roaring_bitmap_t * roaring_bitmap_deserialize (const void * buf );
656
670
@@ -670,6 +684,9 @@ size_t roaring_bitmap_size_in_bytes(const roaring_bitmap_t *r);
670
684
*
671
685
* This is meant to be compatible with the Java and Go versions:
672
686
* https://github.com/RoaringBitmap/RoaringFormatSpec
687
+ *
688
+ * This function is endian-sensitive. If you have a big-endian system (e.g., a mainframe IBM s390x),
689
+ * the data format is going to be big-endian and not compatible with little-endian systems.
673
690
*/
674
691
roaring_bitmap_t * roaring_bitmap_portable_deserialize (const char * buf );
675
692
@@ -679,10 +696,34 @@ roaring_bitmap_t *roaring_bitmap_portable_deserialize(const char *buf);
679
696
*
680
697
* This is meant to be compatible with the Java and Go versions:
681
698
* https://github.com/RoaringBitmap/RoaringFormatSpec
699
+ *
700
+ * This function is endian-sensitive. If you have a big-endian system (e.g., a mainframe IBM s390x),
701
+ * the data format is going to be big-endian and not compatible with little-endian systems.
682
702
*/
683
703
roaring_bitmap_t * roaring_bitmap_portable_deserialize_safe (const char * buf ,
684
704
size_t maxbytes );
685
705
706
+ /**
707
+ * Read bitmap from a serialized buffer.
708
+ * In case of failure, NULL is returned.
709
+ *
710
+ * Bitmap returned by this function can be used in all readonly contexts.
711
+ * Bitmap must be freed as usual, by calling roaring_bitmap_free().
712
+ * Underlying buffer must not be freed or modified while it backs any bitmaps.
713
+ *
714
+ * The function is unsafe in the following ways:
715
+ * 1) It may execute unaligned memory accesses.
716
+ * 2) A buffer overflow may occur if buf does not point to a valid serialized
717
+ * bitmap.
718
+ *
719
+ * This is meant to be compatible with the Java and Go versions:
720
+ * https://github.com/RoaringBitmap/RoaringFormatSpec
721
+ *
722
+ * This function is endian-sensitive. If you have a big-endian system (e.g., a mainframe IBM s390x),
723
+ * the data format is going to be big-endian and not compatible with little-endian systems.
724
+ */
725
+ roaring_bitmap_t * roaring_bitmap_portable_deserialize_frozen (const char * buf );
726
+
686
727
/**
687
728
* Check how many bytes would be read (up to maxbytes) at this pointer if there
688
729
* is a bitmap, returns zero if there is no valid bitmap.
@@ -710,6 +751,9 @@ size_t roaring_bitmap_portable_size_in_bytes(const roaring_bitmap_t *r);
710
751
*
711
752
* This is meant to be compatible with the Java and Go versions:
712
753
* https://github.com/RoaringBitmap/RoaringFormatSpec
754
+ *
755
+ * This function is endian-sensitive. If you have a big-endian system (e.g., a mainframe IBM s390x),
756
+ * the data format is going to be big-endian and not compatible with little-endian systems.
713
757
*/
714
758
size_t roaring_bitmap_portable_serialize (const roaring_bitmap_t * r , char * buf );
715
759
@@ -740,6 +784,9 @@ size_t roaring_bitmap_frozen_size_in_bytes(const roaring_bitmap_t *r);
740
784
/**
741
785
* Serializes bitmap using frozen format.
742
786
* Buffer size must be at least roaring_bitmap_frozen_size_in_bytes().
787
+ *
788
+ * This function is endian-sensitive. If you have a big-endian system (e.g., a mainframe IBM s390x),
789
+ * the data format is going to be big-endian and not compatible with little-endian systems.
743
790
*/
744
791
void roaring_bitmap_frozen_serialize (const roaring_bitmap_t * r , char * buf );
745
792
@@ -753,6 +800,9 @@ void roaring_bitmap_frozen_serialize(const roaring_bitmap_t *r, char *buf);
753
800
* Bitmap returned by this function can be used in all readonly contexts.
754
801
* Bitmap must be freed as usual, by calling roaring_bitmap_free().
755
802
* Underlying buffer must not be freed or modified while it backs any bitmaps.
803
+ *
804
+ * This function is endian-sensitive. If you have a big-endian system (e.g., a mainframe IBM s390x),
805
+ * the data format is going to be big-endian and not compatible with little-endian systems.
756
806
*/
757
807
const roaring_bitmap_t * roaring_bitmap_frozen_view (const char * buf ,
758
808
size_t length );
0 commit comments