text: public virtual Builder Add(int doc){if (doc <= previousDoc){throw new System.ArgumentException("Doc IDs must be provided in order, but previousDoc=" + previousDoc + " and doc=" + doc);}buffer[bufferSize++] = doc - previousDoc - 1;if (bufferSize == BLOCK_SIZE){EncodeBlock();bufferSize = 0;}previousDoc = doc;++cardinality;return this;}