MCPcopy Create free account
hub / github.com/CloverHackyColor/CloverBootloader / GetBits

Function GetBits

BaseTools/Source/C/Common/Decompress.c:115–147  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113}
114
115STATIC
116UINT32
117GetBits (
118 IN SCRATCH_DATA *Sd,
119 IN UINT16 NumOfBits
120 )
121/*++
122
123Routine Description:
124
125 Get NumOfBits of bits out from mBitBuf. Fill mBitBuf with subsequent
126 NumOfBits of bits from source. Returns NumOfBits of bits that are
127 popped out.
128
129Arguments:
130
131 Sd - The global scratch data.
132 NumOfBits - The number of bits to pop and read.
133
134Returns:
135
136 The bits that are popped out.
137
138--*/
139{
140 UINT32 OutBits;
141
142 OutBits = (UINT32) (Sd->mBitBuf >> (BITBUFSIZ - NumOfBits));
143
144 FillBuf (Sd, NumOfBits);
145
146 return OutBits;
147}
148
149STATIC
150UINT16

Callers 5

DecodePFunction · 0.70
ReadPTLenFunction · 0.70
ReadCLenFunction · 0.70
DecodeCFunction · 0.70
TianoCompress.cFile · 0.50

Calls 1

FillBufFunction · 0.70

Tested by

no test coverage detected