title: Byte Array to Uint64 as a String
body: <p>Let's think about the following situation.</p>
  
  <p>The Go routine creates a byte array where packs a <em>Uint64</em> number <code>5577006791947779410</code> in 8 bytes Big Endian <code>[77, 101, 130, 33, 7, 252, 253, 82]</code>.</p>
  
  <p>In JavaScript code I receive these bytes as <code>Uint8Array</code>. We know that JavaScript doesn't currently support <em>Uint64</em> as safe numeric type and cannot perform bitwise operations on integers larger than 32 bits, so things like <code>buf[0] &lt;&lt; 56</code> will never work.</p>
  
  <p>So what is the process of decoding these bytes directly to numeric string <code>"5577006791947779410"</code>?</p>
  
  <p><strong>P.S.</strong> I know there are <a href="https://github.com/peterolson/BigInteger.js" rel="noreferrer">plenty</a> <a href="https://github.com/jtobey/javascript-bignum" rel="noreferrer">of</a> <a href="https://github.com/dcodeIO/long.js" rel="noreferrer">libraries</a> for working with big integers in JavaScript, but generally they are huge and provide lots of mathematical operations, which I don't need here. I am looking for a simple modern straightforward solution for <em>just</em> decoding BE-packed <em>Uint64</em> and <em>Int64</em> bytes to numeric string. Do you have anything in mind?</p>