<commit_before>"use strict"

function BitBuffer(number) {
	this.buffer = new Buffer(Math.ceil(number / 8))
	this.buffer.fill(0)
}

BitBuffer.prototype = {
	set: function(index, bool) {
    var pos = index >>> 3
		if(bool) {
			this.buffer[pos] |= 1 << (index % 8)
		} else {
			this.buffer[pos] &= ~(1 << (index % 8))
		}
	},
	get: function(index) {
		return (this.buffer[index >>> 3] & (1 << (index % 8))) != 0
	},
	toggle: function(index) {
		this.buffer[index >>> 3] ^= 1 << (index % 8)
	},
	toBuffer: function() {
		return this.buffer
	}
}

exports.BitBuffer = BitBuffer<commit_msg>zerocopy support<commit_after>"use strict"

function BitBuffer(number,buffer) {
  if (buffer != undefined && buffer.length == number/8) {
    this.buffer = buffer;
  } else {
	  this.buffer = new Buffer(Math.ceil(number / 8))
	  this.buffer.fill(0)
  } 
}


BitBuffer.prototype = {
	set: function(index, bool) {
		var pos = index >>> 3
		if(bool) {
			this.buffer[pos] |= 1 << (index % 8)
		} else {
			this.buffer[pos] &= ~(1 << (index % 8))
		}
	},
	get: function(index) {
		return (this.buffer[index >>> 3] & (1 << (index % 8))) != 0
	},
	toggle: function(index) {
		this.buffer[index >>> 3] ^= 1 << (index % 8)
	},
	toBuffer: function() {
		return this.buffer
	}
}

exports.BitBuffer = BitBuffer
{'fraction_non_alphanumeric': 0.19455252918287938, 'fraction_numerical': 0.022568093385214007, 'mean_word_length': 3.301003344481605, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 21, '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': '4248638', 'n_tokens_mistral': 530, 'n_tokens_neox': 483, 'n_words': 106}