File Stream C#

using System;
using System.IO;
using System.Text;
    public static class CompressionUtility
    {
        /// 
        /// Convert a string into an array of bytes
        /// 

        /// String to convert
        /// Byte atray that repsesents the string
        public static byte[] ConvertStringToBytes(string input)
        {
            MemoryStream stream = new MemoryStream();
            using (StreamWriter writer = new StreamWriter(stream))
            {
                writer.Write(input);
                writer.Flush();
            }
            return stream.ToArray();
        }
    }