def unpack_int64_bigendian(bytes)
      bytes.each_byte.to_a.reverse.each_with_index.
        reduce(0) { |val, (byte, index)| val | (byte << (index * 8)) }
    end
def unpack_int64_bigendian(bytes)
      bytes.each_byte.to_a.reverse.each_with_index.
        reduce(0) { |val, (byte, index)| val | (byte << (index * 8)) }
    end
Internal - unpacks a string of big endian, 64 bit integers

 bytes - an array of ints

 Returns the original byte sequence as a string