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

Method ReadFilter

Libraries/unrar/unpack50.cpp:173–194  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

171
172
173bool Unpack::ReadFilter(BitInput &Inp,UnpackFilter &Filter)
174{
175 if (!Inp.ExternalBuffer && Inp.InAddr>ReadTop-16)
176 if (!UnpReadBuf())
177 return false;
178
179 Filter.BlockStart=ReadFilterData(Inp);
180 Filter.BlockLength=ReadFilterData(Inp);
181 if (Filter.BlockLength>MAX_FILTER_BLOCK_SIZE)
182 Filter.BlockLength=0;
183
184 Filter.Type=Inp.fgetbits()>>13;
185 Inp.faddbits(3);
186
187 if (Filter.Type==FILTER_DELTA)
188 {
189 Filter.Channels=(Inp.fgetbits()>>11)+1;
190 Inp.faddbits(5);
191 }
192
193 return true;
194}
195
196
197bool Unpack::AddFilter(UnpackFilter &Filter)

Callers

nothing calls this directly

Calls 2

fgetbitsMethod · 0.80
faddbitsMethod · 0.80

Tested by

no test coverage detected