Examples of writeLongGamma()


Examples of it.unimi.dsi.io.OutputBitStream.writeLongGamma()

          else index.write( baps.buffer, bitLength );

          frequencies.writeGamma( frequency );
          globCounts.writeLongGamma( baps.globCount );
          offsets.writeLongGamma( index.writtenBits() - prevOffset );
          posNumBits.writeLongGamma( baps.posNumBits );
          prevOffset = index.writtenBits();
        }

        totPostings += postings;
View Full Code Here

Examples of it.unimi.dsi.io.OutputBitStream.writeLongGamma()

    for( int i = 0; i < index.numberOfTerms; i++ ) {
      ibs.position( pos += offsets.readLongGamma() );
      // Read offset into position file
      o = ibs.readLongDelta();

      if ( i > 0 ) numBitsPos.writeLongGamma( o - positionOffset );
      positionOffset = o;
    }

    // This is necessarily imprecise
    numBitsPos.writeLongGamma( new File( basename + DiskBasedIndex.POSITIONS_EXTENSION ).length() * 8 - positionOffset );
View Full Code Here

Examples of it.unimi.dsi.io.OutputBitStream.writeLongGamma()

      if ( i > 0 ) numBitsPos.writeLongGamma( o - positionOffset );
      positionOffset = o;
    }

    // This is necessarily imprecise
    numBitsPos.writeLongGamma( new File( basename + DiskBasedIndex.POSITIONS_EXTENSION ).length() * 8 - positionOffset );

    numBitsPos.close();
    offsets.close();
    ibs.close()
  }
View Full Code Here

Examples of it.unimi.dsi.io.OutputBitStream.writeLongGamma()

    byte[] array = new byte[ offsets.size() * 4 ];
    OutputBitStream streamer = new OutputBitStream( array );
    long previous = 0;
    for ( int i = 0; i < offsets.size(); i++ ) {
      final long value = offsets.getLong( i );
      streamer.writeLongGamma( value - previous );
      previous = value;
    }
    int size = (int)( streamer.writtenBits() / 8 ) + ( ( streamer.writtenBits() % 8 ) == 0 ? 0 : 1 );
    byte[] smaller = new byte[ size ];
    System.arraycopy( array, 0, smaller, 0, size );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.