SparseBitSet
is a port of my Go sparsebitset
implementation. The description here is excerpted from the README
of that project.
A simple implementation of sparse bitsets for non-negative integers.
The representation is very simple, and uses a sequence of (offset, bits) pairs. It is similar to that of Go's x/tools/container/intsets
and Java's java.util.BitSet
.
The original motivation for sparsebitset
comes from a need to store custom indexes of documents in a database. Accordingly, sparsebitset
trades CPU time for space.
Add this line to your application's shard.yml
:
dependencies:
sparsebitset:
github: js-ojus/sparsebitset.cr
version: ">= 0.5.0"
require "sparsebitset"
- Fork it ( https://github.com/js-ojus/sparsebitset.cr/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request