function send_all_trees(s, lcodes, dcodes, blcodes)
	//    deflate_state *s;
	//    int lcodes, dcodes, blcodes; /* number of codes for each tree */
	{
	  var rank;                    /* index in bl_order */
	
	  //Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes");
	  //Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES,
	  //        "too many codes");
	  //Tracev((stderr, "\nbl counts: "));
	  send_bits(s, lcodes-257, 5); /* not +255 as stated in appnote.txt */
	  send_bits(s, dcodes-1,   5);
	  send_bits(s, blcodes-4,  4); /* not -3 as stated in appnote.txt */
	  for (rank = 0; rank < blcodes; rank++) {
	    //Tracev((stderr, "\nbl code %2d ", bl_order[rank]));
	    send_bits(s, s.bl_tree[bl_order[rank]*2 + 1]/*.Len*/, 3);
	  }
	  //Tracev((stderr, "\nbl tree: sent %ld", s->bits_sent));
	
	  send_tree(s, s.dyn_ltree, lcodes-1); /* literal tree */
	  //Tracev((stderr, "\nlit tree: sent %ld", s->bits_sent));
	
	  send_tree(s, s.dyn_dtree, dcodes-1); /* distance tree */
	  //Tracev((stderr, "\ndist tree: sent %ld", s->bits_sent));
	}
/* ===========================================================================
	 * Send the header for a block using dynamic Huffman trees: the counts, the
	 * lengths of the bit length codes, the literal tree and the distance tree.
	 * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.
	 */
Send the header for a block using dynamic Huffman trees: the counts, the
lengths of the bit length codes, the literal tree and the distance tree.
IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.
Send the header for a block using dynamic Huffman trees : the counts the lengths of the bit length codes the literal tree and the distance tree . IN assertion : lcodes > = 257 dcodes > = 1 blcodes > = 4 .
function send_all_trees(s, lcodes, dcodes, blcodes)
	{
	  var rank;                    
	  send_bits(s, lcodes-257, 5); 
	  send_bits(s, dcodes-1,   5);
	  send_bits(s, blcodes-4,  4); 
	  for (rank = 0; rank < blcodes; rank++) {
	    send_bits(s, s.bl_tree[bl_order[rank]*2 + 1], 3);
	  }
	  send_tree(s, s.dyn_ltree, lcodes-1); 
	  send_tree(s, s.dyn_dtree, dcodes-1); 
	}
function send_all_trees ( s , lcodes , dcodes , blcodes ) { var rank ; send_bits ( s , lcodes - 257 , 5 ) ; send_bits ( s , dcodes - 1 , 5 ) ; send_bits ( s , blcodes - 4 , 4 ) ; for ( rank = 0 ; rank < blcodes ; rank ++ ) { send_bits ( s , s . bl_tree [ bl_order [ rank ] * 2 + 1 ] , 3 ) ; } send_tree ( s , s . dyn_ltree , lcodes - 1 ) ; send_tree ( s , s . dyn_dtree , dcodes - 1 ) ; }
Send the header for a block using dynamic Huffman trees: the counts, the
 lengths of the bit length codes, the literal tree and the distance tree.
Send the header for a block using dynamic Huffman trees : the counts the lengths of the bit length codes the literal tree and the distance tree .
//    deflate_state *s; //    int lcodes, dcodes, blcodes; /* number of codes for each tree */ /* index in bl_order */ //Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes"); //Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES, //        "too many codes"); //Tracev((stderr, "\nbl counts: ")); /* not +255 as stated in appnote.txt */ /* not -3 as stated in appnote.txt */ //Tracev((stderr, "\nbl code %2d ", bl_order[rank])); /*.Len*/ //Tracev((stderr, "\nbl tree: sent %ld", s->bits_sent)); /* literal tree */ //Tracev((stderr, "\nlit tree: sent %ld", s->bits_sent)); /* distance tree */ //Tracev((stderr, "\ndist tree: sent %ld", s->bits_sent));