Skip to content

Latest commit

 

History

History
28 lines (24 loc) · 431 Bytes

README.md

File metadata and controls

28 lines (24 loc) · 431 Bytes

bitmap

bitmap is implemented by golang

example

package main

import (
    "github.com/legendtkl/bitmap"
    "fmt"
)

func main() {
    bitMap, _ := bitmap.NewBitMap(100)
    err := bitMap.SetOne(101)   // out of size
    if err != nil {
        fmt.Println(err)
    }

    bitMap.SetOne(99)
    x, err = bitMap.GetPosition(99)
    if err != nil {
        fmt.Println(err)
    } else {
        fmt.Println(x)
    }
}