code: function dectoen(arr) {
    const map = new Map()
    for (var i = 0; i < arr.length; i++) {
      map.set(arr[i], i)
    }
    return map
  }
docs: As an annoying note bitshifting only works for up to 31 bit ints https://stackoverflow.com/a/307200/97443 Therefore we'll use a max-word of 30bits which works out to 5 digits of our base64 encoding. This means each record needs to be limited to that size. 
  Derives an encoding map from a decoding table
  
  @name dectoen
  
  @param {Array.<T>} arr encoding table
  @returns {Map.<T, Number>} decoding map