bits

package
v0.0.1-alpha Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2020 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PutUInt64BE

func PutUInt64BE(b []byte, res uint64, n int)

PutUInt64BE add a uint64 BE

func PutUIntBE

func PutUIntBE(b []byte, res uint, n int)

PutUIntBE add a uint BE

func WriteBytes

func WriteBytes(w io.Writer, b []byte, n int) (err error)

WriteBytes write bytes in w

func WriteInt64BE

func WriteInt64BE(w io.Writer, val int64, n int) (err error)

func WriteIntBE

func WriteIntBE(w io.Writer, val int, n int) (err error)

func WriteString

func WriteString(w io.Writer, val string, n int) (err error)

func WriteUInt64BE

func WriteUInt64BE(w io.Writer, val uint64, n int) (err error)

func WriteUIntBE

func WriteUIntBE(w io.Writer, val uint, n int) (err error)

Types

type GolombBitReader

type GolombBitReader struct {
	R io.Reader
	// contains filtered or unexported fields
}

func (*GolombBitReader) ReadBit

func (self *GolombBitReader) ReadBit() (res uint, err error)

func (*GolombBitReader) ReadBits

func (self *GolombBitReader) ReadBits(n int) (res uint, err error)

func (*GolombBitReader) ReadExponentialGolombCode

func (self *GolombBitReader) ReadExponentialGolombCode() (res uint, err error)

func (*GolombBitReader) ReadSE

func (self *GolombBitReader) ReadSE() (res uint, err error)

type Reader

type Reader struct {
	R io.Reader
	// contains filtered or unexported fields
}

Reader for bits

func (*Reader) Read

func (rdr *Reader) Read(p []byte) (n int, err error)

func (*Reader) ReadBits

func (rdr *Reader) ReadBits(n int) (bits uint, err error)

ReadBits read a bits

func (*Reader) ReadBits64

func (rdr *Reader) ReadBits64(n int) (bits uint64, err error)

ReadBits64 read a b664

type Writer

type Writer struct {
	W io.Writer
	// contains filtered or unexported fields
}

Writer of bits

func (*Writer) FlushBits

func (wtr *Writer) FlushBits() (err error)

FlushBits in buffer

func (*Writer) Write

func (wtr *Writer) Write(p []byte) (n int, err error)

func (*Writer) WriteBits

func (wtr *Writer) WriteBits(bits uint, n int) (err error)

WriteBits write n bits

func (*Writer) WriteBits64

func (wtr *Writer) WriteBits64(bits uint64, n int) (err error)

WriteBits64 write a b64

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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