BitReader
Object Hierarchy:
Description:
[ CCode ( cname = "GstBitReader" , free_function = "gst_bit_reader_free" , has_type_id = false ) ]
[ Compact ]
[ GIR ( name = "BitReader" ) ]
public class BitReader
BitReader provides a bit reader that can read any number of bits from a memory buffer.
It provides functions for reading any number of bits into 8, 16, 32 and 64 bit variables.
Content:
Creation methods:
Methods:
- public void free ()
Frees a BitReader instance, which was
previously allocated by BitReader.
- public bool get_bits_uint16 (out uint16 val, uint nbits)
Read nbits
bits into val
and update the
current position.
- public bool get_bits_uint32 (out uint32 val, uint nbits)
Read nbits
bits into val
and update the
current position.
- public bool get_bits_uint64 (out uint64 val, uint nbits)
Read nbits
bits into val
and update the
current position.
- public bool get_bits_uint8 (out uint8 val, uint nbits)
Read nbits
bits into val
and update the
current position.
- public uint get_pos ()
Returns the current position of a BitReader
instance in bits.
- public uint get_remaining ()
Returns the remaining number of bits of a
BitReader instance.
- public uint get_size ()
Returns the total number of bits of a BitReader
instance.
- public void init (uint8[] data)
Initializes a BitReader instance to read
from data
.
- public bool peek_bits_uint16 (out uint16 val, uint nbits)
Read nbits
bits into val
but keep the
current position.
- public bool peek_bits_uint32 (out uint32 val, uint nbits)
Read nbits
bits into val
but keep the
current position.
- public bool peek_bits_uint64 (out uint64 val, uint nbits)
Read nbits
bits into val
but keep the
current position.
- public bool peek_bits_uint8 (out uint8 val, uint nbits)
Read nbits
bits into val
but keep the
current position.
- public bool set_pos (uint pos)
Sets the new position of a BitReader
instance to pos
in bits.
- public bool skip (uint nbits)
Skips nbits
bits of the BitReader
instance.
- public bool skip_to_byte ()
Skips until the next byte.
Fields:
- public uint bit
- public uint byte
- public unowned uint8[] data
- public uint size