★ wanayoo — archive 1999 https://github.com/rulk/bitarrayNouvelle recherche | Portail wanayoo
Skip to content
master
Go to file
Code
This branch is 2 commits ahead of damnever:master.

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

README.md

BitArray for Golang Build Status GoDoc

Installation

go get github.com/damnever/bitarray

Example

package main

import "github.com/damnever/bitarray"

func main() {
    bits := bitarray.New(64)

    bits.Put(8, 1)  // set value of the bit to 1 by index 8, return old bit.
    bits.Get(8)     // get value of the bit by index 8
    bits.Set(9, 16) // set all bits to 1 between 9 and 16 , both 9 and 16 included.
    bits.Count()   // get the count of bit 1
    // Clear/Not/Eq/Leq/Lt/ToArray ...
}

About

BitArray for Golang

Resources

License

Packages

No packages published

Languages

You can’t perform that action at this time.