VB.NET-将MP3转换为Base64字符串
我正试图找到一种将mp3声音存储在文本文件中的方法。我的计划是将原始mp3文件转换为base64字符串,然后保存它 我花了很多时间询问谷歌,但只能找到将base64字符串转换回mp3的方法 这可能吗?我也为其他解决方案开放,我只需要能够将文件转换为文本,然后返回到mp3格式。我正在使用Visual Basic.NET,但我认为C也可以帮我解决问题。使用将字节数组转换为base64字符串:VB.NET-将MP3转换为Base64字符串,vb.net,audio,base64,mp3,Vb.net,Audio,Base64,Mp3,我正试图找到一种将mp3声音存储在文本文件中的方法。我的计划是将原始mp3文件转换为base64字符串,然后保存它 我花了很多时间询问谷歌,但只能找到将base64字符串转换回mp3的方法 这可能吗?我也为其他解决方案开放,我只需要能够将文件转换为文本,然后返回到mp3格式。我正在使用Visual Basic.NET,但我认为C也可以帮我解决问题。使用将字节数组转换为base64字符串: ' load file into a byte array Dim data As Byte() = Fil
' load file into a byte array
Dim data As Byte() = File.ReadAllBytes(filename)
' convert the byte array to base64
Dim str As String = Convert.ToBase64String(data)
' write the string to a file
File.WriteAllText(newFilename, str)