diff options
author | robot-contrib <[email protected]> | 2025-06-15 09:25:25 +0300 |
---|---|---|
committer | robot-contrib <[email protected]> | 2025-06-15 09:48:27 +0300 |
commit | 726087f32fb38c191ff0c3ef8c6646aa940d987e (patch) | |
tree | a3495141325c08ddea3a6050274d221ddbce6664 /contrib/libs | |
parent | b73dea5dc2b4ce1e07a5445c2cea548039cb1b3d (diff) |
Update contrib/libs/croaring to 4.3.3
commit_hash:39a69dfa71c7a4f33f49fcb243fc529ea807c652
Diffstat (limited to 'contrib/libs')
-rw-r--r-- | contrib/libs/croaring/.yandex_meta/override.nix | 4 | ||||
-rw-r--r-- | contrib/libs/croaring/README.md | 45 | ||||
-rw-r--r-- | contrib/libs/croaring/include/roaring/containers/array.h | 2 | ||||
-rw-r--r-- | contrib/libs/croaring/include/roaring/roaring_version.h | 4 | ||||
-rw-r--r-- | contrib/libs/croaring/src/containers/run.c | 14 | ||||
-rw-r--r-- | contrib/libs/croaring/ya.make | 4 |
6 files changed, 42 insertions, 31 deletions
diff --git a/contrib/libs/croaring/.yandex_meta/override.nix b/contrib/libs/croaring/.yandex_meta/override.nix index 368c897d276..7ab1d0f3770 100644 --- a/contrib/libs/croaring/.yandex_meta/override.nix +++ b/contrib/libs/croaring/.yandex_meta/override.nix @@ -1,12 +1,12 @@ pkgs: attrs: with pkgs; with attrs; rec { pname = "croaring"; - version = "4.3.2"; + version = "4.3.3"; src = fetchFromGitHub { owner = "RoaringBitmap"; repo = "CRoaring"; rev = "v${version}"; - hash = "sha256-IAQ6w3J/EbkPBGF5AH7jG7JqdCnrRY55+7df33Sbe78="; + hash = "sha256-LQkva2w2TlEdLFj6xLjCY+2wVWsM3NVpGS9irYVrskA="; }; patches = []; diff --git a/contrib/libs/croaring/README.md b/contrib/libs/croaring/README.md index 08e2d4c46ec..8bed6fcb68e 100644 --- a/contrib/libs/croaring/README.md +++ b/contrib/libs/croaring/README.md @@ -144,6 +144,12 @@ Linux or macOS users might follow the following instructions if they have a rece ``` + +Packages +------ + +[](https://repology.org/project/croaring/versions) + # Using Roaring as a CPM dependency @@ -891,20 +897,25 @@ later `roaring_bitmap_or_inplace` will be very fast. You should benchmark these alternatives on your own data to decide what is best. -# Wrappers +# Wrappers for Roaring Bitmaps + +This page lists several community-contributed wrappers for the Roaring Bitmap library, enabling its use in various programming languages and environments. ## Python -Tom Cornebize wrote a Python wrapper available at https://github.com/Ezibenroc/PyRoaringBitMap -Installing it is as easy as typing... + +Tom Cornebize developed a Python wrapper, **PyRoaringBitMap**, which can be found at [https://github.com/Ezibenroc/PyRoaringBitMap](https://github.com/Ezibenroc/PyRoaringBitMap). + +Installation is straightforward using pip: ``` pip install pyroaring ``` -## JavaScript +## JavaScript (Node.js) + +Salvatore Previti created a Node.js wrapper, **roaring-node**, available at [https://github.com/SalvatorePreviti/roaring-node](https://github.com/SalvatorePreviti/roaring-node). -Salvatore Previti wrote a Node/JavaScript wrapper available at https://github.com/SalvatorePreviti/roaring-node -Installing it is as easy as typing... +You can install it via npm with the following command: ``` npm install roaring @@ -912,33 +923,31 @@ npm install roaring ## Swift -Jérémie Piotte wrote a [Swift wrapper](https://github.com/RoaringBitmap/SwiftRoaring). - - -## C# +Jérémie Piotte authored the [Swift wrapper](https://github.com/RoaringBitmap/SwiftRoaring). -Brandon Smith wrote a C# wrapper available at https://github.com/RogueException/CRoaring.Net (works for Windows and Linux under x64 processors) +## C\# +There is a C\# wrapper, **CRoaring.Net**, located at [https://github.com/k-wojcik/Roaring.Net](https://github.com/k-wojcik/Roaring.Net). This wrapper is compatible with Windows and Linux on x64 processors. -## Go (golang) +## Go (Golang) -There is a Go (golang) wrapper available at https://github.com/RoaringBitmap/gocroaring +A Go wrapper is available at the official RoaringBitmap GitHub organization: [https://github.com/RoaringBitmap/gocroaring](https://github.com/RoaringBitmap/gocroaring). ## Rust -Saulius Grigaliunas wrote a Rust wrapper available at https://github.com/saulius/croaring-rs +Saulius Grigaliunas developed a Rust wrapper, **croaring-rs**, which can be found at [https://github.com/saulius/croaring-rs](https://github.com/saulius/croaring-rs). ## D -Yuce Tekol wrote a D wrapper available at https://github.com/yuce/droaring +Yuce Tekol created a D wrapper, **droaring**, available at [https://github.com/yuce/droaring](https://github.com/yuce/droaring). -## Redis +## Redis Module -Antonio Guilherme Ferreira Viggiano wrote a Redis Module available at https://github.com/aviggiano/redis-roaring +Antonio Guilherme Ferreira Viggiano wrote a Redis Module integrating Roaring Bitmaps, available at [https://github.com/aviggiano/redis-roaring](https://github.com/aviggiano/redis-roaring). ## Zig -Justin Whear wrote a Zig wrapper available at https://github.com/jwhear/roaring-zig +Justin Whear contributed a Zig wrapper, located at [https://github.com/jwhear/roaring-zig](https://github.com/jwhear/roaring-zig). # Mailing list/discussion group diff --git a/contrib/libs/croaring/include/roaring/containers/array.h b/contrib/libs/croaring/include/roaring/containers/array.h index 8d5c84a0cb5..5207897b4c6 100644 --- a/contrib/libs/croaring/include/roaring/containers/array.h +++ b/contrib/libs/croaring/include/roaring/containers/array.h @@ -163,7 +163,7 @@ bool array_container_validate(const array_container_t *v, const char **reason); * Return the serialized size in bytes of a container having cardinality "card". */ static inline int32_t array_container_serialized_size_in_bytes(int32_t card) { - return card * 2 + 2; + return card * sizeof(uint16_t); } /** diff --git a/contrib/libs/croaring/include/roaring/roaring_version.h b/contrib/libs/croaring/include/roaring/roaring_version.h index 5d5014b42ef..e6b2324f9a7 100644 --- a/contrib/libs/croaring/include/roaring/roaring_version.h +++ b/contrib/libs/croaring/include/roaring/roaring_version.h @@ -2,11 +2,11 @@ // /include/roaring/roaring_version.h automatically generated by release.py, do not change by hand #ifndef ROARING_INCLUDE_ROARING_VERSION #define ROARING_INCLUDE_ROARING_VERSION -#define ROARING_VERSION "4.3.1" +#define ROARING_VERSION "4.3.3" enum { ROARING_VERSION_MAJOR = 4, ROARING_VERSION_MINOR = 3, - ROARING_VERSION_REVISION = 1 + ROARING_VERSION_REVISION = 3 }; #endif // ROARING_INCLUDE_ROARING_VERSION // clang-format on
\ No newline at end of file diff --git a/contrib/libs/croaring/src/containers/run.c b/contrib/libs/croaring/src/containers/run.c index 986db6d1ac8..1f2c74f8128 100644 --- a/contrib/libs/croaring/src/containers/run.c +++ b/contrib/libs/croaring/src/containers/run.c @@ -135,20 +135,22 @@ void run_container_offset(const run_container_t *c, container_t **loc, run_container_t *lo = NULL, *hi = NULL; bool split; - int lo_cap, hi_cap; + unsigned int lo_cap, hi_cap; int top, pivot; top = (1 << 16) - offset; pivot = run_container_index_equalorlarger(c, top); + // pivot is the index of the first run that is >= top or -1 if no such run - if (pivot == -1) { - split = false; - lo_cap = c->n_runs; - hi_cap = 0; - } else { + if(pivot >= 0) { split = c->runs[pivot].value < top; lo_cap = pivot + (split ? 1 : 0); hi_cap = c->n_runs - pivot; + } else { + // here pivot < 0 + split = false; + lo_cap = c->n_runs; + hi_cap = 0; } if (loc && lo_cap) { diff --git a/contrib/libs/croaring/ya.make b/contrib/libs/croaring/ya.make index 76b204ca799..1ad45cf3447 100644 --- a/contrib/libs/croaring/ya.make +++ b/contrib/libs/croaring/ya.make @@ -10,9 +10,9 @@ LICENSE( LICENSE_TEXTS(.yandex_meta/licenses.list.txt) -VERSION(4.3.2) +VERSION(4.3.3) -ORIGINAL_SOURCE(https://github.com/RoaringBitmap/CRoaring/archive/v4.3.2.tar.gz) +ORIGINAL_SOURCE(https://github.com/RoaringBitmap/CRoaring/archive/v4.3.3.tar.gz) ADDINCL( GLOBAL contrib/libs/croaring/include |