title: ushort array to byte array
body: <p>I have an array of ushorts, with each ushort representing a 12-bit word. This needs to be <strong>tightly packed</strong> into an array of bytes. It should look like this in the end:</p>
  
  <pre><code>|  word1    |  word2    |  word3    |  word4   |
  | byte1 | byte2 | byte3 | byte4 | byte5 | byte6|
  </code></pre>
  
  <p>Since each word only uses 12 bits, 2 words will be packed into 3 bytes.</p>
  
  <p>Could someone help? I'm a bit stuck on how to do this in C#.</p>