public void Add(IndexEntry entry)
		{
			for (int i = 0; i < entry.Value.Count; i++)
			{
				_writer.Write(entry.Value.Array[i + entry.Value.Offset]);
			}
			_writer.Write(',');
			var pos = entry.Position;
			int digits = 0;
			do
			{
				var remaining = (int) (pos%10);
				pos /= 10;
				_buffer[digits++] = "0123456789"[remaining];
			} while (pos > 0);

			Array.Reverse(_buffer,0,digits);

			_writer.Write(_buffer, 0, digits);
			
			_writer.Write(_lineBreak);
		}
Exemple #2
0
		public static int CompareIndexEntries(IndexEntry x, IndexEntry y)
		{
			var xSeg = x.Value;
			var ySeg = y.Value;
			return CompareArraySegments(xSeg, ySeg);
		}