code: func readVIntBlock(docIn store.IndexInput, docBuffer []int,
  	freqBuffer []int, num int, indexHasFreq bool) (err error) {
  	if indexHasFreq {
  		for i := 0; i < num; i++ {
  			code, err := asInt(docIn.ReadVInt())
  			if err != nil {
  				return err
  			}
  			docBuffer[i] = int(uint(code) >> 1)
  			if (code & 1) != 0 {
  				freqBuffer[i] = 1
  			} else {
  				freqBuffer[i], err = asInt(docIn.ReadVInt())
  				if err != nil {
  					return err
  				}
  			}
  		}
  	} else {
  		for i := 0; i < num; i++ {
  			docBuffer[i], err = asInt(docIn.ReadVInt())
  			if err != nil {
  				return err
  			}
  		}
  	}
  	return nil
  }
docs: /**
   * Read values that have been written using variable-length encoding instead of bit-packing.
   */