• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/amule/libcryptoxx-5.6.0/

Lines Matching +defs:code +defs:string

16 		{return lhs < rhs.code;}
19 {return lhs.code < rhs.code;}
57 inline HuffmanDecoder::code_t HuffmanDecoder::NormalizeCode(HuffmanDecoder::code_t code, unsigned int codeBits)
59 return code << (MAX_CODE_BITS - codeBits);
64 // the Huffman codes are represented in 3 ways in this code:
66 // 1. most significant code bit (i.e. top of code tree) in the least significant bit position
67 // 2. most significant code bit (i.e. top of code tree) in the most significant bit position
68 // 3. most significant code bit (i.e. top of code tree) in n-th least significant bit position,
69 // where n is the maximum code length for this code tree
73 // (3) is used in this function to compute codes from code lengths
75 // a code in representation (2) is called "normalized" here
80 throw Err("null code");
85 throw Err("code length exceeds maximum");
88 throw Err("null code");
97 // compute the starting code of each length
98 code_t code = 0;
103 // compute this while checking for overflow: code = (code + blCount[i-1]) << 1
104 if (code > code + blCount[i-1])
106 code += blCount[i-1];
107 if (code > (code << 1))
109 code <<= 1;
110 nextCode[i] = code;
113 if (code > (1 << m_maxCodeBits) - blCount[m_maxCodeBits])
115 else if (m_maxCodeBits != 1 && code < (1 << m_maxCodeBits) - blCount[m_maxCodeBits])
118 // compute a vector of <code, length, value> triples sorted by code
126 code = NormalizeCode(nextCode[len]++, len);
127 m_codeToValue[j].code = code;
175 inline unsigned int HuffmanDecoder::Decode(code_t code, /* out */ value_t &value) const
178 LookupEntry &entry = m_cache[code & m_cacheMask];
182 normalizedCode = BitReverse(code);
241 void Inflator::OutputString(const byte *string, size_t length)
246 memcpy(m_window + m_current, string, len);
255 string += len;
394 static const unsigned int border[] = { // Order of the bit length code lengths
445 if (hlit != 0) // a single zero distance code length means all literals