Lines Matching refs:bitlen
631 static unsigned HuffmanTree_makeFromLengths(HuffmanTree* tree, const unsigned* bitlen, in HuffmanTree_makeFromLengths() argument
637 for(i = 0; i < numcodes; i++) tree->lengths[i] = bitlen[i]; in HuffmanTree_makeFromLengths()
866 unsigned* bitlen = (unsigned*)lodepng_malloc(NUM_DEFLATE_CODE_SYMBOLS * sizeof(unsigned)); in generateFixedLitLenTree() local
867 if(!bitlen) return 83; /*alloc fail*/ in generateFixedLitLenTree()
870 for(i = 0; i <= 143; i++) bitlen[i] = 8; in generateFixedLitLenTree()
871 for(i = 144; i <= 255; i++) bitlen[i] = 9; in generateFixedLitLenTree()
872 for(i = 256; i <= 279; i++) bitlen[i] = 7; in generateFixedLitLenTree()
873 for(i = 280; i <= 287; i++) bitlen[i] = 8; in generateFixedLitLenTree()
875 error = HuffmanTree_makeFromLengths(tree, bitlen, NUM_DEFLATE_CODE_SYMBOLS, 15); in generateFixedLitLenTree()
877 lodepng_free(bitlen); in generateFixedLitLenTree()
885 unsigned* bitlen = (unsigned*)lodepng_malloc(NUM_DISTANCE_SYMBOLS * sizeof(unsigned)); in generateFixedDistanceTree() local
886 if(!bitlen) return 83; /*alloc fail*/ in generateFixedDistanceTree()
889 for(i = 0; i < NUM_DISTANCE_SYMBOLS; i++) bitlen[i] = 5; in generateFixedDistanceTree()
890 error = HuffmanTree_makeFromLengths(tree, bitlen, NUM_DISTANCE_SYMBOLS, 15); in generateFixedDistanceTree()
892 lodepng_free(bitlen); in generateFixedDistanceTree()
1288 static void addHuffmanSymbol(size_t* bp, ucvector* compressed, unsigned code, unsigned bitlen) in addHuffmanSymbol() argument
1290 addBitsToStreamReversed(bp, compressed, code, bitlen); in addHuffmanSymbol()