PHP bit stream. More...
Public Member Functions | |
size () | |
allocate ($setLength) | |
Allocates bit stream, fills bit data stream with 0's. More... | |
append (QRbitstream $arg) | |
Appends given bit stream at end of this stream. More... | |
appendNum ($bits, $num) | |
Appends bit stream cteated from given Integer number at end of current stream. More... | |
appendBytes ($size, $data) | |
Appends bit stream created from from given byte array at end of current stream. More... | |
toByte () | |
Converts current bit stream into byte array. More... | |
Static Public Member Functions | |
static | newFromNum ($bits, $num) |
Creates new bit stream from given Integer number. More... | |
static | newFromBytes ($size, $data) |
Creates new bit stream from given byte array. More... | |
Public Attributes | |
$data = array() | |
Array containing bit data stream. | |
PHP bit stream.
Class implementing array of bits (= 1 or 0 ints). Allows to initialize and append bits from given Integer or array of Bytes.
QRbitstream::allocate | ( | $setLength) |
Allocates bit stream, fills bit data stream with 0's.
This operation is destructive, will replace orginal stream contents!
Integer | $setLength | desired target stream size |
QRbitstream::append | ( | QRbitstream | $arg) |
Appends given bit stream at end of this stream.
QRbitstream | $arg | bit stream to be appended |
QRbitstream::appendBytes | ( | $size, | |
$data | |||
) |
Appends bit stream created from from given byte array at end of current stream.
Integer | $size | size of array |
Array | $data | array ob bytes |
QRbitstream::appendNum | ( | $bits, | |
$num | |||
) |
Appends bit stream cteated from given Integer number at end of current stream.
Integer | $bits | bit count |
Integer | $num | integer to convert |
|
static |
Creates new bit stream from given byte array.
Integer | $size | size of array |
Array | $data | array ob bytes |
|
static |
Creates new bit stream from given Integer number.
Integer | $bits | bit count |
Integer | $num | integer to convert |
QRbitstream::size | ( | ) |
QRbitstream::toByte | ( | ) |
Converts current bit stream into byte array.