Example #1
0
 internal PackedWriter(PackedInts.Format format, DataOutput @out, int valueCount, int bitsPerValue, int mem)
     : base(@out, valueCount, bitsPerValue)
 {
     this.Format_Renamed = format;
     Encoder = BulkOperation.Of(format, bitsPerValue);
     Iterations = Encoder.ComputeIterations(valueCount, mem);
     NextBlocks = new byte[Iterations * Encoder.ByteBlockCount()];
     NextValues = new long[Iterations * Encoder.ByteValueCount()];
     Off = 0;
     Written = 0;
     Finished = false;
 }
 internal PackedReaderIterator(PackedInts.Format format, int packedIntsVersion, int valueCount, int bitsPerValue, DataInput @in, int mem)
     : base(valueCount, bitsPerValue, @in)
 {
     this.Format = format;
     this.PackedIntsVersion = packedIntsVersion;
     BulkOperation = BulkOperation.Of(format, bitsPerValue);
     Iterations_Renamed = Iterations(mem);
     Debug.Assert(valueCount == 0 || Iterations_Renamed > 0);
     NextBlocks = new byte[Iterations_Renamed * BulkOperation.ByteBlockCount()];
     NextValues = new LongsRef(new long[Iterations_Renamed * BulkOperation.ByteValueCount()], 0, 0);
     NextValues.Offset = NextValues.Longs.Length;
     Position = -1;
 }