That code doesn't compress anything!
Partly because it writes the input data to the output stream instead of the byteOut data, and partly because even if it did, byteOut contains the same data as byteArray anyway...
If you want to compress data in C#, then look at the
GZipStream Class (System.IO.Compression)[
^] for starters.