https://github.com/yybit/nu_plugin_roaring
A Nushell plugin for Roaring Bitmap
https://github.com/yybit/nu_plugin_roaring
Last synced: 8 months ago
JSON representation
A Nushell plugin for Roaring Bitmap
- Host: GitHub
- URL: https://github.com/yybit/nu_plugin_roaring
- Owner: yybit
- License: apache-2.0
- Created: 2025-01-08T03:56:37.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-16T15:18:19.000Z (over 1 year ago)
- Last Synced: 2025-01-16T16:47:59.655Z (over 1 year ago)
- Language: Rust
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://crates.io/crates/nu_plugin_roaring)
[](https://docs.rs/nu_plugin_roaring)
# nu_plugin_roaring
`nu_plugin_roaring` is a plugin for the Nushell that provides efficient bitmap operations using the [Roaring Bitmap](https://roaringbitmap.org/) data structure.
## Installation
```sh
cargo install nu_plugin_roaring
plugin add ~/.cargo/bin/nu_plugin_roaring
plugin use roaring
```
### Usage
The plugin supports the following methods: `new`, `len`, `list`, `contains`, and `serialize`. Here are some examples:
- Create a new bitmap, serialize it, and save it to a file:
```sh
[1..5 11..<15 21] | roaring new | roaring ser | save test.rr
```
- Import a serialized bitmap and get its length:
```sh
open test.rr | roaring len
```
- Import a serialized bitmap and check if it contains certain values:
```sh
open test.rr | roaring contains 1..3
```
- Import a serialized bitmap and list certain values:
```sh
# List elements in the range from 1 to 15
open test.rr | roaring list 1..15
# List all elements
open test.rr | roaring list
```