Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

andy2046/bitmap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

3 Commits

Repository files navigation

bitmap

import "github.com/andy2046/bitmap"

Package bitmap implements Bitmap in Go.

bitmap.go

const MaxBitmapSize uint64 = 0x01 << 40

MaxBitmapSize is the maximum bitmap size (in bits).

type Bitmap struct {
 // contains filtered or unexported fields
}

Bitmap represents a bitmap.

func New(size uint64) *Bitmap

New creates a new Bitmap.

func (*Bitmap) GetBit

func (b *Bitmap) GetBit(offset uint64) bool

GetBit returns the value of bit at offset.

func (*Bitmap) SetBit

func (b *Bitmap) SetBit(offset uint64, v bool) bool

SetBit sets bit at offset to value v.

func (*Bitmap) Size

func (b *Bitmap) Size() uint64

Size returns the bitmap size (in bits).

About

bitmap implementation in Go

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

AltStyle によって変換されたページ (->オリジナル) /