Convert byte array into a string
using System; using System.IO; using System.Text; public static class CompressionUtility { /// <summary> /// Convert abyte array into a string /// </summary> /// <param name="bytes">Byte array to convert</param> /// <returns>String constructed from bytes</returns> public static string ConvertBytesToString(byte[] bytes) { string output = String.Empty; MemoryStream stream = new MemoryStream(bytes); stream.Position = 0; using (StreamReader reader = new StreamReader(stream)) { output = reader.ReadToEnd(); } return output; } }