libosmocore
0.9.3.20160317
Osmocom core library
|
Osmocom bit compression routines. More...
#include <stdint.h>
#include <stdbool.h>
#include <errno.h>
#include <string.h>
#include <osmocom/core/bitvec.h>
#include <osmocom/core/bitcomp.h>
Enumerations | |
enum | dec_state { EXPECT_TERM, TOO_LONG, NEED_MORE_BITS, CORRUPT, OK } |
Functions | |
static int | t4_rle_term (unsigned w, bool b, unsigned bits) |
Attempt to decode compressed bit vector. More... | |
static int | t4_rle_makeup (unsigned w, bool b, unsigned bits) |
static int | t4_rle (struct bitvec *bv, unsigned len, bool b) |
Make-up codes for a given length. More... | |
static enum dec_state | _t4_step (struct bitvec *v, uint16_t w, bool b, unsigned bits, bool term_only) |
int | osmo_t4_decode (const struct bitvec *in, bool cc, struct bitvec *out) |
decode T4-encoded bit vector Assumes MSB first encoding. More... | |
int | osmo_t4_encode (struct bitvec *bv) |
encode bit vector in-place using T4 encoding Assumes MSB first encoding. More... | |
Osmocom bit compression routines.