Click here to Skip to main content
15,895,962 members
Articles / Programming Languages / XML

Optimizing Serialization in .NET

Rate me:
Please Sign up or sign in to vote.
4.87/5 (88 votes)
16 May 2010Public Domain31 min read 648.6K   5K   332  
Provides code and techniques to enable developers to optimize serialization of data
namespace Framework.Serialization
{
	/// <summary>
	/// Interface to implement on a compressor class which can be used to compress/decompress the resulting byte array of the Fast serializer. 
	/// </summary>
	public interface IByteCompressor
	{
		/// <summary>
		/// Compresses the specified serialized data.
		/// </summary>
		/// <param name="serializedData">The serialized data.</param>
		/// <returns>The  passed in serialized data in compressed form</returns>
		byte[] Compress(byte[] serializedData);

		/// <summary>
		/// Decompresses the specified compressed data.
		/// </summary>
		/// <param name="compressedData">The compressed data.</param>
		/// <returns>The  passed in de-serialized data in compressed form</returns>
		byte[] Decompress(byte[] compressedData);
	}
}

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 A Public Domain dedication


Written By
Software Developer (Senior) Hunton Information Systems Ltd.
United Kingdom United Kingdom
Simon Hewitt is a freelance IT consultant and is MD of Hunton Information Systems Ltd.

He is currently looking for contract work in London.

He is happily married to Karen (originally from Florida, US), has a lovely daughter Bailey, and they live in Kings Langley, Hertfordshire, UK.

Comments and Discussions