title: How to convert binary string to bytes[] array?
body: <p>Since Mozilla's <code>btoa</code> and <code>atob</code> aren't compatible with IE, Im using <a href="https://code.google.com/p/stringencoders/source/browse/trunk/javascript/base64.js" rel="nofollow noreferrer">Nick Galbreath's solution</a> that works across the board.</p>
  <p>In my JS, I have this snippet:</p>
  <pre><code>reader.onload = function (e)
  {
      var base64str = e.target.result.split(';')[1].split(',')[1];
      var binaryData = base64.decode(base64str); 
      
      // binaryData looks like: 3!1AQa&quot;q2¡±B#$RÁb34rÑC%Sðáñcs5¢²&amp;DTdEÂ£t
      // 6ÒUâeò³ÃÓuãóF'¤´ÄÔäô¥µÅÕåõVfv¦¶ÆÖæö7GWgw§·Ç×ç÷5!1AQaq&quot;2¡±B#ÁRÑð
      // 3$bárCScs4ñ%¢²&amp;5ÂÒDT£dEU6teâò³ÃÓuãóF¤´ÄÔäô¥µÅÕåõVfv¦¶ÆÖæö'7GWgw
      // §·ÇÿÚ?õTI%)$IJI$RIrÿ[múÙxÝ^«ÝKØrþk²ïÑûíGóß÷¿ÑþÄY«ÍÓ±×úN //...
      // Is this even binary data?
  
      Ajax.SendToHandler(binaryData);
  }
  </code></pre>
  <p>How do I convert <code>binaryData</code>, which is sent to my ashx derived <code>IHttpHandler</code> as a string, into a <code>bytes[]</code> array?</p>
  <p>Ask me to clarify where needed!</p>