/* Outputs the code length array for the Extra Set or the Position Set. */
STATIC VOID WritePTLen(IN INT32 Number, IN INT32 nbit, IN INT32 Special)
/* Outputs the code length array for the Extra Set or the Position Set. */
STATIC VOID WritePTLen(IN INT32 Number, IN INT32 nbit, IN INT32 Special)
{
  INT32 Index;
  INT32 Index3;
  while (Number > 0 && mPTLen[Number - 1] == 0) {
    Number--;
  }
  PutBits (nbit, Number);
  Index = 0;
  while (Index < Number) {
    Index3 = mPTLen[Index++];
    if (Index3 <= 6) {
      PutBits (3, Index3);
    } else {
      PutBits (Index3 - 3, (1U << (Index3 - 3)) - 2);
    }
    if (Index == Special) {
      while (Index < 6 && mPTLen[Index] == 0) {
        Index++;
      }
      PutBits (2, (Index - 3) & 3);
    }
  }
}