File Stream C#

using System;
using System.IO;
using System.Text;
    public static class CompressionUtility
    {
        /// 
        /// Read entire stream into a byte array
        /// 

        /// Stream to read
        /// Byte array
        public static byte[] ReadFullStream(Stream stream)
        {
            byte[] buffer = new byte[32768];
            using (MemoryStream ms = new MemoryStream())
            {
                while (true)
                {
                    int read = stream.Read(buffer, 0, buffer.Length);
                    if (read <= 0)
                        return ms.ToArray();
                    ms.Write(buffer, 0, read);
                }
            }
        }
    }