vine = tree->tbst_count - leaves;
height = 1 + (leaves > 0);
if (vine > 1)
  {
    unsigned long nonleaves = vine / 2;
    leaves /= 2;
    if (leaves > nonleaves)
      {
        leaves = nonleaves;
        nonleaves = 0;
      }
    else
      nonleaves -= leaves;

    compress ((struct tbst_node *) &tree->tbst_root, leaves, nonleaves);
    vine /= 2;
    height++;
  }
while (vine > 1)
  {
    compress ((struct tbst_node *) &tree->tbst_root, vine / 2, 0);
    vine /= 2;
    height++;
  }
