GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - f1monkey/bitmap: Simple and stupid dense bitmap index implementation

BranchesTags
Open more actions menu

Latest commit

 

History

21 Commits
21 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
bitmap_16.go
bitmap_16.go
 
 
bitmap_16_test.go
bitmap_16_test.go
 
 
bitmap_32.go
bitmap_32.go
 
 
bitmap_32_test.go
bitmap_32_test.go
 
 
bitmap_64.go
bitmap_64.go
 
 
bitmap_64_test.go
bitmap_64_test.go
 
 
bitmap_8.go
bitmap_8.go
 
 
bitmap_8_test.go
bitmap_8_test.go
 
 
go.mod
go.mod
 
 
go.sum
go.sum
 
 

Repository files navigation

Bitmap

Yet another bitmap implementation written in go.

Installation

$ go get -v github.com/f1monkey/bitmap

Usage

func main() {
    var b bitmap.Bitmap64

    b.IsEmpty() // true

    b.Set(0)
    b.Has(0) // true
    b.Remove(0)
    b.Has(0) // false

    b.Xor(1000)
    b.Has(1000) // true
    b.Xor(1000)
    b.Has(1000) // false

    b2 := b.Clone() // copy of "b"

    b2.Range(func(n uint32) bool {
        fmt.PrintLn(n)
        return true
    })

    b.Or(b2) // in-place OR
    b.And(b2) // in-place AND

    // to string, from string
    var b3 bitmap.Bitmap64
    b3.Set(1)
    b3.Set(100)
    b3.String() // "2|68719476736"
    b4, err := bitmap.FromString("2|68719476736")

    // Bitmap32 is backed by []uint32 slice
    // Everything else is all the same
    var b32 bitmap.Bitmap32

    // Bitmap16 is backed by []uint16 slice
    // Everything else is all the same
    var b16 bitmap.Bitmap16

    // Bitmap8 is backed by []uint8 slice
    // Everything else is all the same
    var b8 bitmap.Bitmap8
}

About

Simple and stupid dense bitmap index implementation

Resources

Readme
MIT license
Activity
Custom properties

Stars

0 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.