.NET Matters: Stream Pipeline
My latest .NET Matters column in MSDN Magazine is now available online. In it, I discuss one approach to implementing a BlockingStream and using it to implement a StreamPipeline class.
Comments
Anonymous
January 15, 2008
PingBack from http://msdnrss.thecoderblogs.com/2008/01/16/net-matters-stream-pipeline/Anonymous
February 24, 2008
Hello Stehen, Very nice article but how do I compile the code? I'm using .net 2.0. Is Action<Stream, Stream> a 3.x thing ? Because for me, I can just find a System.Action <T> Thanks, John.Anonymous
February 24, 2008
Glad you liked the article. The code requires .NET 3.5, as Action<T1,T2> is a new delegate type defined in System.Core.dll.Anonymous
April 03, 2008
My question is about your last two articles "StreamPipeline and Asynch Stream". To send data using a NetworkStream, assuming I have to compress and to encrypt the byte, is better use the PipeStream or the Asynch method (may be multicasting the delegates)?? and how I can upgrade the code to resolve the issue of the data size, because looping 0X1000 byte at the time with the encryption the size change most of the time. Thanks and best regards RiccardoAnonymous
April 04, 2008
You don't have to choose; you can use them both together. You can use a stream pipeline approach to overlap the encryption with the compression, and you can write the results asynchronously to the network stream. Regarding reading 0x1000 bytes a time, it doesn't matter if you actually get that many; when you call Read, the return value is the number of bytes actually read into the array, and you can then use just that many from the array.Anonymous
April 25, 2008
Thanks, I have done a combination of StreamPipeline and Asynch and work just pefect. Do you think that using the Parallel tools could increase the performance (using Future<T> and wait for the callback) or becasue is kind of sequntial (compress > encrypt > send ) system it is not possible?Anonymous
April 27, 2008
Hey Stephen, installing SP3 on my Tablet PC Edition 2005 broke Sudoku. Now it gives an error "requires Windows XP Tablet PC Edition 2005". I've installed the latest Ink 1.7 runtime, recognizer pack everything but after SP3 it doesn't work. Please I don't want to lose a game like MS Sudoku. Can Microsoft fix it to work with SP3?Anonymous
November 04, 2008
Wish you had the adaptive huffman code sample available again. Useful especially when Silverlight does not offer IO.Compression stuff.Anonymous
August 09, 2012
HI Stephen, I am using the code provided in the below link to check the processes of locked files. msdn.microsoft.com/.../cc163450.aspx The code is working fine with the shorter file paths, but when we use it with longer file paths code is failing in the "RmRegisterResources" method, is there any way to check the longer file paths. thanks, subrahmanyam