code: func export() error {
  	var outputBytes []byte
  
  	fileName := path.Join(tmpDir, "data.out")
  	outputFile, err := os.OpenFile(fileName, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0600)
  	if err != nil {
  		return errors.Trace(err)
  	}
  	defer terror.Call(outputFile.Close)
  
  	outputBytes = encodeMeta(outputBytes, scale, keySize, valSize)
  
  	seed := rand.NewSource(time.Now().UnixNano())
  	r := rand.New(seed)
  
  	for i := 1; i <= scale; i++ {
  		outputBytes, err = encodeRow(outputBytes, nextRow(r, keySize, valSize))
  		if err != nil {
  			return errors.Trace(err)
  		}
  		_, err = outputFile.Write(outputBytes)
  		if err != nil {
  			return errors.Trace(err)
  		}
  		outputBytes = outputBytes[:0]
  	}
  
  	return nil
  }
docs: /*
   * The synthetic data is exported as a binary format.
   * The encoding format is:
   *   1) Meta Data
   *      Three 64-bit integers represent scale size, key size and value size.
   *   2) Row Data
   *      Each row is encoded as:
   *		One 64-bit integer represent the row size in bytes, followed by the
   *      the actual row bytes.
   */