int build_bl_tree(){ int max_blindex; // index of last bit length code of non zero freq // Determine the bit length frequencies for literal and distance trees scan_tree(dyn_ltree, l_desc.max_code); scan_tree(dyn_dtree, d_desc.max_code); // Build the bit length tree: bl_desc.build_tree(this); // opt_len now includes the length of the tree representations, except // the lengths of the bit lengths codes and the 5+5+4 bits for the counts. // Determine the number of bit length codes to send. The pkzip format // requires that at least 4 bit length codes be sent. (appnote.txt says // 3 but the actual value used is 4.) for (max_blindex = BL_CODES-1; max_blindex >= 3; max_blindex--) { if (bl_tree[Tree.bl_order[max_blindex]*2+1] != 0) break; } // Update opt_len to include the bit length tree and counts opt_len += 3*(max_blindex+1) + 5+5+4; return max_blindex; }
int build_bl_tree(){ int max_blindex; // index of last bit length code of non zero freq // Determine the bit length frequencies for literal and distance trees scan_tree(dyn_ltree, l_desc.max_code); scan_tree(dyn_dtree, d_desc.max_code); // Build the bit length tree: bl_desc.build_tree(this); // opt_len now includes the length of the tree representations, except // the lengths of the bit lengths codes and the 5+5+4 bits for the counts. // Determine the number of bit length codes to send. The pkzip format // requires that at least 4 bit length codes be sent. (appnote.txt says // 3 but the actual value used is 4.) for (max_blindex = BL_CODES-1; max_blindex >= 3; max_blindex--) { if (bl_tree[Tree.bl_order[max_blindex]*2+1] != 0) break; } // Update opt_len to include the bit length tree and counts opt_len += 3*(max_blindex+1) + 5+5+4; return max_blindex; }
int build_bl_tree(){ int max_blindex; // index of last bit length code of non zero freq // Determine the bit length frequencies for literal and distance trees scan_tree(dyn_ltree, l_desc.max_code); scan_tree(dyn_dtree, d_desc.max_code); // Build the bit length tree: bl_desc.build_tree(this); // opt_len now includes the length of the tree representations, except // the lengths of the bit lengths codes and the 5+5+4 bits for the counts. // Determine the number of bit length codes to send. The pkzip format // requires that at least 4 bit length codes be sent. (appnote.txt says // 3 but the actual value used is 4.) for (max_blindex = BL_CODES-1; max_blindex >= 3; max_blindex--) { if (bl_tree[Tree.bl_order[max_blindex]*2+1] != 0) break; } // Update opt_len to include the bit length tree and counts opt_len += 3*(max_blindex+1) + 5+5+4; return max_blindex; }
int build_bl_tree(){ int max_blindex; // index of last bit length code of non zero freq // Determine the bit length frequencies for literal and distance trees scan_tree(dyn_ltree, l_desc.max_code); scan_tree(dyn_dtree, d_desc.max_code); // Build the bit length tree: bl_desc.build_tree(this); // opt_len now includes the length of the tree representations, except // the lengths of the bit lengths codes and the 5+5+4 bits for the counts. // Determine the number of bit length codes to send. The pkzip format // requires that at least 4 bit length codes be sent. (appnote.txt says // 3 but the actual value used is 4.) for (max_blindex = BL_CODES-1; max_blindex >= 3; max_blindex--) { if (bl_tree[Tree.bl_order[max_blindex]*2+1] != 0) break; } // Update opt_len to include the bit length tree and counts opt_len += 3*(max_blindex+1) + 5+5+4; return max_blindex; }
int build_bl_tree(){ int max_blindex; // index of last bit length code of non zero freq // Determine the bit length frequencies for literal and distance trees scan_tree(dyn_ltree, l_desc.max_code); scan_tree(dyn_dtree, d_desc.max_code); // Build the bit length tree: bl_desc.build_tree(this); // opt_len now includes the length of the tree representations, except // the lengths of the bit lengths codes and the 5+5+4 bits for the counts. // Determine the number of bit length codes to send. The pkzip format // requires that at least 4 bit length codes be sent. (appnote.txt says // 3 but the actual value used is 4.) for (max_blindex = BL_CODES-1; max_blindex >= 3; max_blindex--) { if (bl_tree[Tree.bl_order[max_blindex]*2+1] != 0) break; } // Update opt_len to include the bit length tree and counts opt_len += 3*(max_blindex+1) + 5+5+4; return max_blindex; }
int build_bl_tree(){ int max_blindex; // index of last bit length code of non zero freq // Determine the bit length frequencies for literal and distance trees scan_tree(dyn_ltree, l_desc.max_code); scan_tree(dyn_dtree, d_desc.max_code); // Build the bit length tree: bl_desc.build_tree(this); // opt_len now includes the length of the tree representations, except // the lengths of the bit lengths codes and the 5+5+4 bits for the counts. // Determine the number of bit length codes to send. The pkzip format // requires that at least 4 bit length codes be sent. (appnote.txt says // 3 but the actual value used is 4.) for (max_blindex = BL_CODES-1; max_blindex >= 3; max_blindex--) { if (bl_tree[Tree.bl_order[max_blindex]*2+1] != 0) break; } // Update opt_len to include the bit length tree and counts opt_len += 3*(max_blindex+1) + 5+5+4; return max_blindex; }
l_desc.build_tree(this); d_desc.build_tree(this);
l_desc.build_tree(this); d_desc.build_tree(this);
l_desc.build_tree(this); d_desc.build_tree(this);
l_desc.build_tree(this); d_desc.build_tree(this);
l_desc.build_tree(this); d_desc.build_tree(this);
l_desc.build_tree(this); d_desc.build_tree(this);