function string2binary(str) {
    var result = null;
    if (support.uint8array) {
      result = new Uint8Array(str.length);
    } else {
      result = new Array(str.length);
    }
    return stringToArrayLike(str, result);
}
Convert a string that pass as a "binary string": it should represent a byte
array but may have > 255 char codes. Be sure to take only the first byte
and returns the byte array.
@param {String} str the string to transform.
@return {Array|Uint8Array} the string in a binary format.