<commit_before>function BufferPut () {
  this.words = [];
  this.len = 0;
};
module.exports = BufferPut;

BufferPut.prototype.put = function(buf) {
  this.words.push({buffer: buf});
  this.len += buf.length;
  return this;
};

BufferPut.prototype.word8 = function(x) {
  this.words.push({bytes: 1, value: x});
  this.len += 1;
  return this;
};

BufferPut.prototype.floatle = function(x) {
  this.words.push({bytes: 'float', endian: 'little', value: x});
  this.len += 4;
  return this;
};

[8, 16, 24, 32, 64].forEach(function(bits) {
  Buffer.prototype['word'+bits+'be'] = function(x) {
    this.words.push({endian: 'big', bytes: bits / 8, value: x});
    this.len += bits / 8;
    return this;
  };

  Buffer.prototype['word'+bits+'le'] = function(x) {
    this.words.push({endian: 'little', bytes: bits / 8, value: x});
    this.len += bits / 8;
    return this;
  };
});

BufferPut.prototype.pad = function(bytes) {
  this.words.push({endian: 'big', bytes: bytes, value: 0});
  this.len += bytes;
  return this;
};

BufferPut.prototype.length = function() {
  return this.len;
};

BufferPut.prototype.buffer = function () {<commit_msg>fix a rather embarrassing error and bump the version<commit_after>function BufferPut () {
  this.words = [];
  this.len = 0;
};
module.exports = BufferPut;

BufferPut.prototype.put = function(buf) {
  this.words.push({buffer: buf});
  this.len += buf.length;
  return this;
};

BufferPut.prototype.word8 = function(x) {
  this.words.push({bytes: 1, value: x});
  this.len += 1;
  return this;
};

BufferPut.prototype.floatle = function(x) {
  this.words.push({bytes: 'float', endian: 'little', value: x});
  this.len += 4;
  return this;
};

BufferPut.prototype.varint = function(i) {
  if(i < 0xFD) {
    this.word8(i);
  } else if(i <= 1<<16) {
    this.word8(0xFD);
    this.word16le(i);
  } else if(i <= 1<<32) {
    this.word8(0xFE);
    this.word32le(i);
  } else {
    this.word8(0xFF);
    this.word64le(i);
  }
};

[8, 16, 24, 32, 64].forEach(function(bits) {
  BufferPut.prototype['word'+bits+'be'] = function(x) {
    this.words.push({endian: 'big', bytes: bits / 8, value: x});
    this.len += bits / 8;
    return this;
  };

  BufferPut.prototype['word'+bits+'le'] = function(x) {
    this.words.push({endian: 'little', bytes: bits / 8, value: x});
    this.len += bits / 8;
    return this;
  };
});

BufferPut.prototype.pad = function(bytes) {
  this.words.push({endian: 'big', bytes: bytes, value: 0});
  this.len += bytes;
  return this;
};

BufferPut.prototype.length = function() {
  return this.len;
};

BufferPut.prototype.buffer = function () {
{'fraction_non_alphanumeric': 0.19294207901802837, 'fraction_numerical': 0.022247794399693134, 'mean_word_length': 3.5514834205933683, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 3, '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': '7399526', 'n_tokens_mistral': 1004, 'n_tokens_neox': 959, 'n_words': 202}