MCPcopy Create free account
hub / github.com/abbeycode/UnrarKit / SlotToLength

Method SlotToLength

Libraries/unrar/unpackinline.cpp:127–147  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

125
126
127_forceinline uint Unpack::SlotToLength(BitInput &Inp,uint Slot)
128{
129 uint LBits,Length=2;
130 if (Slot<8)
131 {
132 LBits=0;
133 Length+=Slot;
134 }
135 else
136 {
137 LBits=Slot/4-1;
138 Length+=(4 | (Slot & 3)) << LBits;
139 }
140
141 if (LBits>0)
142 {
143 Length+=Inp.getbits()>>(16-LBits);
144 Inp.addbits(LBits);
145 }
146 return Length;
147}

Callers

nothing calls this directly

Calls 2

getbitsMethod · 0.80
addbitsMethod · 0.80

Tested by

no test coverage detected