<commit_before>define(['mac/palette2'], function(palette) {

  'use strict';
  
  function open(item) {
    return item.getBytes().then(function(bytes) {
    
      var bitmapInfo = new BitmapHeaderView(bytes, bytes.byteOffset, BitmapHeaderView.byteLength);
      
      var width = bitmapInfo.right - bitmapInfo.left;
      var height = bitmapInfo.bottom - bitmapInfo.top;
      
      item.withPixels(width, height, function(pixelData) {
        var pos = BitmapHeaderView.byteLength;
        for (var y = 0; y < height; y++) {
          for (var x = 0; x < width; x++) {
            var byte = bytes[pos + (x >> 8)];
            var bit = (byte >> (7 - (x & 7))) & 1;
            pixelData.set(palette[bit], 4 * (y*width + x));<commit_msg>Fix passing ArrayBufferView instead of ArrayBuffer<commit_after>define(['mac/palette2'], function(palette) {

  'use strict';
  
  function open(item) {
    return item.getBytes().then(function(bytes) {
    
      var bitmapInfo = new BitmapHeaderView(bytes.buffer, bytes.byteOffset, BitmapHeaderView.byteLength);
      
      var width = bitmapInfo.right - bitmapInfo.left;
      var height = bitmapInfo.bottom - bitmapInfo.top;
      
      item.withPixels(width, height, function(pixelData) {
        var pos = BitmapHeaderView.byteLength;
        for (var y = 0; y < height; y++) {
          for (var x = 0; x < width; x++) {
            var byte = bytes[pos + (x >> 8)];
            var bit = (byte >> (7 - (x & 7))) & 1;
            pixelData.set(palette[bit], 4 * (y*width + x));
{'fraction_non_alphanumeric': 0.1407068062827225, 'fraction_numerical': 0.010471204188481676, 'mean_word_length': 2.4988558352402745, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4595262', 'n_tokens_mistral': 493, 'n_tokens_neox': 470, 'n_words': 120}