bits

package
v0.0.0-...-34d0e24 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 2, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Array

type Array struct {
	Bytes []byte
}

Array is a bitmap array

type Reader

type Reader struct {
	*Array
	// contains filtered or unexported fields
}

Reader of numbers from Array.

func NewReader

func NewReader(arr *Array) *Reader

NewReader is a bitmap reader

func (*Reader) NonReadBits

func (a *Reader) NonReadBits() int

NonReadBytes returns a number of non-consumed bits

func (*Reader) NonReadBytes

func (a *Reader) NonReadBytes() int

NonReadBytes returns a number of non-consumed bytes

func (*Reader) Read

func (a *Reader) Read(bits int) (v uint)

func (*Reader) View

func (a *Reader) View(bits int) (v uint)

type Writer

type Writer struct {
	*Array
	// contains filtered or unexported fields
}

Writer of numbers to Array.

func NewWriter

func NewWriter(arr *Array) *Writer

NewWriter is a bitmap writer

func (*Writer) Write

func (a *Writer) Write(bits int, v uint)

Write bits of a number into array.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL