Learn R Programming

bitstreamio (version 0.1.0)

bs_flush: Flush bits in the buffer

Description

This is called internally to flush bitstream buffers to the underlying R connection.

Usage

bs_flush(bs)

Value

Bitstream connection returned invisibly

Arguments

bs

Bistream connection object created with bs_open()

Examples

Run this code
bs  <- bs_open(raw(), 'w')
bs_write_bit(bs, c(TRUE, FALSE, TRUE))
bs_align(bs, nbits = 8)
bs_flush(bs)
output <- bs_close(bs)
output

Run the code above in your browser using DataLab