code: function detectEncoding(label, input_stream) {
        if (input_stream.match([0xFF, 0xFE])) {
          input_stream.offset(2);
          return 'utf-16';
        }
        if (input_stream.match([0xFE, 0xFF])) {
          input_stream.offset(2);
          return 'utf-16be';
        }
        if (input_stream.match([0xEF, 0xBB, 0xBF])) {
          input_stream.offset(3);
          return 'utf-8';
        }
        return label;
      }
docs: NOTE: currently unused 
  @param {string} label The encoding label.
  @param {ByteInputStream} input_stream The byte stream to test.