lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [09/53] [abbrv] lucenenet git commit: Lucene.Net.Core: Renamed all type-derived properties and methods from Short, Int, Long, and Float to match CLR types Int16, Int32, Int64, and Single, respectively.
Date Wed, 08 Feb 2017 14:31:48 GMT
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Core/Codecs/Lucene41/Lucene41PostingsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/Lucene41/Lucene41PostingsReader.cs b/src/Lucene.Net.Core/Codecs/Lucene41/Lucene41PostingsReader.cs
index c2f137b..d32ec16 100644
--- a/src/Lucene.Net.Core/Codecs/Lucene41/Lucene41PostingsReader.cs
+++ b/src/Lucene.Net.Core/Codecs/Lucene41/Lucene41PostingsReader.cs
@@ -85,7 +85,7 @@ namespace Lucene.Net.Codecs.Lucene41
         {
             // Make sure we are talking to the matching postings writer
             CodecUtil.CheckHeader(termsIn, Lucene41PostingsWriter.TERMS_CODEC, Lucene41PostingsWriter.VERSION_START, Lucene41PostingsWriter.VERSION_CURRENT);
-            int indexBlockSize = termsIn.ReadVInt();
+            int indexBlockSize = termsIn.ReadVInt32();
             if (indexBlockSize != Lucene41PostingsFormat.BLOCK_SIZE)
             {
                 throw new InvalidOperationException("index-time BLOCK_SIZE (" + indexBlockSize + ") != read-time BLOCK_SIZE (" + Lucene41PostingsFormat.BLOCK_SIZE + ")");
@@ -94,14 +94,16 @@ namespace Lucene.Net.Codecs.Lucene41
 
         /// <summary>
         /// Read values that have been written using variable-length encoding instead of bit-packing.
+        /// <para/>
+        /// NOTE: This was readVIntBlock() in Lucene
         /// </summary>
-        internal static void ReadVIntBlock(IndexInput docIn, int[] docBuffer, int[] freqBuffer, int num, bool indexHasFreq)
+        internal static void ReadVInt32Block(IndexInput docIn, int[] docBuffer, int[] freqBuffer, int num, bool indexHasFreq)
         {
             if (indexHasFreq)
             {
                 for (int i = 0; i < num; i++)
                 {
-                    int code = docIn.ReadVInt();
+                    int code = docIn.ReadVInt32();
                     docBuffer[i] = (int)((uint)code >> 1);
                     if ((code & 1) != 0)
                     {
@@ -109,7 +111,7 @@ namespace Lucene.Net.Codecs.Lucene41
                     }
                     else
                     {
-                        freqBuffer[i] = docIn.ReadVInt();
+                        freqBuffer[i] = docIn.ReadVInt32();
                     }
                 }
             }
@@ -117,7 +119,7 @@ namespace Lucene.Net.Codecs.Lucene41
             {
                 for (int i = 0; i < num; i++)
                 {
-                    docBuffer[i] = docIn.ReadVInt();
+                    docBuffer[i] = docIn.ReadVInt32();
                 }
             }
         }
@@ -162,7 +164,7 @@ namespace Lucene.Net.Codecs.Lucene41
             }
             if (termState2.DocFreq == 1)
             {
-                termState2.singletonDocID = @in.ReadVInt();
+                termState2.singletonDocID = @in.ReadVInt32();
             }
             else
             {
@@ -172,7 +174,7 @@ namespace Lucene.Net.Codecs.Lucene41
             {
                 if (termState2.TotalTermFreq > Lucene41PostingsFormat.BLOCK_SIZE)
                 {
-                    termState2.lastPosBlockOffset = @in.ReadVLong();
+                    termState2.lastPosBlockOffset = @in.ReadVInt64();
                 }
                 else
                 {
@@ -181,7 +183,7 @@ namespace Lucene.Net.Codecs.Lucene41
             }
             if (termState2.DocFreq > Lucene41PostingsFormat.BLOCK_SIZE)
             {
-                termState2.skipOffset = @in.ReadVLong();
+                termState2.skipOffset = @in.ReadVInt64();
             }
             else
             {
@@ -196,19 +198,19 @@ namespace Lucene.Net.Codecs.Lucene41
             bool fieldHasPayloads = fieldInfo.HasPayloads;
             if (termState.DocFreq == 1)
             {
-                termState.singletonDocID = @in.ReadVInt();
+                termState.singletonDocID = @in.ReadVInt32();
             }
             else
             {
                 termState.singletonDocID = -1;
-                termState.docStartFP += @in.ReadVLong();
+                termState.docStartFP += @in.ReadVInt64();
             }
             if (fieldHasPositions)
             {
-                termState.posStartFP += @in.ReadVLong();
+                termState.posStartFP += @in.ReadVInt64();
                 if (termState.TotalTermFreq > Lucene41PostingsFormat.BLOCK_SIZE)
                 {
-                    termState.lastPosBlockOffset = @in.ReadVLong();
+                    termState.lastPosBlockOffset = @in.ReadVInt64();
                 }
                 else
                 {
@@ -216,12 +218,12 @@ namespace Lucene.Net.Codecs.Lucene41
                 }
                 if ((fieldHasPayloads || fieldHasOffsets) && termState.TotalTermFreq >= Lucene41PostingsFormat.BLOCK_SIZE)
                 {
-                    termState.payStartFP += @in.ReadVLong();
+                    termState.payStartFP += @in.ReadVInt64();
                 }
             }
             if (termState.DocFreq > Lucene41PostingsFormat.BLOCK_SIZE)
             {
-                termState.skipOffset = @in.ReadVLong();
+                termState.skipOffset = @in.ReadVInt64();
             }
             else
             {
@@ -436,7 +438,7 @@ namespace Lucene.Net.Codecs.Lucene41
                     // if (DEBUG) {
                     //   System.out.println("    fill last vInt block from fp=" + docIn.getFilePointer());
                     // }
-                    ReadVIntBlock(docIn, docDeltaBuffer, freqBuffer, left, indexHasFreq);
+                    ReadVInt32Block(docIn, docDeltaBuffer, freqBuffer, left, indexHasFreq);
                 }
                 docBufferUpto = 0;
             }
@@ -758,7 +760,7 @@ namespace Lucene.Net.Codecs.Lucene41
                     // if (DEBUG) {
                     //   System.out.println("    fill last vInt doc block from fp=" + docIn.getFilePointer());
                     // }
-                    ReadVIntBlock(docIn, docDeltaBuffer, freqBuffer, left, true);
+                    ReadVInt32Block(docIn, docDeltaBuffer, freqBuffer, left, true);
                 }
                 docBufferUpto = 0;
             }
@@ -777,12 +779,12 @@ namespace Lucene.Net.Codecs.Lucene41
                     int payloadLength = 0;
                     for (int i = 0; i < count; i++)
                     {
-                        int code = posIn.ReadVInt();
+                        int code = posIn.ReadVInt32();
                         if (indexHasPayloads)
                         {
                             if ((code & 1) != 0)
                             {
-                                payloadLength = posIn.ReadVInt();
+                                payloadLength = posIn.ReadVInt32();
                             }
                             posDeltaBuffer[i] = (int)((uint)code >> 1);
                             if (payloadLength != 0)
@@ -796,10 +798,10 @@ namespace Lucene.Net.Codecs.Lucene41
                         }
                         if (indexHasOffsets)
                         {
-                            if ((posIn.ReadVInt() & 1) != 0)
+                            if ((posIn.ReadVInt32() & 1) != 0)
                             {
                                 // offset length changed
-                                posIn.ReadVInt();
+                                posIn.ReadVInt32();
                             }
                         }
                     }
@@ -1272,7 +1274,7 @@ namespace Lucene.Net.Codecs.Lucene41
                     // if (DEBUG) {
                     //   System.out.println("    fill last vInt doc block from fp=" + docIn.getFilePointer());
                     // }
-                    ReadVIntBlock(docIn, docDeltaBuffer, freqBuffer, left, true);
+                    ReadVInt32Block(docIn, docDeltaBuffer, freqBuffer, left, true);
                 }
                 docBufferUpto = 0;
             }
@@ -1293,12 +1295,12 @@ namespace Lucene.Net.Codecs.Lucene41
                     payloadByteUpto = 0;
                     for (int i = 0; i < count; i++)
                     {
-                        int code = posIn.ReadVInt();
+                        int code = posIn.ReadVInt32();
                         if (indexHasPayloads)
                         {
                             if ((code & 1) != 0)
                             {
-                                payloadLength = posIn.ReadVInt();
+                                payloadLength = posIn.ReadVInt32();
                             }
                             // if (DEBUG) {
                             //   System.out.println("        i=" + i + " payloadLen=" + payloadLength);
@@ -1326,10 +1328,10 @@ namespace Lucene.Net.Codecs.Lucene41
                             // if (DEBUG) {
                             //   System.out.println("        i=" + i + " read offsets from posIn.fp=" + posIn.getFilePointer());
                             // }
-                            int deltaCode = posIn.ReadVInt();
+                            int deltaCode = posIn.ReadVInt32();
                             if ((deltaCode & 1) != 0)
                             {
-                                offsetLength = posIn.ReadVInt();
+                                offsetLength = posIn.ReadVInt32();
                             }
                             offsetStartDeltaBuffer[i] = (int)((uint)deltaCode >> 1);
                             offsetLengthBuffer[i] = offsetLength;
@@ -1355,7 +1357,7 @@ namespace Lucene.Net.Codecs.Lucene41
                         if (needsPayloads)
                         {
                             outerInstance.forUtil.ReadBlock(payIn, encoded, payloadLengthBuffer);
-                            int numBytes = payIn.ReadVInt();
+                            int numBytes = payIn.ReadVInt32();
                             // if (DEBUG) {
                             //   System.out.println("        " + numBytes + " payload bytes @ pay.fp=" + payIn.getFilePointer());
                             // }
@@ -1369,7 +1371,7 @@ namespace Lucene.Net.Codecs.Lucene41
                         {
                             // this works, because when writing a vint block we always force the first length to be written
                             outerInstance.forUtil.SkipBlock(payIn); // skip over lengths
-                            int numBytes = payIn.ReadVInt(); // read length of payloadBytes
+                            int numBytes = payIn.ReadVInt32(); // read length of payloadBytes
                             payIn.Seek(payIn.FilePointer + numBytes); // skip over payloadBytes
                         }
                         payloadByteUpto = 0;
@@ -1590,7 +1592,7 @@ namespace Lucene.Net.Codecs.Lucene41
                             outerInstance.forUtil.SkipBlock(payIn);
 
                             // Skip payloadBytes block:
-                            int numBytes = payIn.ReadVInt();
+                            int numBytes = payIn.ReadVInt32();
                             payIn.Seek(payIn.FilePointer + numBytes);
                         }
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Core/Codecs/Lucene41/Lucene41PostingsWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/Lucene41/Lucene41PostingsWriter.cs b/src/Lucene.Net.Core/Codecs/Lucene41/Lucene41PostingsWriter.cs
index af77eb9..68abbed 100644
--- a/src/Lucene.Net.Core/Codecs/Lucene41/Lucene41PostingsWriter.cs
+++ b/src/Lucene.Net.Core/Codecs/Lucene41/Lucene41PostingsWriter.cs
@@ -238,7 +238,7 @@ namespace Lucene.Net.Codecs.Lucene41
         public override void Init(IndexOutput termsOut)
         {
             CodecUtil.WriteHeader(termsOut, TERMS_CODEC, VERSION_CURRENT);
-            termsOut.WriteVInt(Lucene41PostingsFormat.BLOCK_SIZE);
+            termsOut.WriteVInt32(Lucene41PostingsFormat.BLOCK_SIZE);
         }
 
         public override int SetField(FieldInfo fieldInfo)
@@ -391,7 +391,7 @@ namespace Lucene.Net.Codecs.Lucene41
                 if (fieldHasPayloads)
                 {
                     forUtil.WriteBlock(payloadLengthBuffer, encoded, payOut);
-                    payOut.WriteVInt(payloadByteUpto);
+                    payOut.WriteVInt32(payloadByteUpto);
                     payOut.WriteBytes(payloadBytes, 0, payloadByteUpto);
                     payloadByteUpto = 0;
                 }
@@ -467,16 +467,16 @@ namespace Lucene.Net.Codecs.Lucene41
                     int freq = freqBuffer[i];
                     if (!fieldHasFreqs)
                     {
-                        docOut.WriteVInt(docDelta);
+                        docOut.WriteVInt32(docDelta);
                     }
                     else if (freqBuffer[i] == 1)
                     {
-                        docOut.WriteVInt((docDelta << 1) | 1);
+                        docOut.WriteVInt32((docDelta << 1) | 1);
                     }
                     else
                     {
-                        docOut.WriteVInt(docDelta << 1);
-                        docOut.WriteVInt(freq);
+                        docOut.WriteVInt32(docDelta << 1);
+                        docOut.WriteVInt32(freq);
                     }
                 }
             }
@@ -523,12 +523,12 @@ namespace Lucene.Net.Codecs.Lucene41
                             if (payloadLength != lastPayloadLength)
                             {
                                 lastPayloadLength = payloadLength;
-                                posOut.WriteVInt((posDelta << 1) | 1);
-                                posOut.WriteVInt(payloadLength);
+                                posOut.WriteVInt32((posDelta << 1) | 1);
+                                posOut.WriteVInt32(payloadLength);
                             }
                             else
                             {
-                                posOut.WriteVInt(posDelta << 1);
+                                posOut.WriteVInt32(posDelta << 1);
                             }
 
                             // if (DEBUG) {
@@ -546,7 +546,7 @@ namespace Lucene.Net.Codecs.Lucene41
                         }
                         else
                         {
-                            posOut.WriteVInt(posDelta);
+                            posOut.WriteVInt32(posDelta);
                         }
 
                         if (fieldHasOffsets)
@@ -558,12 +558,12 @@ namespace Lucene.Net.Codecs.Lucene41
                             int length = offsetLengthBuffer[i];
                             if (length == lastOffsetLength)
                             {
-                                posOut.WriteVInt(delta << 1);
+                                posOut.WriteVInt32(delta << 1);
                             }
                             else
                             {
-                                posOut.WriteVInt(delta << 1 | 1);
-                                posOut.WriteVInt(length);
+                                posOut.WriteVInt32(delta << 1 | 1);
+                                posOut.WriteVInt32(length);
                                 lastOffsetLength = length;
                             }
                         }
@@ -633,18 +633,18 @@ namespace Lucene.Net.Codecs.Lucene41
             }
             if (state2.singletonDocID != -1)
             {
-                @out.WriteVInt(state2.singletonDocID);
+                @out.WriteVInt32(state2.singletonDocID);
             }
             if (fieldHasPositions)
             {
                 if (state2.lastPosBlockOffset != -1)
                 {
-                    @out.WriteVLong(state2.lastPosBlockOffset);
+                    @out.WriteVInt64(state2.lastPosBlockOffset);
                 }
             }
             if (state2.skipOffset != -1)
             {
-                @out.WriteVLong(state2.skipOffset);
+                @out.WriteVInt64(state2.skipOffset);
             }
             lastState = state2;
         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Core/Codecs/Lucene41/Lucene41SkipReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/Lucene41/Lucene41SkipReader.cs b/src/Lucene.Net.Core/Codecs/Lucene41/Lucene41SkipReader.cs
index 264f746..675777e 100644
--- a/src/Lucene.Net.Core/Codecs/Lucene41/Lucene41SkipReader.cs
+++ b/src/Lucene.Net.Core/Codecs/Lucene41/Lucene41SkipReader.cs
@@ -239,34 +239,34 @@ namespace Lucene.Net.Codecs.Lucene41
             // if (DEBUG) {
             //   System.out.println("readSkipData level=" + level);
             // }
-            int delta = skipStream.ReadVInt();
+            int delta = skipStream.ReadVInt32();
             // if (DEBUG) {
             //   System.out.println("  delta=" + delta);
             // }
-            docPointer[level] += skipStream.ReadVInt();
+            docPointer[level] += skipStream.ReadVInt32();
             // if (DEBUG) {
             //   System.out.println("  docFP=" + docPointer[level]);
             // }
 
             if (posPointer != null)
             {
-                posPointer[level] += skipStream.ReadVInt();
+                posPointer[level] += skipStream.ReadVInt32();
                 // if (DEBUG) {
                 //   System.out.println("  posFP=" + posPointer[level]);
                 // }
-                posBufferUpto[level] = skipStream.ReadVInt();
+                posBufferUpto[level] = skipStream.ReadVInt32();
                 // if (DEBUG) {
                 //   System.out.println("  posBufferUpto=" + posBufferUpto[level]);
                 // }
 
                 if (payloadByteUpto != null)
                 {
-                    payloadByteUpto[level] = skipStream.ReadVInt();
+                    payloadByteUpto[level] = skipStream.ReadVInt32();
                 }
 
                 if (payPointer != null)
                 {
-                    payPointer[level] += skipStream.ReadVInt();
+                    payPointer[level] += skipStream.ReadVInt32();
                 }
             }
             return delta;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Core/Codecs/Lucene41/Lucene41SkipWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/Lucene41/Lucene41SkipWriter.cs b/src/Lucene.Net.Core/Codecs/Lucene41/Lucene41SkipWriter.cs
index ae9eafe..c8bebc6 100644
--- a/src/Lucene.Net.Core/Codecs/Lucene41/Lucene41SkipWriter.cs
+++ b/src/Lucene.Net.Core/Codecs/Lucene41/Lucene41SkipWriter.cs
@@ -131,10 +131,10 @@ namespace Lucene.Net.Codecs.Lucene41
             // if (DEBUG) {
             //   System.out.println("writeSkipData level=" + level + " lastDoc=" + curDoc + " delta=" + delta + " curDocPointer=" + curDocPointer);
             // }
-            skipBuffer.WriteVInt(delta);
+            skipBuffer.WriteVInt32(delta);
             lastSkipDoc[level] = curDoc;
 
-            skipBuffer.WriteVInt((int)(curDocPointer - lastSkipDocPointer[level]));
+            skipBuffer.WriteVInt32((int)(curDocPointer - lastSkipDocPointer[level]));
             lastSkipDocPointer[level] = curDocPointer;
 
             if (fieldHasPositions)
@@ -142,18 +142,18 @@ namespace Lucene.Net.Codecs.Lucene41
                 // if (DEBUG) {
                 //   System.out.println("  curPosPointer=" + curPosPointer + " curPosBufferUpto=" + curPosBufferUpto);
                 // }
-                skipBuffer.WriteVInt((int)(curPosPointer - lastSkipPosPointer[level]));
+                skipBuffer.WriteVInt32((int)(curPosPointer - lastSkipPosPointer[level]));
                 lastSkipPosPointer[level] = curPosPointer;
-                skipBuffer.WriteVInt(curPosBufferUpto);
+                skipBuffer.WriteVInt32(curPosBufferUpto);
 
                 if (fieldHasPayloads)
                 {
-                    skipBuffer.WriteVInt(curPayloadByteUpto);
+                    skipBuffer.WriteVInt32(curPayloadByteUpto);
                 }
 
                 if (fieldHasOffsets || fieldHasPayloads)
                 {
-                    skipBuffer.WriteVInt((int)(curPayPointer - lastSkipPayPointer[level]));
+                    skipBuffer.WriteVInt32((int)(curPayPointer - lastSkipPayPointer[level]));
                     lastSkipPayPointer[level] = curPayPointer;
                 }
             }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Core/Codecs/Lucene42/Lucene42DocValuesProducer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/Lucene42/Lucene42DocValuesProducer.cs b/src/Lucene.Net.Core/Codecs/Lucene42/Lucene42DocValuesProducer.cs
index 0f81a18..a6b1ed0 100644
--- a/src/Lucene.Net.Core/Codecs/Lucene42/Lucene42DocValuesProducer.cs
+++ b/src/Lucene.Net.Core/Codecs/Lucene42/Lucene42DocValuesProducer.cs
@@ -155,7 +155,7 @@ namespace Lucene.Net.Codecs.Lucene42
 
         private void ReadFields(IndexInput meta, FieldInfos infos)
         {
-            int fieldNumber = meta.ReadVInt();
+            int fieldNumber = meta.ReadVInt32();
             while (fieldNumber != -1)
             {
                 // check should be: infos.fieldInfo(fieldNumber) != null, which incorporates negative check
@@ -169,7 +169,7 @@ namespace Lucene.Net.Codecs.Lucene42
                 int fieldType = meta.ReadByte();
                 if (fieldType == NUMBER)
                 {
-                    var entry = new NumericEntry {Offset = meta.ReadLong(), Format = (sbyte)meta.ReadByte()};
+                    var entry = new NumericEntry {Offset = meta.ReadInt64(), Format = (sbyte)meta.ReadByte()};
                     switch (entry.Format)
                     {
                         case DELTA_COMPRESSED:
@@ -183,36 +183,36 @@ namespace Lucene.Net.Codecs.Lucene42
                     }
                     if (entry.Format != UNCOMPRESSED)
                     {
-                        entry.PackedIntsVersion = meta.ReadVInt();
+                        entry.PackedInt32sVersion = meta.ReadVInt32();
                     }
                     numerics[fieldNumber] = entry;
                 }
                 else if (fieldType == BYTES)
                 {
                     BinaryEntry entry = new BinaryEntry();
-                    entry.Offset = meta.ReadLong();
-                    entry.NumBytes = meta.ReadLong();
-                    entry.MinLength = meta.ReadVInt();
-                    entry.MaxLength = meta.ReadVInt();
+                    entry.Offset = meta.ReadInt64();
+                    entry.NumBytes = meta.ReadInt64();
+                    entry.MinLength = meta.ReadVInt32();
+                    entry.MaxLength = meta.ReadVInt32();
                     if (entry.MinLength != entry.MaxLength)
                     {
-                        entry.PackedIntsVersion = meta.ReadVInt();
-                        entry.BlockSize = meta.ReadVInt();
+                        entry.PackedInt32sVersion = meta.ReadVInt32();
+                        entry.BlockSize = meta.ReadVInt32();
                     }
                     binaries[fieldNumber] = entry;
                 }
                 else if (fieldType == FST)
                 {
                     FSTEntry entry = new FSTEntry();
-                    entry.Offset = meta.ReadLong();
-                    entry.NumOrds = meta.ReadVLong();
+                    entry.Offset = meta.ReadInt64();
+                    entry.NumOrds = meta.ReadVInt64();
                     fsts[fieldNumber] = entry;
                 }
                 else
                 {
                     throw new CorruptIndexException("invalid entry type: " + fieldType + ", input=" + meta);
                 }
-                fieldNumber = meta.ReadVInt();
+                fieldNumber = meta.ReadVInt32();
             }
         }
 
@@ -251,7 +251,7 @@ namespace Lucene.Net.Codecs.Lucene42
             switch (entry.Format)
             {
                 case TABLE_COMPRESSED:
-                    int size = data.ReadVInt();
+                    int size = data.ReadVInt32();
                     if (size > 256)
                     {
                         throw new CorruptIndexException("TABLE_COMPRESSED cannot have more than 256 distinct values, input=" + data);
@@ -259,17 +259,17 @@ namespace Lucene.Net.Codecs.Lucene42
                     var decode = new long[size];
                     for (int i = 0; i < decode.Length; i++)
                     {
-                        decode[i] = data.ReadLong();
+                        decode[i] = data.ReadInt64();
                     }
-                    int formatID = data.ReadVInt();
-                    int bitsPerValue = data.ReadVInt();
-                    PackedInts.Reader ordsReader = PackedInts.GetReaderNoHeader(data, PackedInts.Format.ById(formatID), entry.PackedIntsVersion, maxDoc, bitsPerValue);
+                    int formatID = data.ReadVInt32();
+                    int bitsPerValue = data.ReadVInt32();
+                    PackedInts.Reader ordsReader = PackedInts.GetReaderNoHeader(data, PackedInts.Format.ById(formatID), entry.PackedInt32sVersion, maxDoc, bitsPerValue);
                     ramBytesUsed.AddAndGet(RamUsageEstimator.SizeOf(decode) + ordsReader.RamBytesUsed());
                     return new NumericDocValuesAnonymousInnerClassHelper(decode, ordsReader);
 
                 case DELTA_COMPRESSED:
-                    int blockSize = data.ReadVInt();
-                    var reader = new BlockPackedReader(data, entry.PackedIntsVersion, blockSize, maxDoc, false);
+                    int blockSize = data.ReadVInt32();
+                    var reader = new BlockPackedReader(data, entry.PackedInt32sVersion, blockSize, maxDoc, false);
                     ramBytesUsed.AddAndGet(reader.RamBytesUsed());
                     return reader;
 
@@ -280,10 +280,10 @@ namespace Lucene.Net.Codecs.Lucene42
                     return new NumericDocValuesAnonymousInnerClassHelper2(this, bytes);
 
                 case GCD_COMPRESSED:
-                    long min = data.ReadLong();
-                    long mult = data.ReadLong();
-                    int quotientBlockSize = data.ReadVInt();
-                    BlockPackedReader quotientReader = new BlockPackedReader(data, entry.PackedIntsVersion, quotientBlockSize, maxDoc, false);
+                    long min = data.ReadInt64();
+                    long mult = data.ReadInt64();
+                    int quotientBlockSize = data.ReadVInt32();
+                    BlockPackedReader quotientReader = new BlockPackedReader(data, entry.PackedInt32sVersion, quotientBlockSize, maxDoc, false);
                     ramBytesUsed.AddAndGet(quotientReader.RamBytesUsed());
                     return new NumericDocValuesAnonymousInnerClassHelper3(min, mult, quotientReader);
 
@@ -372,7 +372,7 @@ namespace Lucene.Net.Codecs.Lucene42
             }
             else
             {
-                MonotonicBlockPackedReader addresses = new MonotonicBlockPackedReader(data, entry.PackedIntsVersion, entry.BlockSize, maxDoc, false);
+                MonotonicBlockPackedReader addresses = new MonotonicBlockPackedReader(data, entry.PackedInt32sVersion, entry.BlockSize, maxDoc, false);
                 ramBytesUsed.AddAndGet(bytes.RamBytesUsed() + addresses.RamBytesUsed());
                 return new BinaryDocValuesAnonymousInnerClassHelper2(bytesReader, addresses);
             }
@@ -594,7 +594,7 @@ namespace Lucene.Net.Codecs.Lucene42
                 }
                 else
                 {
-                    currentOrd += input.ReadVLong();
+                    currentOrd += input.ReadVInt64();
                     return currentOrd;
                 }
             }
@@ -686,7 +686,11 @@ namespace Lucene.Net.Codecs.Lucene42
         {
             internal long Offset { get; set; }
             internal sbyte Format { get; set; }
-            internal int PackedIntsVersion { get; set; }
+
+            /// <summary>
+            /// NOTE: This was packedIntsVersion (field) in Lucene
+            /// </summary>
+            internal int PackedInt32sVersion { get; set; }
         }
 
         internal class BinaryEntry
@@ -695,7 +699,11 @@ namespace Lucene.Net.Codecs.Lucene42
             internal long NumBytes { get; set; }
             internal int MinLength { get; set; }
             internal int MaxLength { get; set; }
-            internal int PackedIntsVersion { get; set; }
+
+            /// <summary>
+            /// NOTE: This was packedIntsVersion (field) in Lucene
+            /// </summary>
+            internal int PackedInt32sVersion { get; set; }
             internal int BlockSize { get; set; }
         }
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Core/Codecs/Lucene42/Lucene42FieldInfosReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/Lucene42/Lucene42FieldInfosReader.cs b/src/Lucene.Net.Core/Codecs/Lucene42/Lucene42FieldInfosReader.cs
index 2b5e14a..b663a87 100644
--- a/src/Lucene.Net.Core/Codecs/Lucene42/Lucene42FieldInfosReader.cs
+++ b/src/Lucene.Net.Core/Codecs/Lucene42/Lucene42FieldInfosReader.cs
@@ -57,13 +57,13 @@ namespace Lucene.Net.Codecs.Lucene42
             {
                 CodecUtil.CheckHeader(input, Lucene42FieldInfosFormat.CODEC_NAME, Lucene42FieldInfosFormat.FORMAT_START, Lucene42FieldInfosFormat.FORMAT_CURRENT);
 
-                int size = input.ReadVInt(); //read in the size
+                int size = input.ReadVInt32(); //read in the size
                 FieldInfo[] infos = new FieldInfo[size];
 
                 for (int i = 0; i < size; i++)
                 {
                     string name = input.ReadString();
-                    int fieldNumber = input.ReadVInt();
+                    int fieldNumber = input.ReadVInt32();
                     byte bits = input.ReadByte();
                     bool isIndexed = (bits & Lucene42FieldInfosFormat.IS_INDEXED) != 0;
                     bool storeTermVector = (bits & Lucene42FieldInfosFormat.STORE_TERMVECTOR) != 0;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Core/Codecs/Lucene42/Lucene42NormsConsumer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/Lucene42/Lucene42NormsConsumer.cs b/src/Lucene.Net.Core/Codecs/Lucene42/Lucene42NormsConsumer.cs
index 531ecbc..55697a3 100644
--- a/src/Lucene.Net.Core/Codecs/Lucene42/Lucene42NormsConsumer.cs
+++ b/src/Lucene.Net.Core/Codecs/Lucene42/Lucene42NormsConsumer.cs
@@ -77,9 +77,9 @@ namespace Lucene.Net.Codecs.Lucene42
 
         public override void AddNumericField(FieldInfo field, IEnumerable<long?> values)
         {
-            meta.WriteVInt(field.Number);
+            meta.WriteVInt32(field.Number);
             meta.WriteByte((byte)NUMBER);
-            meta.WriteLong(data.FilePointer);
+            meta.WriteInt64(data.FilePointer);
             long minValue = long.MaxValue;
             long maxValue = long.MinValue;
             long gcd = 0;
@@ -147,16 +147,16 @@ namespace Lucene.Net.Codecs.Lucene42
                     meta.WriteByte((byte)TABLE_COMPRESSED); // table-compressed
                     var decode = uniqueValues.ToArray();
                     var encode = new Dictionary<long, int>();
-                    data.WriteVInt(decode.Length);
+                    data.WriteVInt32(decode.Length);
                     for (int i = 0; i < decode.Length; i++)
                     {
-                        data.WriteLong(decode[i]);
+                        data.WriteInt64(decode[i]);
                         encode[decode[i]] = i;
                     }
 
-                    meta.WriteVInt(PackedInts.VERSION_CURRENT);
-                    data.WriteVInt(formatAndBits.Format.Id);
-                    data.WriteVInt(formatAndBits.BitsPerValue);
+                    meta.WriteVInt32(PackedInts.VERSION_CURRENT);
+                    data.WriteVInt32(formatAndBits.Format.Id);
+                    data.WriteVInt32(formatAndBits.BitsPerValue);
 
                     PackedInts.Writer writer = PackedInts.GetWriterNoHeader(data, formatAndBits.Format, maxDoc, formatAndBits.BitsPerValue, PackedInts.DEFAULT_BUFFER_SIZE);
                     foreach (long? nv in values)
@@ -169,10 +169,10 @@ namespace Lucene.Net.Codecs.Lucene42
             else if (gcd != 0 && gcd != 1)
             {
                 meta.WriteByte((byte)GCD_COMPRESSED);
-                meta.WriteVInt(PackedInts.VERSION_CURRENT);
-                data.WriteLong(minValue);
-                data.WriteLong(gcd);
-                data.WriteVInt(BLOCK_SIZE);
+                meta.WriteVInt32(PackedInts.VERSION_CURRENT);
+                data.WriteInt64(minValue);
+                data.WriteInt64(gcd);
+                data.WriteVInt32(BLOCK_SIZE);
 
                 var writer = new BlockPackedWriter(data, BLOCK_SIZE);
                 foreach (long? nv in values)
@@ -186,8 +186,8 @@ namespace Lucene.Net.Codecs.Lucene42
             {
                 meta.WriteByte((byte)DELTA_COMPRESSED); // delta-compressed
 
-                meta.WriteVInt(PackedInts.VERSION_CURRENT);
-                data.WriteVInt(BLOCK_SIZE);
+                meta.WriteVInt32(PackedInts.VERSION_CURRENT);
+                data.WriteVInt32(BLOCK_SIZE);
 
                 var writer = new BlockPackedWriter(data, BLOCK_SIZE);
                 foreach (long? nv in values)
@@ -207,7 +207,7 @@ namespace Lucene.Net.Codecs.Lucene42
                 {
                     if (meta != null)
                     {
-                        meta.WriteVInt(-1); // write EOF marker
+                        meta.WriteVInt32(-1); // write EOF marker
                         CodecUtil.WriteFooter(meta); // write checksum
                     }
                     if (data != null)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Core/Codecs/Lucene45/Lucene45DocValuesConsumer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/Lucene45/Lucene45DocValuesConsumer.cs b/src/Lucene.Net.Core/Codecs/Lucene45/Lucene45DocValuesConsumer.cs
index 5ae2379..ef643b8 100644
--- a/src/Lucene.Net.Core/Codecs/Lucene45/Lucene45DocValuesConsumer.cs
+++ b/src/Lucene.Net.Core/Codecs/Lucene45/Lucene45DocValuesConsumer.cs
@@ -195,28 +195,28 @@ namespace Lucene.Net.Codecs.Lucene45
             {
                 format = DELTA_COMPRESSED;
             }
-            meta.WriteVInt(field.Number);
+            meta.WriteVInt32(field.Number);
             meta.WriteByte((byte)Lucene45DocValuesFormat.NUMERIC);
-            meta.WriteVInt(format);
+            meta.WriteVInt32(format);
             if (missing)
             {
-                meta.WriteLong(data.FilePointer);
+                meta.WriteInt64(data.FilePointer);
                 WriteMissingBitset(values);
             }
             else
             {
-                meta.WriteLong(-1L);
+                meta.WriteInt64(-1L);
             }
-            meta.WriteVInt(PackedInts.VERSION_CURRENT);
-            meta.WriteLong(data.FilePointer);
-            meta.WriteVLong(count);
-            meta.WriteVInt(BLOCK_SIZE);
+            meta.WriteVInt32(PackedInts.VERSION_CURRENT);
+            meta.WriteInt64(data.FilePointer);
+            meta.WriteVInt64(count);
+            meta.WriteVInt32(BLOCK_SIZE);
 
             switch (format)
             {
                 case GCD_COMPRESSED:
-                    meta.WriteLong(minValue);
-                    meta.WriteLong(gcd);
+                    meta.WriteInt64(minValue);
+                    meta.WriteInt64(gcd);
                     BlockPackedWriter quotientWriter = new BlockPackedWriter(data, BLOCK_SIZE);
                     foreach (long? nv in values)
                     {
@@ -240,10 +240,10 @@ namespace Lucene.Net.Codecs.Lucene45
                     long[] decode = new long[uniqueValues.Count];
                     uniqueValues.CopyTo(decode, 0);
                     Dictionary<long, int> encode = new Dictionary<long, int>();
-                    meta.WriteVInt(decode.Length);
+                    meta.WriteVInt32(decode.Length);
                     for (int i = 0; i < decode.Length; i++)
                     {
-                        meta.WriteLong(decode[i]);
+                        meta.WriteInt64(decode[i]);
                         encode[decode[i]] = i;
                     }
                     int bitsRequired = PackedInts.BitsRequired(uniqueValues.Count - 1);
@@ -289,7 +289,7 @@ namespace Lucene.Net.Codecs.Lucene45
         public override void AddBinaryField(FieldInfo field, IEnumerable<BytesRef> values)
         {
             // write the byte[] data
-            meta.WriteVInt(field.Number);
+            meta.WriteVInt32(field.Number);
             meta.WriteByte((byte)Lucene45DocValuesFormat.BINARY);
             int minLength = int.MaxValue;
             int maxLength = int.MinValue;
@@ -316,28 +316,28 @@ namespace Lucene.Net.Codecs.Lucene45
                 }
                 count++;
             }
-            meta.WriteVInt(minLength == maxLength ? BINARY_FIXED_UNCOMPRESSED : BINARY_VARIABLE_UNCOMPRESSED);
+            meta.WriteVInt32(minLength == maxLength ? BINARY_FIXED_UNCOMPRESSED : BINARY_VARIABLE_UNCOMPRESSED);
             if (missing)
             {
-                meta.WriteLong(data.FilePointer);
+                meta.WriteInt64(data.FilePointer);
                 WriteMissingBitset(values);
             }
             else
             {
-                meta.WriteLong(-1L);
+                meta.WriteInt64(-1L);
             }
-            meta.WriteVInt(minLength);
-            meta.WriteVInt(maxLength);
-            meta.WriteVLong(count);
-            meta.WriteLong(startFP);
+            meta.WriteVInt32(minLength);
+            meta.WriteVInt32(maxLength);
+            meta.WriteVInt64(count);
+            meta.WriteInt64(startFP);
 
             // if minLength == maxLength, its a fixed-length byte[], we are done (the addresses are implicit)
             // otherwise, we need to record the length fields...
             if (minLength != maxLength)
             {
-                meta.WriteLong(data.FilePointer);
-                meta.WriteVInt(PackedInts.VERSION_CURRENT);
-                meta.WriteVInt(BLOCK_SIZE);
+                meta.WriteInt64(data.FilePointer);
+                meta.WriteVInt32(PackedInts.VERSION_CURRENT);
+                meta.WriteVInt32(BLOCK_SIZE);
 
                 MonotonicBlockPackedWriter writer = new MonotonicBlockPackedWriter(data, BLOCK_SIZE);
                 long addr = 0;
@@ -373,10 +373,10 @@ namespace Lucene.Net.Codecs.Lucene45
             else
             {
                 // header
-                meta.WriteVInt(field.Number);
+                meta.WriteVInt32(field.Number);
                 meta.WriteByte((byte)Lucene45DocValuesFormat.BINARY);
-                meta.WriteVInt(BINARY_PREFIX_COMPRESSED);
-                meta.WriteLong(-1L);
+                meta.WriteVInt32(BINARY_PREFIX_COMPRESSED);
+                meta.WriteInt64(-1L);
                 // now write the bytes: sharing prefixes within a block
                 long startFP = data.FilePointer;
                 // currently, we have to store the delta from expected for every 1/nth term
@@ -396,8 +396,8 @@ namespace Lucene.Net.Codecs.Lucene45
 
                     // prefix-code
                     int sharedPrefix = StringHelper.BytesDifference(lastTerm, v);
-                    data.WriteVInt(sharedPrefix);
-                    data.WriteVInt(v.Length - sharedPrefix);
+                    data.WriteVInt32(sharedPrefix);
+                    data.WriteVInt32(v.Length - sharedPrefix);
                     data.WriteBytes(v.Bytes, v.Offset + sharedPrefix, v.Length - sharedPrefix);
                     lastTerm.CopyBytes(v);
                     count++;
@@ -408,20 +408,20 @@ namespace Lucene.Net.Codecs.Lucene45
                 addressBuffer.WriteTo(data);
                 addressBuffer = null;
                 termAddresses = null;
-                meta.WriteVInt(minLength);
-                meta.WriteVInt(maxLength);
-                meta.WriteVLong(count);
-                meta.WriteLong(startFP);
-                meta.WriteVInt(ADDRESS_INTERVAL);
-                meta.WriteLong(indexStartFP);
-                meta.WriteVInt(PackedInts.VERSION_CURRENT);
-                meta.WriteVInt(BLOCK_SIZE);
+                meta.WriteVInt32(minLength);
+                meta.WriteVInt32(maxLength);
+                meta.WriteVInt64(count);
+                meta.WriteInt64(startFP);
+                meta.WriteVInt32(ADDRESS_INTERVAL);
+                meta.WriteInt64(indexStartFP);
+                meta.WriteVInt32(PackedInts.VERSION_CURRENT);
+                meta.WriteVInt32(BLOCK_SIZE);
             }
         }
 
         public override void AddSortedField(FieldInfo field, IEnumerable<BytesRef> values, IEnumerable<long?> docToOrd)
         {
-            meta.WriteVInt(field.Number);
+            meta.WriteVInt32(field.Number);
             meta.WriteByte((byte)Lucene45DocValuesFormat.SORTED);
             AddTermsDict(field, values);
             AddNumericField(field, docToOrd, false);
@@ -434,18 +434,18 @@ namespace Lucene.Net.Codecs.Lucene45
 
         public override void AddSortedSetField(FieldInfo field, IEnumerable<BytesRef> values, IEnumerable<long?> docToOrdCount, IEnumerable<long?> ords)
         {
-            meta.WriteVInt(field.Number);
+            meta.WriteVInt32(field.Number);
             meta.WriteByte((byte)Lucene45DocValuesFormat.SORTED_SET);
 
             if (IsSingleValued(docToOrdCount))
             {
-                meta.WriteVInt(SORTED_SET_SINGLE_VALUED_SORTED);
+                meta.WriteVInt32(SORTED_SET_SINGLE_VALUED_SORTED);
                 // The field is single-valued, we can encode it as SORTED
                 AddSortedField(field, values, GetSortedSetEnumerable(docToOrdCount, ords));
                 return;
             }
 
-            meta.WriteVInt(SORTED_SET_WITH_ADDRESSES);
+            meta.WriteVInt32(SORTED_SET_WITH_ADDRESSES);
 
             // write the ord -> byte[] as a binary field
             AddTermsDict(field, values);
@@ -455,14 +455,14 @@ namespace Lucene.Net.Codecs.Lucene45
             AddNumericField(field, ords, false);
 
             // write the doc -> ord count as a absolute index to the stream
-            meta.WriteVInt(field.Number);
+            meta.WriteVInt32(field.Number);
             meta.WriteByte((byte)Lucene45DocValuesFormat.NUMERIC);
-            meta.WriteVInt(DELTA_COMPRESSED);
-            meta.WriteLong(-1L);
-            meta.WriteVInt(PackedInts.VERSION_CURRENT);
-            meta.WriteLong(data.FilePointer);
-            meta.WriteVLong(maxDoc);
-            meta.WriteVInt(BLOCK_SIZE);
+            meta.WriteVInt32(DELTA_COMPRESSED);
+            meta.WriteInt64(-1L);
+            meta.WriteVInt32(PackedInts.VERSION_CURRENT);
+            meta.WriteInt64(data.FilePointer);
+            meta.WriteVInt64(maxDoc);
+            meta.WriteVInt32(BLOCK_SIZE);
 
             var writer = new MonotonicBlockPackedWriter(data, BLOCK_SIZE);
             long addr = 0;
@@ -658,7 +658,7 @@ throw new NotImplementedException();
                 {
                     if (meta != null)
                     {
-                        meta.WriteVInt(-1); // write EOF marker
+                        meta.WriteVInt32(-1); // write EOF marker
                         CodecUtil.WriteFooter(meta); // write checksum
                     }
                     if (data != null)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Core/Codecs/Lucene45/Lucene45DocValuesProducer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/Lucene45/Lucene45DocValuesProducer.cs b/src/Lucene.Net.Core/Codecs/Lucene45/Lucene45DocValuesProducer.cs
index d4558a7..e6ccc17 100644
--- a/src/Lucene.Net.Core/Codecs/Lucene45/Lucene45DocValuesProducer.cs
+++ b/src/Lucene.Net.Core/Codecs/Lucene45/Lucene45DocValuesProducer.cs
@@ -137,7 +137,7 @@ namespace Lucene.Net.Codecs.Lucene45
         private void ReadSortedField(int fieldNumber, IndexInput meta, FieldInfos infos)
         {
             // sorted = binary + numeric
-            if (meta.ReadVInt() != fieldNumber)
+            if (meta.ReadVInt32() != fieldNumber)
             {
                 throw new Exception("sorted entry for field: " + fieldNumber + " is corrupt (resource=" + meta + ")");
             }
@@ -148,7 +148,7 @@ namespace Lucene.Net.Codecs.Lucene45
             BinaryEntry b = ReadBinaryEntry(meta);
             binaries[fieldNumber] = b;
 
-            if (meta.ReadVInt() != fieldNumber)
+            if (meta.ReadVInt32() != fieldNumber)
             {
                 throw new Exception("sorted entry for field: " + fieldNumber + " is corrupt (resource=" + meta + ")");
             }
@@ -163,7 +163,7 @@ namespace Lucene.Net.Codecs.Lucene45
         private void ReadSortedSetFieldWithAddresses(int fieldNumber, IndexInput meta, FieldInfos infos)
         {
             // sortedset = binary + numeric (addresses) + ordIndex
-            if (meta.ReadVInt() != fieldNumber)
+            if (meta.ReadVInt32() != fieldNumber)
             {
                 throw new Exception("sortedset entry for field: " + fieldNumber + " is corrupt (resource=" + meta + ")");
             }
@@ -174,7 +174,7 @@ namespace Lucene.Net.Codecs.Lucene45
             BinaryEntry b = ReadBinaryEntry(meta);
             binaries[fieldNumber] = b;
 
-            if (meta.ReadVInt() != fieldNumber)
+            if (meta.ReadVInt32() != fieldNumber)
             {
                 throw new Exception("sortedset entry for field: " + fieldNumber + " is corrupt (resource=" + meta + ")");
             }
@@ -185,7 +185,7 @@ namespace Lucene.Net.Codecs.Lucene45
             NumericEntry n1 = ReadNumericEntry(meta);
             ords[fieldNumber] = n1;
 
-            if (meta.ReadVInt() != fieldNumber)
+            if (meta.ReadVInt32() != fieldNumber)
             {
                 throw new Exception("sortedset entry for field: " + fieldNumber + " is corrupt (resource=" + meta + ")");
             }
@@ -199,7 +199,7 @@ namespace Lucene.Net.Codecs.Lucene45
 
         private void ReadFields(IndexInput meta, FieldInfos infos)
         {
-            int fieldNumber = meta.ReadVInt();
+            int fieldNumber = meta.ReadVInt32();
             while (fieldNumber != -1)
             {
                 // check should be: infos.fieldInfo(fieldNumber) != null, which incorporates negative check
@@ -234,7 +234,7 @@ namespace Lucene.Net.Codecs.Lucene45
                     }
                     else if (ss.Format == Lucene45DocValuesConsumer.SORTED_SET_SINGLE_VALUED_SORTED)
                     {
-                        if (meta.ReadVInt() != fieldNumber)
+                        if (meta.ReadVInt32() != fieldNumber)
                         {
                             throw new Exception("sortedset entry for field: " + fieldNumber + " is corrupt (resource=" + meta + ")");
                         }
@@ -253,24 +253,24 @@ namespace Lucene.Net.Codecs.Lucene45
                 {
                     throw new Exception("invalid type: " + type + ", resource=" + meta);
                 }
-                fieldNumber = meta.ReadVInt();
+                fieldNumber = meta.ReadVInt32();
             }
         }
 
         internal static NumericEntry ReadNumericEntry(IndexInput meta)
         {
             NumericEntry entry = new NumericEntry();
-            entry.format = meta.ReadVInt();
-            entry.missingOffset = meta.ReadLong();
-            entry.PackedIntsVersion = meta.ReadVInt();
-            entry.Offset = meta.ReadLong();
-            entry.Count = meta.ReadVLong();
-            entry.BlockSize = meta.ReadVInt();
+            entry.format = meta.ReadVInt32();
+            entry.missingOffset = meta.ReadInt64();
+            entry.PackedInt32sVersion = meta.ReadVInt32();
+            entry.Offset = meta.ReadInt64();
+            entry.Count = meta.ReadVInt64();
+            entry.BlockSize = meta.ReadVInt32();
             switch (entry.format)
             {
                 case Lucene45DocValuesConsumer.GCD_COMPRESSED:
-                    entry.minValue = meta.ReadLong();
-                    entry.gcd = meta.ReadLong();
+                    entry.minValue = meta.ReadInt64();
+                    entry.gcd = meta.ReadInt64();
                     break;
 
                 case Lucene45DocValuesConsumer.TABLE_COMPRESSED:
@@ -278,7 +278,7 @@ namespace Lucene.Net.Codecs.Lucene45
                     {
                         throw new Exception("Cannot use TABLE_COMPRESSED with more than MAX_VALUE values, input=" + meta);
                     }
-                    int uniqueValues = meta.ReadVInt();
+                    int uniqueValues = meta.ReadVInt32();
                     if (uniqueValues > 256)
                     {
                         throw new Exception("TABLE_COMPRESSED cannot have more than 256 distinct values, input=" + meta);
@@ -286,7 +286,7 @@ namespace Lucene.Net.Codecs.Lucene45
                     entry.table = new long[uniqueValues];
                     for (int i = 0; i < uniqueValues; ++i)
                     {
-                        entry.table[i] = meta.ReadLong();
+                        entry.table[i] = meta.ReadInt64();
                     }
                     break;
 
@@ -302,28 +302,28 @@ namespace Lucene.Net.Codecs.Lucene45
         internal static BinaryEntry ReadBinaryEntry(IndexInput meta)
         {
             BinaryEntry entry = new BinaryEntry();
-            entry.format = meta.ReadVInt();
-            entry.missingOffset = meta.ReadLong();
-            entry.minLength = meta.ReadVInt();
-            entry.maxLength = meta.ReadVInt();
-            entry.Count = meta.ReadVLong();
-            entry.offset = meta.ReadLong();
+            entry.format = meta.ReadVInt32();
+            entry.missingOffset = meta.ReadInt64();
+            entry.minLength = meta.ReadVInt32();
+            entry.maxLength = meta.ReadVInt32();
+            entry.Count = meta.ReadVInt64();
+            entry.offset = meta.ReadInt64();
             switch (entry.format)
             {
                 case Lucene45DocValuesConsumer.BINARY_FIXED_UNCOMPRESSED:
                     break;
 
                 case Lucene45DocValuesConsumer.BINARY_PREFIX_COMPRESSED:
-                    entry.AddressInterval = meta.ReadVInt();
-                    entry.AddressesOffset = meta.ReadLong();
-                    entry.PackedIntsVersion = meta.ReadVInt();
-                    entry.BlockSize = meta.ReadVInt();
+                    entry.AddressInterval = meta.ReadVInt32();
+                    entry.AddressesOffset = meta.ReadInt64();
+                    entry.PackedInt32sVersion = meta.ReadVInt32();
+                    entry.BlockSize = meta.ReadVInt32();
                     break;
 
                 case Lucene45DocValuesConsumer.BINARY_VARIABLE_UNCOMPRESSED:
-                    entry.AddressesOffset = meta.ReadLong();
-                    entry.PackedIntsVersion = meta.ReadVInt();
-                    entry.BlockSize = meta.ReadVInt();
+                    entry.AddressesOffset = meta.ReadInt64();
+                    entry.PackedInt32sVersion = meta.ReadVInt32();
+                    entry.BlockSize = meta.ReadVInt32();
                     break;
 
                 default:
@@ -337,7 +337,7 @@ namespace Lucene.Net.Codecs.Lucene45
             SortedSetEntry entry = new SortedSetEntry();
             if (version >= Lucene45DocValuesFormat.VERSION_SORTED_SET_SINGLE_VALUE_OPTIMIZED)
             {
-                entry.Format = meta.ReadVInt();
+                entry.Format = meta.ReadVInt32();
             }
             else
             {
@@ -377,19 +377,19 @@ namespace Lucene.Net.Codecs.Lucene45
             switch (entry.format)
             {
                 case Lucene45DocValuesConsumer.DELTA_COMPRESSED:
-                    BlockPackedReader reader = new BlockPackedReader(data, entry.PackedIntsVersion, entry.BlockSize, entry.Count, true);
+                    BlockPackedReader reader = new BlockPackedReader(data, entry.PackedInt32sVersion, entry.BlockSize, entry.Count, true);
                     return reader;
 
                 case Lucene45DocValuesConsumer.GCD_COMPRESSED:
                     long min = entry.minValue;
                     long mult = entry.gcd;
-                    BlockPackedReader quotientReader = new BlockPackedReader(data, entry.PackedIntsVersion, entry.BlockSize, entry.Count, true);
+                    BlockPackedReader quotientReader = new BlockPackedReader(data, entry.PackedInt32sVersion, entry.BlockSize, entry.Count, true);
                     return new LongValuesAnonymousInnerClassHelper(this, min, mult, quotientReader);
 
                 case Lucene45DocValuesConsumer.TABLE_COMPRESSED:
                     long[] table = entry.table;
                     int bitsRequired = PackedInts.BitsRequired(table.Length - 1);
-                    PackedInts.Reader ords = PackedInts.GetDirectReaderNoHeader(data, PackedInts.Format.PACKED, entry.PackedIntsVersion, (int)entry.Count, bitsRequired);
+                    PackedInts.Reader ords = PackedInts.GetDirectReaderNoHeader(data, PackedInts.Format.PACKED, entry.PackedInt32sVersion, (int)entry.Count, bitsRequired);
                     return new LongValuesAnonymousInnerClassHelper2(this, table, ords);
 
                 default:
@@ -513,7 +513,7 @@ namespace Lucene.Net.Codecs.Lucene45
                 if (!addressInstances.TryGetValue(field.Number, out addrInstance))
                 {
                     data.Seek(bytes.AddressesOffset);
-                    addrInstance = new MonotonicBlockPackedReader(data, bytes.PackedIntsVersion, bytes.BlockSize, bytes.Count, false);
+                    addrInstance = new MonotonicBlockPackedReader(data, bytes.PackedInt32sVersion, bytes.BlockSize, bytes.Count, false);
                     addressInstances[field.Number] = addrInstance;
                     ramBytesUsed.AddAndGet(addrInstance.RamBytesUsed() + RamUsageEstimator.NUM_BYTES_INT);
                 }
@@ -593,7 +593,7 @@ namespace Lucene.Net.Codecs.Lucene45
                     {
                         size = 1L + bytes.Count / interval;
                     }
-                    addrInstance = new MonotonicBlockPackedReader(data, bytes.PackedIntsVersion, bytes.BlockSize, size, false);
+                    addrInstance = new MonotonicBlockPackedReader(data, bytes.PackedInt32sVersion, bytes.BlockSize, size, false);
                     addressInstances[field.Number] = addrInstance;
                     ramBytesUsed.AddAndGet(addrInstance.RamBytesUsed() + RamUsageEstimator.NUM_BYTES_INT);
                 }
@@ -618,7 +618,7 @@ namespace Lucene.Net.Codecs.Lucene45
             NumericEntry entry = ords[field.Number];
             IndexInput data = (IndexInput)this.data.Clone();
             data.Seek(entry.Offset);
-            BlockPackedReader ordinals = new BlockPackedReader(data, entry.PackedIntsVersion, entry.BlockSize, entry.Count, true);
+            BlockPackedReader ordinals = new BlockPackedReader(data, entry.PackedInt32sVersion, entry.BlockSize, entry.Count, true);
 
             return new SortedDocValuesAnonymousInnerClassHelper(this, valueCount, binary, ordinals);
         }
@@ -695,7 +695,7 @@ namespace Lucene.Net.Codecs.Lucene45
                 if (!ordIndexInstances.TryGetValue(field.Number, out ordIndexInstance))
                 {
                     data.Seek(entry.Offset);
-                    ordIndexInstance = new MonotonicBlockPackedReader(data, entry.PackedIntsVersion, entry.BlockSize, entry.Count, false);
+                    ordIndexInstance = new MonotonicBlockPackedReader(data, entry.PackedInt32sVersion, entry.BlockSize, entry.Count, false);
                     ordIndexInstances[field.Number] = ordIndexInstance;
                     ramBytesUsed.AddAndGet(ordIndexInstance.RamBytesUsed() + RamUsageEstimator.NUM_BYTES_INT);
                 }
@@ -914,8 +914,11 @@ namespace Lucene.Net.Codecs.Lucene45
             internal int format;
 
             /// <summary>
-            /// packed ints version used to encode these numerics </summary>
-            public int PackedIntsVersion { get; set; }
+            /// packed ints version used to encode these numerics 
+            /// <para/>
+            /// NOTE: This was packedIntsVersion (field) in Lucene
+            /// </summary>
+            public int PackedInt32sVersion { get; set; }
 
             /// <summary>
             /// count of values written </summary>
@@ -964,8 +967,11 @@ namespace Lucene.Net.Codecs.Lucene45
             public long AddressInterval { get; set; }
 
             /// <summary>
-            /// packed ints version used to encode addressing information </summary>
-            public int PackedIntsVersion { get; set; }
+            /// packed ints version used to encode addressing information 
+            /// <para/>
+            /// NOTE: This was packedIntsVersion (field) in Lucene
+            /// </summary>
+            public int PackedInt32sVersion { get; set; }
 
             /// <summary>
             /// packed ints blocksize </summary>
@@ -1121,8 +1127,8 @@ namespace Lucene.Net.Codecs.Lucene45
                     }
                     else
                     {
-                        int start = input.ReadVInt();
-                        int suffix = input.ReadVInt();
+                        int start = input.ReadVInt32();
+                        int suffix = input.ReadVInt32();
                         input.ReadBytes(termBuffer.Bytes, start, suffix);
                         termBuffer.Length = start + suffix;
                         return termBuffer;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Core/Codecs/Lucene46/Lucene46FieldInfosReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/Lucene46/Lucene46FieldInfosReader.cs b/src/Lucene.Net.Core/Codecs/Lucene46/Lucene46FieldInfosReader.cs
index 131ca65..63f4c94 100644
--- a/src/Lucene.Net.Core/Codecs/Lucene46/Lucene46FieldInfosReader.cs
+++ b/src/Lucene.Net.Core/Codecs/Lucene46/Lucene46FieldInfosReader.cs
@@ -55,13 +55,13 @@ namespace Lucene.Net.Codecs.Lucene46
             {
                 int codecVersion = CodecUtil.CheckHeader(input, Lucene46FieldInfosFormat.CODEC_NAME, Lucene46FieldInfosFormat.FORMAT_START, Lucene46FieldInfosFormat.FORMAT_CURRENT);
 
-                int size = input.ReadVInt(); //read in the size
+                int size = input.ReadVInt32(); //read in the size
                 FieldInfo[] infos = new FieldInfo[size];
 
                 for (int i = 0; i < size; i++)
                 {
                     string name = input.ReadString();
-                    int fieldNumber = input.ReadVInt();
+                    int fieldNumber = input.ReadVInt32();
                     byte bits = input.ReadByte();
                     bool isIndexed = (bits & Lucene46FieldInfosFormat.IS_INDEXED) != 0;
                     bool storeTermVector = (bits & Lucene46FieldInfosFormat.STORE_TERMVECTOR) != 0;
@@ -93,7 +93,7 @@ namespace Lucene.Net.Codecs.Lucene46
                     byte val = input.ReadByte();
                     DocValuesType? docValuesType = GetDocValuesType(input, (sbyte)(val & 0x0F));
                     DocValuesType? normsType = GetDocValuesType(input, (sbyte)(((int)((uint)val >> 4)) & 0x0F));
-                    long dvGen = input.ReadLong();
+                    long dvGen = input.ReadInt64();
                     IDictionary<string, string> attributes = input.ReadStringStringMap();
                     infos[i] = new FieldInfo(name, isIndexed, fieldNumber, storeTermVector, omitNorms, storePayloads, indexOptions, docValuesType, normsType, Collections.UnmodifiableMap(attributes));
                     infos[i].DocValuesGen = dvGen;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Core/Codecs/Lucene46/Lucene46FieldInfosWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/Lucene46/Lucene46FieldInfosWriter.cs b/src/Lucene.Net.Core/Codecs/Lucene46/Lucene46FieldInfosWriter.cs
index 3c94d71..df803b1 100644
--- a/src/Lucene.Net.Core/Codecs/Lucene46/Lucene46FieldInfosWriter.cs
+++ b/src/Lucene.Net.Core/Codecs/Lucene46/Lucene46FieldInfosWriter.cs
@@ -51,7 +51,7 @@ namespace Lucene.Net.Codecs.Lucene46
             try
             {
                 CodecUtil.WriteHeader(output, Lucene46FieldInfosFormat.CODEC_NAME, Lucene46FieldInfosFormat.FORMAT_CURRENT);
-                output.WriteVInt(infos.Count);
+                output.WriteVInt32(infos.Count);
                 foreach (FieldInfo fi in infos)
                 {
                     IndexOptions? indexOptions = fi.IndexOptions;
@@ -86,7 +86,7 @@ namespace Lucene.Net.Codecs.Lucene46
                         }
                     }
                     output.WriteString(fi.Name);
-                    output.WriteVInt(fi.Number);
+                    output.WriteVInt32(fi.Number);
                     output.WriteByte((byte)bits);
 
                     // pack the DV types in one byte
@@ -95,7 +95,7 @@ namespace Lucene.Net.Codecs.Lucene46
                     Debug.Assert((dv & (~0xF)) == 0 && (nrm & (~0x0F)) == 0);
                     var val = unchecked((sbyte)(0xff & ((nrm << 4) | dv)));
                     output.WriteByte((byte)val);
-                    output.WriteLong(fi.DocValuesGen);
+                    output.WriteInt64(fi.DocValuesGen);
                     output.WriteStringStringMap(fi.Attributes);
                 }
                 CodecUtil.WriteFooter(output);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Core/Codecs/Lucene46/Lucene46SegmentInfoReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/Lucene46/Lucene46SegmentInfoReader.cs b/src/Lucene.Net.Core/Codecs/Lucene46/Lucene46SegmentInfoReader.cs
index 9d037b9..6cb374e 100644
--- a/src/Lucene.Net.Core/Codecs/Lucene46/Lucene46SegmentInfoReader.cs
+++ b/src/Lucene.Net.Core/Codecs/Lucene46/Lucene46SegmentInfoReader.cs
@@ -49,7 +49,7 @@ namespace Lucene.Net.Codecs.Lucene46
             {
                 int codecVersion = CodecUtil.CheckHeader(input, Lucene46SegmentInfoFormat.CODEC_NAME, Lucene46SegmentInfoFormat.VERSION_START, Lucene46SegmentInfoFormat.VERSION_CURRENT);
                 string version = input.ReadString();
-                int docCount = input.ReadInt();
+                int docCount = input.ReadInt32();
                 if (docCount < 0)
                 {
                     throw new CorruptIndexException("invalid docCount: " + docCount + " (resource=" + input + ")");

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Core/Codecs/Lucene46/Lucene46SegmentInfoWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/Lucene46/Lucene46SegmentInfoWriter.cs b/src/Lucene.Net.Core/Codecs/Lucene46/Lucene46SegmentInfoWriter.cs
index 5d59e5c..9cf8da9 100644
--- a/src/Lucene.Net.Core/Codecs/Lucene46/Lucene46SegmentInfoWriter.cs
+++ b/src/Lucene.Net.Core/Codecs/Lucene46/Lucene46SegmentInfoWriter.cs
@@ -53,7 +53,7 @@ namespace Lucene.Net.Codecs.Lucene46
                 CodecUtil.WriteHeader(output, Lucene46SegmentInfoFormat.CODEC_NAME, Lucene46SegmentInfoFormat.VERSION_CURRENT);
                 // Write the Lucene version that created this segment, since 3.1
                 output.WriteString(si.Version);
-                output.WriteInt(si.DocCount);
+                output.WriteInt32(si.DocCount);
 
                 output.WriteByte((byte)(sbyte)(si.UseCompoundFile ? SegmentInfo.YES : SegmentInfo.NO));
                 output.WriteStringStringMap(si.Diagnostics);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Core/Codecs/MultiLevelSkipListReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/MultiLevelSkipListReader.cs b/src/Lucene.Net.Core/Codecs/MultiLevelSkipListReader.cs
index 2cb474f..5d0f568 100644
--- a/src/Lucene.Net.Core/Codecs/MultiLevelSkipListReader.cs
+++ b/src/Lucene.Net.Core/Codecs/MultiLevelSkipListReader.cs
@@ -206,7 +206,7 @@ namespace Lucene.Net.Codecs
             if (level != 0)
             {
                 // read the child pointer if we are not on the leaf level
-                childPointer[level] = skipStream[level].ReadVLong() + skipPointer[level - 1];
+                childPointer[level] = skipStream[level].ReadVInt64() + skipPointer[level - 1];
             }
 
             return true;
@@ -221,7 +221,7 @@ namespace Lucene.Net.Codecs
             m_skipDoc[level] = lastDoc;
             if (level > 0)
             {
-                childPointer[level] = skipStream[level].ReadVLong() + skipPointer[level - 1];
+                childPointer[level] = skipStream[level].ReadVInt64() + skipPointer[level - 1];
             }
         }
 
@@ -279,7 +279,7 @@ namespace Lucene.Net.Codecs
             for (int i = numberOfSkipLevels - 1; i > 0; i--)
             {
                 // the length of the current level
-                long length = skipStream[0].ReadVLong();
+                long length = skipStream[0].ReadVInt64();
 
                 // the start pointer of the current level
                 skipPointer[i] = skipStream[0].FilePointer;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Core/Codecs/MultiLevelSkipListWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/MultiLevelSkipListWriter.cs b/src/Lucene.Net.Core/Codecs/MultiLevelSkipListWriter.cs
index 03c414a..802548d 100644
--- a/src/Lucene.Net.Core/Codecs/MultiLevelSkipListWriter.cs
+++ b/src/Lucene.Net.Core/Codecs/MultiLevelSkipListWriter.cs
@@ -168,7 +168,7 @@ namespace Lucene.Net.Codecs
                 if (level != 0)
                 {
                     // store child pointers for all levels except the lowest
-                    skipBuffer[level].WriteVLong(childPointer);
+                    skipBuffer[level].WriteVInt64(childPointer);
                 }
 
                 //remember the childPointer for the next level
@@ -195,7 +195,7 @@ namespace Lucene.Net.Codecs
                 long length = skipBuffer[level].FilePointer;
                 if (length > 0)
                 {
-                    output.WriteVLong(length);
+                    output.WriteVInt64(length);
                     skipBuffer[level].WriteTo(output);
                 }
             }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Core/Codecs/TermVectorsWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/TermVectorsWriter.cs b/src/Lucene.Net.Core/Codecs/TermVectorsWriter.cs
index e8cade2..39563ec 100644
--- a/src/Lucene.Net.Core/Codecs/TermVectorsWriter.cs
+++ b/src/Lucene.Net.Core/Codecs/TermVectorsWriter.cs
@@ -162,12 +162,12 @@ namespace Lucene.Net.Codecs
                 }
                 else
                 {
-                    int code = positions.ReadVInt();
+                    int code = positions.ReadVInt32();
                     position += (int)((uint)code >> 1);
                     if ((code & 1) != 0)
                     {
                         // this position has a payload
-                        int payloadLength = positions.ReadVInt();
+                        int payloadLength = positions.ReadVInt32();
 
                         if (payload == null)
                         {
@@ -195,8 +195,8 @@ namespace Lucene.Net.Codecs
                 }
                 else
                 {
-                    startOffset = lastOffset + offsets.ReadVInt();
-                    endOffset = startOffset + offsets.ReadVInt();
+                    startOffset = lastOffset + offsets.ReadVInt32();
+                    endOffset = startOffset + offsets.ReadVInt32();
                     lastOffset = endOffset;
                 }
                 AddPosition(position, startOffset, endOffset, thisPayload);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Core/Document/Field.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Document/Field.cs b/src/Lucene.Net.Core/Document/Field.cs
index c1dfd6d..dfffb9e 100644
--- a/src/Lucene.Net.Core/Document/Field.cs
+++ b/src/Lucene.Net.Core/Document/Field.cs
@@ -577,15 +577,15 @@ namespace Lucene.Net.Documents
                 switch (numericType)
                 {
                     case NumericType.INT:
-                        nts.SetIntValue(Convert.ToInt32(val));
+                        nts.SetInt32Value(Convert.ToInt32(val));
                         break;
 
                     case NumericType.LONG:
-                        nts.SetLongValue(Convert.ToInt64(val));
+                        nts.SetInt64Value(Convert.ToInt64(val));
                         break;
 
                     case NumericType.FLOAT:
-                        nts.SetFloatValue(Convert.ToSingle(val));
+                        nts.SetSingleValue(Convert.ToSingle(val));
                         break;
 
                     case NumericType.DOUBLE:

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Core/Document/FloatDocValuesField.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Document/FloatDocValuesField.cs b/src/Lucene.Net.Core/Document/FloatDocValuesField.cs
index d702042..8c02eca 100644
--- a/src/Lucene.Net.Core/Document/FloatDocValuesField.cs
+++ b/src/Lucene.Net.Core/Document/FloatDocValuesField.cs
@@ -36,13 +36,13 @@ namespace Lucene.Net.Documents
         /// <param name="value"> 32-bit float value </param>
         /// <exception cref="ArgumentException"> if the field name is null </exception>
         public FloatDocValuesField(string name, float value)
-            : base(name, Support.Number.FloatToIntBits(value))
+            : base(name, Support.Number.SingleToInt32Bits(value))
         {
         }
 
         public override void SetSingleValue(float value)
         {
-            base.SetInt64Value(Support.Number.FloatToIntBits(value));
+            base.SetInt64Value(Support.Number.SingleToInt32Bits(value));
         }
 
         public override void SetInt64Value(long value)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Core/Index/AutomatonTermsEnum.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/AutomatonTermsEnum.cs b/src/Lucene.Net.Core/Index/AutomatonTermsEnum.cs
index 4b36cad..d4f43f2 100644
--- a/src/Lucene.Net.Core/Index/AutomatonTermsEnum.cs
+++ b/src/Lucene.Net.Core/Index/AutomatonTermsEnum.cs
@@ -208,7 +208,7 @@ namespace Lucene.Net.Index
             int state;
             int pos = 0;
             savedStates.Grow(seekBytesRef.Length + 1);
-            int[] states = savedStates.Ints;
+            int[] states = savedStates.Int32s;
             states[0] = runAutomaton.InitialState;
 
             while (true)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Core/Index/CheckIndex.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/CheckIndex.cs b/src/Lucene.Net.Core/Index/CheckIndex.cs
index fd84f7d..b363b8d 100644
--- a/src/Lucene.Net.Core/Index/CheckIndex.cs
+++ b/src/Lucene.Net.Core/Index/CheckIndex.cs
@@ -588,7 +588,7 @@ namespace Lucene.Net.Index
             int format = 0;
             try
             {
-                format = input.ReadInt();
+                format = input.ReadInt32();
             }
             catch (Exception t)
             {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Core/Index/DocTermOrds.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/DocTermOrds.cs b/src/Lucene.Net.Core/Index/DocTermOrds.cs
index ecea4bf..6e2e076 100644
--- a/src/Lucene.Net.Core/Index/DocTermOrds.cs
+++ b/src/Lucene.Net.Core/Index/DocTermOrds.cs
@@ -467,7 +467,7 @@ namespace Lucene.Net.Index
                             // index into byte array (actually the end of
                             // the doc-specific byte[] when building)
                             int pos = (int)((uint)val >> 8);
-                            int ilen = VIntSize(delta);
+                            int ilen = VInt32Size(delta);
                             var arr = bytes[doc];
                             int newend = pos + ilen;
                             if (newend > arr.Length)
@@ -484,7 +484,7 @@ namespace Lucene.Net.Index
                                 arr = newarr;
                                 bytes[doc] = newarr;
                             }
-                            pos = WriteInt(delta, arr, pos);
+                            pos = WriteInt32(delta, arr, pos);
                             index[doc] = (pos << 8) | 1; // update pointer to end index in byte[]
                         }
                         else
@@ -515,7 +515,7 @@ namespace Lucene.Net.Index
 
                             //System.out.println("      ipos=" + ipos);
 
-                            int endPos = WriteInt(delta, tempArr, ipos);
+                            int endPos = WriteInt32(delta, tempArr, ipos);
                             //System.out.println("      endpos=" + endPos);
                             if (endPos <= 4)
                             {
@@ -671,8 +671,11 @@ namespace Lucene.Net.Index
         }
 
         /// <summary>
-        /// Number of bytes to represent an unsigned int as a vint. </summary>
-        private static int VIntSize(int x)
+        /// Number of bytes to represent an unsigned int as a vint. 
+        /// <para/>
+        /// NOTE: This was vIntSize() in Lucene
+        /// </summary>
+        private static int VInt32Size(int x)
         {
             if ((x & (0xffffffff << (7 * 1))) == 0)
             {
@@ -695,7 +698,10 @@ namespace Lucene.Net.Index
 
         // todo: if we know the size of the vInt already, we could do
         // a single switch on the size
-        private static int WriteInt(int x, sbyte[] arr, int pos)
+        /// <summary>
+        /// NOTE: This was writeInt() in Lucene
+        /// </summary>
+        private static int WriteInt32(int x, sbyte[] arr, int pos)
         {
             var a = ((int)((uint)x >> (7 * 4)));
             if (a != 0)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Core/Index/DocumentsWriterPerThread.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/DocumentsWriterPerThread.cs b/src/Lucene.Net.Core/Index/DocumentsWriterPerThread.cs
index 5de3e86..470e590 100644
--- a/src/Lucene.Net.Core/Index/DocumentsWriterPerThread.cs
+++ b/src/Lucene.Net.Core/Index/DocumentsWriterPerThread.cs
@@ -717,14 +717,14 @@ namespace Lucene.Net.Index
 
             /* Allocate another int[] from the shared pool */
 
-            public override int[] GetIntBlock()
+            public override int[] GetInt32Block()
             {
                 int[] b = new int[IntBlockPool.INT_BLOCK_SIZE];
                 bytesUsed.AddAndGet(IntBlockPool.INT_BLOCK_SIZE * RamUsageEstimator.NUM_BYTES_INT);
                 return b;
             }
 
-            public override void RecycleIntBlocks(int[][] blocks, int offset, int length)
+            public override void RecycleInt32Blocks(int[][] blocks, int offset, int length)
             {
                 bytesUsed.AddAndGet(-(length * (IntBlockPool.INT_BLOCK_SIZE * RamUsageEstimator.NUM_BYTES_INT)));
             }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Core/Index/FreqProxTermsWriterPerField.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/FreqProxTermsWriterPerField.cs b/src/Lucene.Net.Core/Index/FreqProxTermsWriterPerField.cs
index 0f5ea98..1ab3f51 100644
--- a/src/Lucene.Net.Core/Index/FreqProxTermsWriterPerField.cs
+++ b/src/Lucene.Net.Core/Index/FreqProxTermsWriterPerField.cs
@@ -164,14 +164,14 @@ namespace Lucene.Net.Index
 
             if (payload != null && payload.Length > 0)
             {
-                termsHashPerField.WriteVInt(1, (proxCode << 1) | 1);
-                termsHashPerField.WriteVInt(1, payload.Length);
+                termsHashPerField.WriteVInt32(1, (proxCode << 1) | 1);
+                termsHashPerField.WriteVInt32(1, payload.Length);
                 termsHashPerField.WriteBytes(1, payload.Bytes, payload.Offset, payload.Length);
                 hasPayloads = true;
             }
             else
             {
-                termsHashPerField.WriteVInt(1, proxCode << 1);
+                termsHashPerField.WriteVInt32(1, proxCode << 1);
             }
 
             FreqProxPostingsArray postings = (FreqProxPostingsArray)termsHashPerField.postingsArray;
@@ -185,8 +185,8 @@ namespace Lucene.Net.Index
             int endOffset = offsetAccum + offsetAttribute.EndOffset;
             FreqProxPostingsArray postings = (FreqProxPostingsArray)termsHashPerField.postingsArray;
             Debug.Assert(startOffset - postings.lastOffsets[termID] >= 0);
-            termsHashPerField.WriteVInt(1, startOffset - postings.lastOffsets[termID]);
-            termsHashPerField.WriteVInt(1, endOffset - startOffset);
+            termsHashPerField.WriteVInt32(1, startOffset - postings.lastOffsets[termID]);
+            termsHashPerField.WriteVInt32(1, endOffset - startOffset);
 
             postings.lastOffsets[termID] = startOffset;
         }
@@ -238,7 +238,7 @@ namespace Lucene.Net.Index
                 if (docState.docID != postings.lastDocIDs[termID])
                 {
                     Debug.Assert(docState.docID > postings.lastDocIDs[termID]);
-                    termsHashPerField.WriteVInt(0, postings.lastDocCodes[termID]);
+                    termsHashPerField.WriteVInt32(0, postings.lastDocCodes[termID]);
                     postings.lastDocCodes[termID] = docState.docID - postings.lastDocIDs[termID];
                     postings.lastDocIDs[termID] = docState.docID;
                     fieldState.UniqueTermCount++;
@@ -254,12 +254,12 @@ namespace Lucene.Net.Index
                 // write it & lastDocCode
                 if (1 == postings.termFreqs[termID])
                 {
-                    termsHashPerField.WriteVInt(0, postings.lastDocCodes[termID] | 1);
+                    termsHashPerField.WriteVInt32(0, postings.lastDocCodes[termID] | 1);
                 }
                 else
                 {
-                    termsHashPerField.WriteVInt(0, postings.lastDocCodes[termID]);
-                    termsHashPerField.WriteVInt(0, postings.termFreqs[termID]);
+                    termsHashPerField.WriteVInt32(0, postings.lastDocCodes[termID]);
+                    termsHashPerField.WriteVInt32(0, postings.termFreqs[termID]);
                 }
                 postings.termFreqs[termID] = 1;
                 fieldState.MaxTermFrequency = Math.Max(1, fieldState.MaxTermFrequency);
@@ -528,7 +528,7 @@ namespace Lucene.Net.Index
                     }
                     else
                     {
-                        int code = freq.ReadVInt();
+                        int code = freq.ReadVInt32();
                         if (!readTermFreq)
                         {
                             docID += code;
@@ -543,7 +543,7 @@ namespace Lucene.Net.Index
                             }
                             else
                             {
-                                termFreq = freq.ReadVInt();
+                                termFreq = freq.ReadVInt32();
                             }
                         }
 
@@ -601,13 +601,13 @@ namespace Lucene.Net.Index
 
                             if (readPositions)
                             {
-                                int code = prox.ReadVInt();
+                                int code = prox.ReadVInt32();
                                 position += (int)((uint)code >> 1);
 
                                 if ((code & 1) != 0)
                                 {
                                     // this position has a payload
-                                    int payloadLength = prox.ReadVInt();
+                                    int payloadLength = prox.ReadVInt32();
 
                                     if (payload == null)
                                     {
@@ -630,8 +630,8 @@ namespace Lucene.Net.Index
 
                                 if (readOffsets)
                                 {
-                                    int startOffset = offset + prox.ReadVInt();
-                                    int endOffset = startOffset + prox.ReadVInt();
+                                    int startOffset = offset + prox.ReadVInt32();
+                                    int endOffset = startOffset + prox.ReadVInt32();
                                     if (writePositions)
                                     {
                                         if (writeOffsets)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Core/Index/PersistentSnapshotDeletionPolicy.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/PersistentSnapshotDeletionPolicy.cs b/src/Lucene.Net.Core/Index/PersistentSnapshotDeletionPolicy.cs
index 2143968..2b21a4c 100644
--- a/src/Lucene.Net.Core/Index/PersistentSnapshotDeletionPolicy.cs
+++ b/src/Lucene.Net.Core/Index/PersistentSnapshotDeletionPolicy.cs
@@ -209,11 +209,11 @@ namespace Lucene.Net.Index
                 try
                 {
                     CodecUtil.WriteHeader(@out, CODEC_NAME, VERSION_CURRENT);
-                    @out.WriteVInt(m_refCounts.Count);
+                    @out.WriteVInt32(m_refCounts.Count);
                     foreach (KeyValuePair<long, int> ent in m_refCounts)
                     {
-                        @out.WriteVLong(ent.Key);
-                        @out.WriteVInt(ent.Value);
+                        @out.WriteVInt64(ent.Key);
+                        @out.WriteVInt32(ent.Value);
                     }
                     success = true;
                 }
@@ -319,11 +319,11 @@ namespace Lucene.Net.Index
                             try
                             {
                                 CodecUtil.CheckHeader(@in, CODEC_NAME, VERSION_START, VERSION_START);
-                                int count = @in.ReadVInt();
+                                int count = @in.ReadVInt32();
                                 for (int i = 0; i < count; i++)
                                 {
-                                    long commitGen = @in.ReadVLong();
-                                    int refCount = @in.ReadVInt();
+                                    long commitGen = @in.ReadVInt64();
+                                    int refCount = @in.ReadVInt32();
                                     m[commitGen] = refCount;
                                 }
                             }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Core/Index/PrefixCodedTerms.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/PrefixCodedTerms.cs b/src/Lucene.Net.Core/Index/PrefixCodedTerms.cs
index 1cfdd6e..f965cc2 100644
--- a/src/Lucene.Net.Core/Index/PrefixCodedTerms.cs
+++ b/src/Lucene.Net.Core/Index/PrefixCodedTerms.cs
@@ -102,13 +102,13 @@ namespace Lucene.Net.Index
             {
                 if (input.FilePointer < input.Length)
                 {
-                    int code = input.ReadVInt();
+                    int code = input.ReadVInt32();
                     if ((code & 1) != 0)
                     {
                         field = input.ReadString();
                     }
                     int prefix = Number.URShift(code, 1);
-                    int suffix = input.ReadVInt();
+                    int suffix = input.ReadVInt32();
                     bytes.Grow(prefix + suffix);
                     input.ReadBytes(bytes.Bytes, prefix, suffix);
                     bytes.Length = prefix + suffix;
@@ -154,14 +154,14 @@ namespace Lucene.Net.Index
                     int suffix = term.Bytes.Length - prefix;
                     if (term.Field.Equals(lastTerm.Field))
                     {
-                        output.WriteVInt(prefix << 1);
+                        output.WriteVInt32(prefix << 1);
                     }
                     else
                     {
-                        output.WriteVInt(prefix << 1 | 1);
+                        output.WriteVInt32(prefix << 1 | 1);
                         output.WriteString(term.Field);
                     }
-                    output.WriteVInt(suffix);
+                    output.WriteVInt32(suffix);
                     output.WriteBytes(term.Bytes.Bytes, term.Bytes.Offset + prefix, suffix);
                     lastTerm.Bytes.CopyBytes(term.Bytes);
                     lastTerm.Field = term.Field;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Core/Index/ReadersAndUpdates.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/ReadersAndUpdates.cs b/src/Lucene.Net.Core/Index/ReadersAndUpdates.cs
index 6158e4e..b9859c2 100644
--- a/src/Lucene.Net.Core/Index/ReadersAndUpdates.cs
+++ b/src/Lucene.Net.Core/Index/ReadersAndUpdates.cs
@@ -521,7 +521,7 @@ namespace Lucene.Net.Index
 
                                 fieldInfo.DocValuesGen = nextFieldInfosGen;
                                 // write the numeric updates to a new gen'd docvalues file
-                                fieldsConsumer.AddNumericField(fieldInfo, GetLongEnumerable(reader, field, fieldUpdates));
+                                fieldsConsumer.AddNumericField(fieldInfo, GetInt64Enumerable(reader, field, fieldUpdates));
                             }
 
                             //        System.out.println("[" + Thread.currentThread().getName() + "] RAU.writeFieldUpdates: applying binary updates; seg=" + info + " updates=" + dvUpdates.binaryDVUpdates);
@@ -665,7 +665,10 @@ namespace Lucene.Net.Index
             }
         }
 
-        private IEnumerable<long?> GetLongEnumerable(SegmentReader reader, string field, NumericDocValuesFieldUpdates fieldUpdates)
+        /// <summary>
+        /// NOTE: This was getLongEnumerable() in Lucene
+        /// </summary>
+        private IEnumerable<long?> GetInt64Enumerable(SegmentReader reader, string field, NumericDocValuesFieldUpdates fieldUpdates)
         {
             int maxDoc = reader.MaxDoc;
             IBits DocsWithField = reader.GetDocsWithField(field);


Mime
View raw message