MCPcopy Create free account
hub / github.com/davidgiven/fluxengine / decode

Function decode

arch/f85/decoder.cc:33–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31}
32
33static Bytes decode(const std::vector<bool>& bits)
34{
35 Bytes output;
36 ByteWriter bw(output);
37 BitWriter bitw(bw);
38
39 auto ii = bits.begin();
40 while (ii != bits.end())
41 {
42 uint8_t inputfifo = 0;
43 for (size_t i = 0; i < 5; i++)
44 {
45 if (ii == bits.end())
46 break;
47 inputfifo = (inputfifo << 1) | *ii++;
48 }
49
50 bitw.push(decode_data_gcr(inputfifo), 4);
51 }
52 bitw.flush();
53
54 return output;
55}
56
57class DurangoF85Decoder : public Decoder
58{

Callers 2

decodeSectorRecordMethod · 0.70
decodeDataRecordMethod · 0.70

Calls 5

flushMethod · 0.80
decode_data_gcrFunction · 0.70
beginMethod · 0.45
endMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected