code: func splitSnapshotData(ctx context.Context, m *raftpb.Message) []api.StreamRaftMessageRequest {
  	var messages []api.StreamRaftMessageRequest
  	if m.Type != raftpb.MsgSnap {
  		return messages
  	}
  
  	// get the size of the data to be split.
  	size := len(m.Snapshot.Data)
  
  	// Get the max payload size.
  	payloadSize := raftMessagePayloadSize(m)
  
  	// split the snapshot into smaller messages.
  	for snapDataIndex := 0; snapDataIndex < size; {
  		chunkSize := size - snapDataIndex
  		if chunkSize > payloadSize {
  			chunkSize = payloadSize
  		}
  
  		raftMsg := *m
  
  		// sub-slice for this snapshot chunk.
  		raftMsg.Snapshot.Data = m.Snapshot.Data[snapDataIndex : snapDataIndex+chunkSize]
  
  		snapDataIndex += chunkSize
  
  		// add message to the list of messages to be sent.
  		msg := api.StreamRaftMessageRequest{Message: &raftMsg}
  		messages = append(messages, msg)
  	}
  
  	return messages
  }
docs: // Split a large raft message into smaller messages.
  // Currently this means splitting the []Snapshot.Data into chunks whose size
  // is dictacted by MaxRaftMsgSize.