Exemplo n.º 1
0
 public override void Add(long v)
 {
     if (Debugging.AssertsEnabled)
     {
         Debugging.Assert(m_bitsPerValue == 64 || (v >= 0 && v <= PackedInt32s.MaxValue(m_bitsPerValue)), "{0}", m_bitsPerValue);
         Debugging.Assert(!finished);
     }
     if (m_valueCount != -1 && written >= m_valueCount)
     {
         throw EOFException.Create("Writing past end of stream");
     }
     nextValues[off++] = v;
     if (off == nextValues.Length)
     {
         Flush();
     }
     ++written;
 }