MCPcopy Create free account
hub / github.com/KLayout/klayout / decode

Method decode

src/tl/tl/tlDeflate.cc:183–198  ·  view source on GitHub ↗

* @brief Decode the next value from a bit stream * * This method takes the next value from the bit stream decoding the bits with * the code tree currently loaded. */

Source from the content-addressed store, hash-verified

181 * the code tree currently loaded.
182 */
183 unsigned short decode (BitStream &s) const
184 {
185 tl_assert (mp_codes != 0);
186
187 unsigned int m = m_num_codes / 2;
188
189 unsigned int c = 0;
190 do {
191 if (s.get_bit ()) {
192 c |= m;
193 }
194 m >>= 1;
195 } while ((mp_bitmasks [c] & m) != 0);
196
197 return mp_codes [c];
198 }
199
200private:
201 unsigned short *mp_codes, *mp_bitmasks;

Callers 7

libpng_cflagsFunction · 0.45
libpng_ldflagsFunction · 0.45
MakeTargetDMGFileFunction · 0.45
str_from_bytearrayMethod · 0.45
MakeTargetDMGFileFunction · 0.45
decodeFunction · 0.45
processMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected