A template for various bit operations on the given data type T. More...
Public Member Functions | |
| BitBlock (void) | |
| Initialise the block. | |
| int | chunkSize (void) |
| Return the size of the chunk in bits. | |
| bool | firstBit (void) |
| Return the status of the most significant bit in the chunk. | |
| void | shiftInZero (void) |
| Shifts the chunk bit to the left and inserts a zero at the least significant bit. | |
| void | shiftInOne (void) |
| Shifts the chunk bit to the left and inserts a one at the least significant bit. | |
| bool | full (void) |
| Returns true if all bits of the chunk contain data. | |
| bool | empty (void) |
| Returns true if no bits of the chunk contain data. | |
| void | load (T data) |
| Copies a given chunk into the templates chunk. | |
| T | purge (void) |
| Returns and resets the chunk. | |
| void | padBlock (void) |
| Sets all bits not containing information to zero. | |
| void | zeroBlock (void) |
| Sets all chunk bits to zero. | |
| virtual void | refreshBlock (void)=0 |
| Reset the block back to an initial condition. | |
| int | blockByteAlign (void) |
| Sets the next bit to be inserted at a byte aligned bit and returns the number of bytes remaining in chunk. | |
A template for various bit operations on the given data type T.
This class allows the user to define a block type and perform bit manipulations that are necessary for coding and compression.
1.6.1