I've used this for saving files to a SharePoint list -- http://support.microsoft.com/kb/892730
But really you only need to use all of that if you're saving and retrieving. If you're just saving, you can just use the .net function System.Convert.FromBase64String and add that as an attachment to your SP item.
e.g. mySPItem.Attachments.Add("my_file.doc", Convert.FromBase64String(myInfoPathFileAttachment.Value));