ur: removes superceded functions: ur_bsr64 and ur_bsr_bytes
@@ -1983,82 +1983,6 @@ ur_bsr_rub_log(ur_bsr_t *bsr, uint8_t *out)
}
}
-static inline uint64_t
-ur_bsr64(ur_bsr_t *bsr, uint8_t len)
-{
- uint64_t acc = 0;
- uint64_t i;
- uint8_t bit;
-
- for ( i = 0; i < len; i++ ) {
- if ( ur_cue_good != ur_bsr_bit(bsr, &bit) ) {
- bsr->bits += len - i;
- return acc;
- }
-
- acc ^= (uint64_t)bit << i;
- }
-
- return acc;
-}
-
-static inline void
-ur_bsr_bytes(ur_bsr_t *bsr, uint64_t len, uint8_t *out)
-{
- uint64_t left = bsr->left;
- uint8_t off = bsr->off;
- ur_bool_t end = len >= left;
-
- if ( !left ) {
- return;
- }
-
- if ( !off ) {
- if ( end ) {
- memcpy(out, bsr->bytes, left);
- bsr->bytes = 0;
- left = 0;
- }
- else {
- memcpy(out, bsr->bytes, len);
- bsr->bytes += len;
- left -= len;
- }
- }
- // the most-significant bits from a byte in the stream
- // become the least-significant bits of an output byte, and vice-versa
- //
- else {
- uint8_t rest = 8 - off;
- const uint8_t *bytes = bsr->bytes;
- uint8_t byt = bytes[0];
- uint8_t l, m;
- uint64_t max = end ? (left - 1) : len;
- uint64_t i;
-
- for ( i = 0; i < max; i++ ) {
- m = byt >> off;
- byt = bytes[1 + i];
- l = byt & ((1 << off) - 1);
- out[i] = m ^ (l << rest);
- }
-
- if ( end ) {
- out[max] = bytes[max] >> off;
-
- bsr->bytes = 0;
- left = 0;
- }
- else {
- bsr->bytes += max;
- left -= max;
- }
- }
-
- bsr->left = left;
- bsr->bits += len << 3;
-}
-
static inline ur_cue_res_e
ur_bsr_mat(ur_bsr_t *bsr, uint64_t *out)
{
