public Message DecompressMessage(Message sourceMessage)
        {
            if (!sourceMessage.IsCompressed())
            {
                return(sourceMessage);
            }
            CompressionAlgorithm algorithm = sourceMessage.GetCompressionAlgorithm();

            sourceMessage.RemoveCompressionHeader();
            byte[]        compressedBody   = sourceMessage.GetCompressedBody();
            byte[]        decompressedBody = DataCompressor.Decompress(compressedBody, algorithm);
            string        newMessageXml    = Encoding.UTF8.GetString(decompressedBody);
            XmlTextReader reader2          = new XmlTextReader(new StringReader(newMessageXml));
            Message       newMessage       = Message.CreateMessage(sourceMessage.Version, null, reader2);

            newMessage.Headers.CopyHeadersFrom(sourceMessage);
            newMessage.Properties.CopyProperties(sourceMessage.Properties);
            return(newMessage);
        }