comparison FastBitDecoder.hpp @ 64:b9515dc35fe4

Make sure no file has greater linewidth than 80.
author Tom Fredrik Blenning Klaussen <bfg@blenning.no>
date Fri, 14 Sep 2012 22:50:45 +0200
parents c8111de2e0bb
children
comparison
equal deleted inserted replaced
63:dd086ec3220d 64:b9515dc35fe4
10 static const size_t N = 256; 10 static const size_t N = 256;
11 FastBitDecoder* decoder[N]; 11 FastBitDecoder* decoder[N];
12 unsigned char numBits[N]; 12 unsigned char numBits[N];
13 QString* data[N]; 13 QString* data[N];
14 14
15 static unsigned char getPaddedChar(const BitArray& bitArray, uint offset = 0); 15 static unsigned char getPaddedChar(const BitArray& bitArray,
16 uint offset = 0);
16 static BitArray removeFirst(const BitArray& bits); 17 static BitArray removeFirst(const BitArray& bits);
17 18
18 void fill(); 19 void fill();
19 void blank(); 20 void blank();
20 FastBitDecoder(); 21 FastBitDecoder();
31 { 32 {
32 QString combined; 33 QString combined;
33 uint n = bits.size(); 34 uint n = bits.size();
34 //Just a qualified overestimate guess on what we will need. 35 //Just a qualified overestimate guess on what we will need.
35 combined.reserve(n/4); 36 combined.reserve(n/4);
36 for (uint decodedBits = 0; decodedBits < n; decodedBits += decode(combined, bits, decodedBits)); 37 for (uint decodedBits = 0; decodedBits < n;
38 decodedBits += decode(combined, bits, decodedBits));
37 combined.squeeze(); 39 combined.squeeze();
38 return combined; 40 return combined;
39 } 41 }
40 42
41 43