bits

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2022 License: MIT Imports: 1 Imported by: 3

Documentation

Overview

Package bits contains functions to read/write bits from/to buffers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadBits

func ReadBits(buf []byte, pos *int, n int) (uint64, error)

ReadBits reads N bits.

func ReadFlag

func ReadFlag(buf []byte, pos *int) (bool, error)

ReadFlag reads a boolean flag.

func ReadGolombSigned

func ReadGolombSigned(buf []byte, pos *int) (int32, error)

ReadGolombSigned reads a signed golomb-encoded value.

func ReadGolombUnsigned

func ReadGolombUnsigned(buf []byte, pos *int) (uint32, error)

ReadGolombUnsigned reads an unsigned golomb-encoded value.

func ReadUint16

func ReadUint16(buf []byte, pos *int) (uint16, error)

ReadUint16 reads a uint16.

func ReadUint32

func ReadUint32(buf []byte, pos *int) (uint32, error)

ReadUint32 reads a uint32.

func ReadUint8

func ReadUint8(buf []byte, pos *int) (uint8, error)

ReadUint8 reads a uint8.

func WriteBits

func WriteBits(buf []byte, pos *int, bits uint64, n int)

WriteBits writes N bits.

Types

This section is empty.

Jump to

Keyboard shortcuts

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