schropack

schropack —

Synopsis




            SchroPack;
SchroPack*  schro_pack_new                  (void);
void        schro_pack_free                 (SchroPack *pack);
void        schro_pack_encode_init          (SchroPack *pack,
                                             SchroBuffer *buffer);
void        schro_pack_sync                 (SchroPack *pack);
void        schro_pack_append               (SchroPack *pack,
                                             uint8_t *data,
                                             int len);
void        schro_pack_encode_bit           (SchroPack *pack,
                                             int value);
void        schro_pack_encode_bits          (SchroPack *pack,
                                             int n,
                                             unsigned int value);
void        schro_pack_encode_uint          (SchroPack *pack,
                                             int value);
void        schro_pack_encode_sint          (SchroPack *pack,
                                             int value);
void        schro_pack_copy                 (SchroPack *dest,
                                             SchroPack *src);
int         schro_pack_estimate_sint        (int value);
int         schro_pack_estimate_uint        (int value);
void        schro_pack_flush                (SchroPack *pack);
int         schro_pack_get_bit_offset       (SchroPack *pack);
int         schro_pack_get_offset           (SchroPack *pack);
void        schro_pack_append_zero          (SchroPack *pack,
                                             int len);

Description

Details

SchroPack

typedef struct {
  SchroBuffer *buffer;

  int n;
  int shift;
  int n_pack;

  uint32_t value;

  int error;
} SchroPack;


schro_pack_new ()

SchroPack*  schro_pack_new                  (void);

Returns :

schro_pack_free ()

void        schro_pack_free                 (SchroPack *pack);

pack :

schro_pack_encode_init ()

void        schro_pack_encode_init          (SchroPack *pack,
                                             SchroBuffer *buffer);

pack :
buffer :

schro_pack_sync ()

void        schro_pack_sync                 (SchroPack *pack);

pack :

schro_pack_append ()

void        schro_pack_append               (SchroPack *pack,
                                             uint8_t *data,
                                             int len);

pack :
data :
len :

schro_pack_encode_bit ()

void        schro_pack_encode_bit           (SchroPack *pack,
                                             int value);

pack :
value :

schro_pack_encode_bits ()

void        schro_pack_encode_bits          (SchroPack *pack,
                                             int n,
                                             unsigned int value);

pack :
n :
value :

schro_pack_encode_uint ()

void        schro_pack_encode_uint          (SchroPack *pack,
                                             int value);

pack :
value :

schro_pack_encode_sint ()

void        schro_pack_encode_sint          (SchroPack *pack,
                                             int value);

pack :
value :

schro_pack_copy ()

void        schro_pack_copy                 (SchroPack *dest,
                                             SchroPack *src);

dest :
src :

schro_pack_estimate_sint ()

int         schro_pack_estimate_sint        (int value);

value :
Returns :

schro_pack_estimate_uint ()

int         schro_pack_estimate_uint        (int value);

value :
Returns :

schro_pack_flush ()

void        schro_pack_flush                (SchroPack *pack);

pack :

schro_pack_get_bit_offset ()

int         schro_pack_get_bit_offset       (SchroPack *pack);

pack :
Returns :

schro_pack_get_offset ()

int         schro_pack_get_offset           (SchroPack *pack);

pack :
Returns :

schro_pack_append_zero ()

void        schro_pack_append_zero          (SchroPack *pack,
                                             int len);

pack :
len :