How to do RLE (run length encoding) in C# on a byte array?
<p>I am trying to XOR two bitmap files (their byte arrays) to produce a byte array that can be used to change image A into image B or vice versa.  I am sending this over the network so I would like to do some basic compression before this happens.</p>

<p>Is there a way to do RLE (run length encoding) in C# (using a built-in, or fast reliable 3rd party library) on a byte array for this purpose?</p>

<p>Notes:</p>

<ul>
<li>If you are going to suggest an alternative to my approach please keep in mind that the decompression and transformation on the remote machine has to be as quick and efficient as possible.</li>
</ul>
