/// <summary>
        /// Implements IComponent.Execute method.
        /// </summary>
        /// <param name="pc">Pipeline context</param>
        /// <param name="inmsg">Input message</param>
        /// <returns>Original input message</returns>
        /// <remarks>
        /// IComponent.Execute method is used to initiate
        /// the processing of the message in this pipeline component.
        /// </remarks>
        public Microsoft.BizTalk.Message.Interop.IBaseMessage Execute(Microsoft.BizTalk.Component.Interop.IPipelineContext pc, Microsoft.BizTalk.Message.Interop.IBaseMessage inmsg)
        {
            int    PartCount    = inmsg.PartCount;
            string BodyPartName = inmsg.BodyPartName;

            try
            {
                for (int i = 0; i < inmsg.PartCount; i++)
                {
                    string           PartName;
                    IBaseMessagePart CurrentPart = inmsg.GetPartByIndex(i, out PartName);

                    if (!PartName.Equals(BodyPartName))
                    {
                        Stream CurrentPartSource = CurrentPart.GetOriginalDataStream();
                        byte[] CurrentPartBuffer = new byte[CurrentPartSource.Length];
                        CurrentPartSource.Read(CurrentPartBuffer, 0, CurrentPartBuffer.Length);

                        byte[] CompressedPartBuffer;
                        using (MemoryStream TempStream = new MemoryStream())
                        {
                            using (GZipStream CompressedStream = new GZipStream(TempStream, CompressionMode.Compress, true))
                            {
                                CompressedStream.Write(CurrentPartBuffer, 0, CurrentPartBuffer.Length);
                                CompressedStream.Close();
                            }
                            CompressedPartBuffer = TempStream.ToArray();
                        }

                        MemoryStream TempCompressedStream = new MemoryStream(CompressedPartBuffer);
                        inmsg.GetPartByIndex(i, out PartName).Data = TempCompressedStream;
                        string PropertyName   = "FileName";
                        string PropertySchema = "http://schemas.microsoft.com/BizTalk/2003/mime-properties";
                        string SourcePartName = inmsg.GetPartByIndex(i, out PartName).PartProperties.Read(PropertyName,
                                                                                                          PropertySchema).ToString();
                        SourcePartName += ".gz";

                        inmsg.GetPartByIndex(i, out PartName).PartProperties.Write("FileName", PropertySchema, SourcePartName);
                    }
                }
            }
            catch (Exception Exception)
            {
                //Exception.Message;
            }

            return(inmsg);
        }