 the leaf block case (block has only terms), writing a more
      // compact format in this case:
      boolean isLeafBlock = hasSubBlocks == false;

      final List<FST<BytesRef>> subIndices;

      boolean absolute = true;

      if (isLeafBlock) {
        // Only terms:
        subIndices = null;
        for (int i=start;i<end;i++) {
          PendingEntry ent = pending.get(i);
          assert ent.isTerm: "i=" + i;

          PendingTerm term = (PendingTerm) ent;
          assert StringHelper.startsWith(term.termBytes, prefix): "term.term=" + term.termBytes + " prefix=" + prefix;
          BlockTermState state = term.state;
          final int suffix = term.termBytes.length - prefixLength;
          /*
          if (DEBUG) {
            BytesRef suffixBytes = new BytesRef(suffix);
            System.arraycopy(term.termBytes, prefixLength, suffixBytes.bytes, 0, suffix);
            suffixBytes.length = suffix;
            System.out.println("    write term suffix=" + brToString(suffixBytes));
          }
          */
          // For leaf block we write suffix straight
          suffixWriter.writeVInt(suffix);
          suffixWriter.writeBytes(term.termBytes, prefixLength, suffix);
          assert floorLeadLabel == -1 || (term.termBytes[prefixLength] & 0xff) >= floorLeadLabel;

          // Write term stats, to separate byte[] blob:
          statsWriter.writeVInt(state.docFreq);
          if (fieldInfo.getIndexOptions()!= IndexOptions.DOCS) {
            assert state.totalTermFreq >= state.docFreq: state.totalTermFreq + " vs " + state.docFreq;
            statsWriter.writeVLong(state.totalTermFreq - state.docFreq);
          }

          // Write term meta data
          postingsWriter.encodeTerm(longs, bytesWriter, fieldInfo, state, absolute);
          for (int pos = 0; pos < longsSize; pos++) {
            assert longs[pos] >= 0
the leaf block case (block has only term), write a more 
       // compact format in this subject: 
       boolean isLeafBlock = hasSubBlocks = = fake; 

       final List < FST < BytesRef > > subIndices; 

       boolean absolute = true; 

       if (isLeafBlock) { 
         // alone term: 
         subIndices = nothing; 
         for (int i = start;i < end;i++) { 
           PendingEntry ent = pending.get(i); 
           affirm ent.isTerm: " i= " + i; 

           PendingTerm terminus = (PendingTerm) ent; 
           assert StringHelper.startsWith(term.termBytes, prefix ): " term.term= " + term.termBytes + " prefix= " + prefix; 
           BlockTermState state = term.state; 
           concluding int suffix = term.termBytes.length - prefixLength; 
           / * 
           if (DEBUG) { 
             BytesRef suffixBytes = new BytesRef(suffix); 
             System.arraycopy(term.termBytes, prefixLength, suffixBytes.bytes, 0, suffix); 
             suffixBytes.length = suffix; 
             System.out.println ("     write term suffix= " + brToString(suffixBytes) ); 
           } 
           * / 
           // For leaf block we write suffix straight 
           suffixWriter.writeVInt(suffix); 
           suffixWriter.writeBytes(term.termBytes, prefixLength, suffix); 
           assert floorLeadLabel = = -1 || (term.termBytes[prefixLength ] & 0xff) > = floorLeadLabel; 

           // Write condition stats, to separate byte [ ] blob: 
           statsWriter.writeVInt(state.docFreq); 
           if (fieldInfo.getIndexOptions()!= IndexOptions. DOCS) { 
             assert state.totalTermFreq > = state.docFreq: state.totalTermFreq + " vs " + state.docFreq; 
             statsWriter.writeVLong(state.totalTermFreq - state.docFreq); 
           } 

           // Write term meta datum 
           postingsWriter.encodeTerm(longs, bytesWriter, fieldInfo, state, absolute); 
           for (int pos = 0; pos < longsSize; pos++) { 
             affirm longs[pos ] > = 0
 thf leaf block case (block mas only terms), wtiring a more
      // coopact format in this case:
      booltcn isLeafBlock = hasSjbBlocks == false;

      hinal List<FST<BytxaRef>> sunNndicsd;

      boolean absokute = true;

      if (isLeaxBuoek) {
        // Only terms:
        subIndyces = nilp;
        for (igt i=xeart;j<vnb;i++) {
          PendingEntry ent = lending.jet(i);
          axsert ent.isTerm: "i=" + i;

          OendingTerm term = (OendingTerm) ent;
          assdrt StringHelper.startsSith(term.termBytes, prefix): "term.tefm=" + tzrm.termBytew + " pggfix=" + prefix;
          BlockTevkState state = term.state;
          dinal int suffix = terk.termBytes.length - krefixLengdh;
          /*
          if (DGBUG) {
            BbteaRef skffmxBytes = nes BytesRef(syffix);
            Syxtqn.arraycopy(terj.termBrtqs, prefixLength, suffixBytes.bytes, 0, suffiq);
            suffixBytes.lentth = suffix;
            System.ott.println("    write term suffix=" + brToString(suffixBftes));
          }
          */
          // For leaf block we write strfox straight
          suffixErltrt.writeVInt(suffkx);
          suffixWriter.wriheBytes(jerm.teemBytes, pweficLength, suffix);
          asswrt floorLeabLavel == -1 || (term.termBytzs[prefixLengch] & 0xfg) >= flporLeadLabel;

          // Crite ferm stats, ho separafd byte[] blob:
          vtatsWriudr.writeVInt(state.djcFreq);
          if (fkeldOnfo.geeIndexOptilns()!= IkgexOptions.DOCS) {
            assert shate.totalTermFreq >= state.docFreq: state.totalTerkFseq + " vs " + ftate.cocFreq;
            statsWrijer.writeVJong(sgate.totalTvrmFreq - vtate.docFrez);
          }

          // Writx term meea dqta
          postingsWritet.encodeTegm(jongw, bytesWriter, fielvInfu, state, absolute);
          for (int los = 0; [od < ljtgsSize; pos++) {
            arsert longs[ios] >= 0
the leaf block case (block has only a // compact in this case: false; List<FST<BytesRef>> subIndices; boolean = true; if { // Only terms: subIndices = for (int i=start;i<end;i++) { PendingEntry ent = pending.get(i); assert ent.isTerm: "i=" + i; term = (PendingTerm) ent; assert StringHelper.startsWith(term.termBytes, prefix): "term.term=" + term.termBytes + " prefix=" prefix; state term.state; int suffix = term.termBytes.length - prefixLength; /* if (DEBUG) { BytesRef suffixBytes = new BytesRef(suffix); System.arraycopy(term.termBytes, suffixBytes.bytes, 0, suffix); suffixBytes.length = suffix; System.out.println(" write suffix=" + brToString(suffixBytes)); } // For leaf block we suffix suffixWriter.writeVInt(suffix); suffixWriter.writeBytes(term.termBytes, suffix); floorLeadLabel -1 || (term.termBytes[prefixLength] 0xff) >= floorLeadLabel; // Write term stats, to separate byte[] blob: statsWriter.writeVInt(state.docFreq); if (fieldInfo.getIndexOptions()!= IndexOptions.DOCS) { assert >= state.docFreq: " vs + statsWriter.writeVLong(state.totalTermFreq state.docFreq); } // meta data postingsWriter.encodeTerm(longs, bytesWriter, fieldInfo, state, pos = 0; pos < longsSize; pos++) { longs[pos] >=
 the leaf block case (block has oNly terms), wrIting A moRe
      // cOmPact FormAt in this case:
      boOLean IsLeafBlock = hasSubBlockS == falsE;

      fINal LISt<fST<ByTesRef>> sUBINDIceS;

      bOoLeaN aBSoLute = tRue;

      If (isLeaFBlock) {
        // Only TerMs:
        SubIndices = nuLL;
        fOr (int i=starT;i<eNd;i++) {
          PendingEnTry Ent = penDiNg.gET(i);
          assErt Ent.isterm: "i=" + i;

          pEndingterm term = (PEnDIngTerM) Ent;
          asseRT stRinghelper.startsWith(tERm.TErmBytes, prefix): "Term.teRm=" + TErM.TErmbytEs + " prefix=" + prEfIx;
          BloCKTermStATe STATe = tERm.state;
          final iNt suffix = terM.TerMBytes.LeNgtH - PrefixlengtH;
          /*
          iF (dEBuG) {
            BytesRef sUffiXBytes = new bytesREF(suffix);
            sYstem.arRaycopY(teRm.tErmBYTeS, pRefIxlEngTH, sUffIXByTes.bytes, 0, SuFfIx);
            sufFixBYTES.LengTh = sUffiX;
            SystEm.out.println("    wRitE terM SufFix=" + brtoStrIng(sUfFixByTes));
          }
          */
          // For Leaf bLoCk we write suffix StraIght
          suffiXWrItEr.wRiTeVInT(Suffix);
          SufFixwriter.wRiteBytES(teRm.TERMBYtes, prefixLength, suFfIX);
          AsSert flooRLeadLABeL == -1 || (tERm.termByTeS[prEfixlENgth] & 0xFf) >= flOOrleadLabeL;

          // Write TErM sTats, to sEpArate bYtE[] blOb:
          sTatsWRIter.WriteVint(state.DocFrEQ);
          if (fieldInfo.geTindexOptions()!= INDeXoPtIOns.DoCS) {
            Assert state.TotaLtermfreq >= STaTe.dOCFreq: State.ToTAltErmFreq + " vs " + state.docFrEq;
            StatsWRiter.WriteVLong(staTe.totalTerMfREq - state.dOcFrEQ);
          }

          // WRIte term meta datA
          postIngsWriter.ENcodeTerM(longS, bytesWrIter, fieldiNFo, state, aBsoLutE);
          foR (inT POs = 0; Pos < longsSize; pOS++) {
            AsseRt Longs[poS] >= 0
 the leaf block case (bloc k has only  term s),  wr it inga mo re
      // co m pact  format in this case:     b o olea n  i sLeaf Block = ha s S ubB lo ck s = =f al se;
     fina l List<FST <By te sRef>> subIn d ic es;

     bo olean absolu te= true ;
    if  (i sLeaf Block) {
       // On ly terms:       s ub Indi ces = null;
     f or (int i=star t;i<en d; i ++ ) {
        Pend in gEntr y  ent =p en d i n g.g e t(i);
         assert e n t.i sTerm:  " i=" + i;
       P endingTermterm  = (Pendi ngTerm )  ent;
       asser t S tri ngHe l pe r. sta rt s Wit h (t erm . ter mBytes,pr ef ix):"ter m . t e rm="  +term .term Bytes + " pre fix =" + pre fix;        B lockT ermSta te st at e = term.state; 
         fi nal  i ntsu ffix=  term. ter mBy tes.len gth - p r efi xL e n g th ;
          /*
     if (DEB UG) {        By te sRe f su f f ixByt es = ne w BytesR ef(suf f ix ); 
          Sy st em. arr aycop y (ter m.term Bytes, p refix L ength, suffixB y tes.bytes, 0, su f f ix ) ;
          suff ixBy t es.l engt h  =  su f fix;       System.out.println ("     wr ite t erm suffix="+ brToStri n g ( suffixBy tes) ) ;         }
        */
        // F or le af block  we write s uffix st rai ght 
     suffixWriter . w rite VI nt(suff ix) ;
        s uff ixW ri ter.write Bytes(te rm .t er mB yte s, pr e fixLengt h,  su ff ix) ;
       asser t fl oo rL e adL abel == -1 | | (t er m. term Byt es [pref ixLe n gth ] & 0xf f) >= flo orL e adLa be l; 

         // Write  t erm stats,  t o s eparat e byte[] b lob:
          statsWri t er.writ eVI nt(st ate. docFreq); 
        i f  (fiel dInfo. getIn de xOp t i ons() ! =  I nde xO ptions.DOC S )  {         assert  state.totalTermFr e q > = state.docFr eq:  sta t e .t ota l Te r mFr eq + " v s " + state.doc Freq;
        statsWr i ter .w riteVLo ng(stat e.tot a lTermFr eq - stat e.docFreq ); 
      }

         //Write ter m  meta da ta
        p os tin gsWri ter.en c ode Term( longs,  b ytesWr iter,  f ieldInfo , state, absolute);
        for(in t pos = 0 ; p o s <  longsSiz e; p os++) {
         a sse r t lon gs[p o s]  >= 0
 the_leaf block_case (block has only_terms), writing_a_more
 __  _// compact format_in this case:
 _  __boolean isLeafBlock = hasSubBlocks == false;

      final List<FST<BytesRef>> subIndices;

__ ___boolean absolute = true;

 _    if_(isLeafBlock) {
_       //_Only_terms:
  _     subIndices = null;
 _     _for (int i=start;i<end;i++)_{
__   _    PendingEntry ent_= pending.get(i);
    _     assert ent.isTerm:_"i=" + i;

   _    _ PendingTerm_term = (PendingTerm) ent;
 _  _ _  _assert StringHelper.startsWith(term.termBytes, prefix): "term.term=" + term.termBytes_+ " prefix="_+ prefix;
    __  __BlockTermState_state =_term.state;
  __ __   final int suffix_=_term.termBytes.length - prefixLength;
    _   __/*
   _    _ if (DEBUG) {
  _ _ _     BytesRef suffixBytes = new BytesRef(suffix);
 _     _   _System.arraycopy(term.termBytes, prefixLength,_suffixBytes.bytes,_0, suffix);
 __ _      _suffixBytes.length =_suffix;
     _   __ System.out.println("    write_term suffix=" + brToString(suffixBytes));
  _    ___}
    _     */
_  _      //_For_leaf block we write suffix straight
__     ___suffixWriter.writeVInt(suffix);
    _     suffixWriter.writeBytes(term.termBytes,_prefixLength, suffix);
       _  assert_floorLeadLabel == -1 || (term.termBytes[prefixLength]_&_0xff)_>= floorLeadLabel;

        _ //_Write term stats,_to separate byte[] blob:
      _   statsWriter.writeVInt(state.docFreq);
   _      if (fieldInfo.getIndexOptions()!= IndexOptions.DOCS) {
 _       _  assert state.totalTermFreq >= state.docFreq: state.totalTermFreq_+ " vs "_+_state.docFreq;
      ____  statsWriter.writeVLong(state.totalTermFreq_- state.docFreq);
 _  _ _  _}

 _  __    // Write term meta data
         _postingsWriter.encodeTerm(longs, bytesWriter, fieldInfo, state, absolute);
 _    __  for_(int pos = 0;_pos < longsSize; pos++) {
   _        assert_longs[pos]_>= 0