Functions | |
| int | bitio_i_open (void *buf, size_t size) |
| This function opens a bitstream for input. | |
| int | bitio_i_input (int handle, unsigned long *val, int nbits) |
| This function reads a value from a bitstream. | |
| void | bitio_i_close (int handle) |
| Closes an bitstream that was opened for input. | |
| int | bitio_o_open () |
| Opens a bitstream for output. | |
| long | bitio_o_append (int handle, unsigned long val, int nbits) |
| This function appends a value to a bitstream. | |
| void | bitio_o_outp (int handle, unsigned long val, int nbits, long bitpos) |
| This function outputs a value to a specified position of a bitstream. | |
| size_t | bitio_o_get_size (int handle) |
| Returns the size of an output-bitstream (number of bytes). | |
| void * | bitio_o_close (int handle, size_t *nbytes) |
| This function closes an output-bitstream. | |
| int bitio_i_open | ( | void * | buf, | |
| size_t | size | |||
| ) |
This function opens a bitstream for input.
| [in] | buf | Buffer to be used for input |
| [in] | size | Size of buffer. |
| int bitio_i_input | ( | int | handle, | |
| unsigned long * | val, | |||
| int | nbits | |||
| ) |
This function reads a value from a bitstream. The bitstream must have been opened by bitio_i_open.
| [in] | handle | Identifies the bitstream. |
| [out] | val | Is where the input-value is stored. |
| [in] | nbits | Number of bits the value consists of. |
| void bitio_i_close | ( | int | handle | ) |
Closes an bitstream that was opened for input
| [in] | handle | Handle that identifies the bitstream. |
| int bitio_o_open | ( | ) |
| long bitio_o_append | ( | int | handle, | |
| unsigned long | val, | |||
| int | nbits | |||
| ) |
This function appends a value to a bitstream which was opened by bitio_o_open.
| [in] | handle | Indicates the bitstream for appending. |
| [in] | val | Value to be output. |
| [in] | nbits | Number of bits of val to be output to the stream. |
nbits must be less than sizeof (long)| void bitio_o_outp | ( | int | handle, | |
| unsigned long | val, | |||
| int | nbits, | |||
| long | bitpos | |||
| ) |
This function outputs a value to a specified position of a bitstream.
| [in] | handle | Indicates the bitstream for output. |
| [in] | val | Value to be output. |
| [in] | nbits | Number of bits of val to be output to the stream. |
| [in] | bitpos | bitposition of the value in the bitstream. |
nbits must be less then sizeof (long)| size_t bitio_o_get_size | ( | int | handle | ) |
This function returns the size of an output-bitstream (number of bytes)
| [in] | handle | Identifies the bitstream |
| void* bitio_o_close | ( | int | handle, | |
| size_t * | nbytes | |||
| ) |
This function closes an output-bitstream identified by handle and returns a pointer to the memory-area holding the bitstream.
| [in] | handle | Bit-stream-handle |
| [out] | nbytes | number of bytes in the bitstream. |
1.5.4