code: function TrimArrayToBytes(arr) {
      var ix, newarr;
      var len = arr.length;
      for (ix=0; ix<len; ix++) {
          if (arr[ix] < 0 || arr[ix] >= 0x100) 
              break;
      }
      if (ix == len) {
          return arr;
      }
      newarr = Array(len);
      for (ix=0; ix<len; ix++) {
          if (arr[ix] < 0 || arr[ix] >= 0x100) 
              newarr[ix] = 63;  // '?'
          else
              newarr[ix] = arr[ix];
      }
      return newarr;
  }
docs: /* Given an array, return an array of the same length with all the values
  trimmed to the range 0-255. This may be the same array.