function ones(length) {
  const result = new Array(length);
  for (let i = 0; i < length; i++) {
    result[i] = 0xff;
  }
  return result;
}
Returns a ByteArray of the specified length with all bits set.

@param {number} length
@return {!e2e.ByteArray}