bs_write_uint_exp_golomb {bitstreamio}R Documentation

Read/Write Exponential-Golomb encoded non-negative integers

Description

Read/Write Exponential-Golomb encoded non-negative integers

Usage

bs_write_uint_exp_golomb(bs, x)

bs_read_uint_exp_golomb(bs, n = 1L)

Arguments

bs

Bistream connection object created with bs_open()

x

integer vector to write

n

number of encoded integers to read

Value

Reading returns a vector of non-negative integers. Writing returns the bitstream invisibly.

Examples

bs  <- bs_open(raw(), 'w')
bs_write_uint_exp_golomb(bs, c(0, 4, 21))
bs_align(bs, 8)
raw_vec <- bs_close(bs)
raw_vec


bs  <- bs_open(raw_vec, 'r')
bs_read_uint_exp_golomb(bs, 3)
bs_close(bs)

[Package bitstreamio version 0.1.0 Index]