code: func (r *translateFileReader) read(p []byte) (n int, err error) {
  	sz := r.store.size()
  
  	// Exit if there is no new data.
  	if sz < r.offset {
  		return 0, fmt.Errorf("pilosa: translate store reader past file size: sz=%d off=%d", sz, r.offset)
  	} else if sz == r.offset {
  		return 0, nil
  	}
  
  	if max := sz - r.offset; max > int64(len(p)) {
  		// If p is not large enough to hold a single entry,
  		// return an error so the client can increase the
  		// size of p and try again.
  		return 0, ErrTranslateReadTargetUndersized
  	} else if int64(len(p)) > max {
  		// Shorten buffer to maximum read size.
  		p = p[:max]
  	}
  
  	// Read data from file at offset.
  	// Limit the number of bytes read to only whole entries.
  	n, err = r.file.ReadAt(p, r.offset)
  	n = validLogEntriesLen(p[:n])
  	r.offset += int64(n)
  	return n, err
  }
docs: // read writes the bytes for zero or more valid entries to p.