Welcome to MSDN Blogs Sign in | Join | Help

.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.

Published Tuesday, January 15, 2008 9:43 PM by toub

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

Wednesday, January 16, 2008 12:39 AM by MSDN Blog Postings » .NET Matters: Stream Pipeline

# MSDN Blog Postings » .NET Matters: Stream Pipeline

Sunday, February 24, 2008 11:19 AM by john

# re: .NET Matters: Stream Pipeline

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.

Sunday, February 24, 2008 2:16 PM by toub

# re: .NET Matters: Stream Pipeline

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.

Thursday, April 03, 2008 10:40 AM by rikace

# re: .NET Matters: Stream Pipeline or Asynch Stream???

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

Riccardo

Friday, April 04, 2008 9:15 PM by toub

# re: .NET Matters: Stream Pipeline

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.

Friday, April 25, 2008 10:57 AM by rikace

# re: .NET Matters: Stream Pipeline

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?

Sunday, April 27, 2008 2:48 PM by anonymous

# re: .NET Matters: Stream Pipeline

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?

Tuesday, November 04, 2008 4:45 PM by G

# re: .NET Matters: Stream Pipeline

Wish you had the adaptive huffman code sample available again. Useful especially when Silverlight does not offer IO.Compression stuff.

Leave a Comment

(required) 
required 
(required) 

  
Enter Code Here: Required
 
Page view tracker