Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version
Go to top

Remoting Compression Channel Sink

, 12 Nov 2008
An article explaining a Remoting extensible channel sink architecture and an implementation of the compression channel sink.
namespace Util
{
    /// <summary>
    /// The ICompressible interface implements a method that returns a flag,
    /// which determines if the request or response should be compressed.
    /// This interface is used in conjuction with the compression sink implementation
    /// and allows to determine dynamically if the request or response is
    /// to be compressed.
    /// </summary>
    /// <remarks>
    /// The following is the order, in which the criteria are evaluated to determine
    /// if the request or response is to be compressed: Threshold should be greater than
    /// zero. NonCompressible marks the object as an exempt. If object size is
    /// greater than threshold and not marked as NonCompressible, the ICompressible is evaluated.
    /// </remarks>
    public interface ICompressible
    {
        /// <summary>
        /// Implement a method in the class. Return true, if the compression
        /// </summary>
        /// <returns>True if the object should be compressed, otherwise not.</returns>
        bool PerformCompression();
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

aschmidt

United States United States
Alexander Schmidt. I'm a software developer, who is working primarily with Microsoft technologies including Microsoft .NET. I'm also interested in optimization problems and software engineering in general. You can visit my blog at http://www.alexschmidt.net

| Advertise | Privacy | Mobile
Web04 | 2.8.140922.1 | Last Updated 13 Nov 2008
Article Copyright 2008 by aschmidt
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid