using System;
using System.IO;
using System.Text;
publicstaticclass CompressionUtility
{
/// <summary>
/// Convert a string into an array of bytes
/// </summary>
/// <param name="input">String to convert</param>
/// <returns>Byte atray that repsesents the string</returns>
publicstaticbyte[] ConvertStringToBytes(string input)
{
MemoryStream stream = new MemoryStream();
using (StreamWriter writer = new StreamWriter(stream))
{
writer.Write(input);
writer.Flush();
}
return stream.ToArray();
}
}