code: func (r *LiveReader) buildRecord() (bool, error) {
  	for {
  		// Check that we have data in the internal buffer to read.
  		if r.writeIndex <= r.readIndex {
  			return false, nil
  		}
  
  		// Attempt to read a record, partial or otherwise.
  		temp, n, err := r.readRecord()
  		if err != nil {
  			return false, err
  		}
  
  		r.readIndex += n
  		r.total += int64(n)
  		if temp == nil {
  			return false, nil
  		}
  
  		rt := recType(r.hdr[0])
  		if rt == recFirst || rt == recFull {
  			r.rec = r.rec[:0]
  		}
  		r.rec = append(r.rec, temp...)
  
  		if err := validateRecord(rt, r.index); err != nil {
  			r.index = 0
  			return false, err
  		}
  		if rt == recLast || rt == recFull {
  			r.index = 0
  			return true, nil
  		}
  		// Only increment i for non-zero records since we use it
  		// to determine valid content record sequences.
  		r.index++
  	}
  }
docs: // Rebuild a full record from potentially partial records. Returns false
  // if there was an error or if we weren't able to read a record for any reason.
  // Returns true if we read a full record. Any record data is appended to
  // LiveReader.rec