开发者

byte[] base64 to mp3 file

开发者 https://www.devze.com 2023-01-18 01:03 出处:网络
I have a byte[] in base64 and I would to save it in a mp3 file. Can you开发者_运维知识库 help me please ?

I have a byte[] in base64 and I would to save it in a mp3 file.

Can you开发者_运维知识库 help me please ?

Many thanks


It's not clear what you mean by "in base64" in this case. Please give more details.

When you've got a byte array, you'd usually just call:

File.WriteAllBytes(filename, data);

Now if you've got base64 encoded data, that's usually in the form of a string - so you'd use

byte[] binaryData = Convert.FromBase64String(base64String);
File.WriteAllBytes(filename, binaryData);
0

精彩评论

暂无评论...
验证码 换一张
取 消