Base64 decode in C# or Java

后端 未结 6 1997
鱼传尺愫
鱼传尺愫 2020-12-10 22:07

I have a Base64-encoded object with the following header:

application/x-xfdl;content-encoding=\"asc-gzip\"

What is the best way to proceed

6条回答
  •  春和景丽
    2020-12-10 22:45

    To decode the Base64 content in C# you can use the Convert Class static methods.

    byte[] bytes = Convert.FromBase64String(base64Data);
    

    You can also use the GZipStream Class to help deal with the GZipped stream.

    Another option is SharpZipLib. This will allow you to extract the original data from the compressed data.

提交回复
热议问题