powered by
Is the current bit connection aligned at the given number of bits for reading/writing?
bs_is_aligned(bs, nbits = 8)
logical. TRUE if stream location is currently aligned to the specified number of bits, otherwise FALSE
Bistream connection object created with bs_open()
bs_open()
number of bits of alignment w.r.t start of bitstream. Default: 8
bs <- bs_open(raw(), 'w') bs_write_bit(bs, c(TRUE, FALSE, TRUE)) bs_is_aligned(bs, 8) bs_align(bs, nbits = 8) bs_is_aligned(bs, 8) output <- bs_close(bs) output
Run the code above in your browser using DataLab