WS-Compression for WCF

I have developed a new WS-Compression implementation for WCF.  This code is based on the WSE 3.0 implementation  made by my partner Rodolfo Finochieti.

 

Some features provided by this implementation:

 

  • Message body compression
  • Different compression algorithms (GZIP, Deflate)
  • Different compression levels
  • Support to enable compression by means of configuration or code

 

You can download it from here

UPDATED: A new version for the WCF september RC is available here

Enjoy :)

Published Wednesday, March 29, 2006 3:57 PM by cibrax
Filed under:

Comments

# re: WS-Compression for WCF

Friday, April 14, 2006 10:26 AM by Dileep Agarwal

Hi,
Could you please send any document on this. I am usig Feb CTP and in config file m getting below error: <compression .. is not a valid element.

also in WSCompression.cs u are using some static class variable having link to the weblogs. I am not able to understand these llso.

Waiting for your response
Dileep Agarwal

# re: WS-Compression for WCF

Tuesday, April 18, 2006 10:00 AM by Cibrax

Hi Dileep,


Unfortunately, I did not have time to prepare any documentation for this sample.

It was originally created by my partner Rodolfo for WSE 3.0, and I have only moved to WCF. The error in the configuration is a quite strange, does it prevent the application from running or is it a Visual Studio Warning ?. Your configuration should have a BindingExtension section to define the "compression" element.

The static variables are XML namespaces and they should not be considered as links (In this case, my colleague Rodolfo used his weblog url as namespace, but it is just a coincidence and you can use change those namespaces to use other namespaces).

I will let you know when I have some documentation.

Thanks

Pablo

# re: WS-Compression for WCF

Monday, September 25, 2006 2:58 AM by Jithendrian. R

i am trying to send attachments from my client app to my service app in WCF with the help of the samle provided above. I am using Beta2. But when i try to add service reference to the client in that sample i am getting an exception stating "Compression Header is missing" in "AsyncResult.cs" file. Could someone let me know on which CTP the sample was developed on? . let me know is there any other sample available for sending the attachments?.

# re: WS-Compression for WCF

Wednesday, October 11, 2006 7:15 PM by Andres

I have problems using this code on Named Pipes transport, have you tested this code on this transport? Thanks, Andrés.

# re: WS-Compression for WCF

Thursday, October 12, 2006 10:10 AM by cibrax

Hi Andres,

No, I haven't tested the code with that transport. The code is hooking up in the transport layer (Bindings) to compress the message, and that can bring many problems. I planning to move the compression functionality to the service layer (Behaviors). Rodolfo Finocheiti have a version implemented in that layer, http://prototypes.shockbyte.com.ar/misc/IndigoWSCompressionBehavior.zip

# re: WS-Compression for WCF

Wednesday, March 28, 2007 4:08 PM by CTXAmn

When I inspect the WCF Trace I get *Stream* instead of the parameters, unless I return a buffered copy of the message.(see code below)

Any ways to optimize it?

.

.

originalMessage.Close();

// Force display of the parameters into the WCF logs

MessageBuffer buffer = message.CreateBufferedCopy(int.MaxValue);

message = buffer.CreateMessage();

buffer.Close();

# 关于 WCF 中数据压缩的几篇文章

Tuesday, December 04, 2007 9:05 PM by 我是蚂蚁

在.net3.0出现以前我们进行分布式开发式有两个选择一个是webservice,另一个是remoting;

# [转] 关于 WCF 中数据压缩的几篇文章

Saturday, April 26, 2008 9:12 AM by 龍龙

原文:www.cnblogs.com/.../982534.html

在.net3.0出现以前我们进行分布式开发式有两个选择一个是webse...

# re: WS-Compression for WCF

Thursday, August 21, 2008 8:31 AM by Ramon

Is this based on http 1.1 http compression thus compression on the http transport data and not a custom message?

#

Friday, August 29, 2008 11:03 AM by reality-refactored

WCF Compression- best practices.

# WCF Compression- best practices? &laquo; Reality Refactored

Tuesday, July 21, 2009 4:56 PM by WCF Compression- best practices? « Reality Refactored

Pingback from  WCF Compression- best practices? &laquo; Reality Refactored

# ???????????? ?????????????? ?? WCF - CodeHelper

Thursday, July 15, 2010 3:53 PM by ???????????? ?????????????? ?? WCF - CodeHelper

Pingback from  ???????????? ?????????????? ?? WCF - CodeHelper

Leave a Comment

(required) 
(required) 
(optional)
(required)