Skip to content

js-ojus/sparsebitset.cr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

SparseBitSet

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.

Installation

Add this line to your application's shard.yml:

dependencies:
  sparsebitset:
    github: js-ojus/sparsebitset.cr
    version: ">= 0.5.0"

Usage

require "sparsebitset"

Contributing

  1. Fork it ( https://github.com/js-ojus/sparsebitset.cr/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

About

Port of my Go `sparsebitset` to Crystal

Resources

License

Stars

Watchers

Forks

Packages

No packages published