<commit_before>// Copyright 2012 The Obvious Corporation.

/*
 * An in-memory collector for data events.
 */


/*
 * Modules used
 */

"use strict";

var assert = require("assert");
var stream = require("stream");
var util = require("util");

var consts = require("./consts");
var Codec = require("./codec").Codec;
var errors = require("./errors");
var opts = require("./opts");
var sealer = require("./sealer");
var sourcesanity = require("./sourcesanity");


/*
 * Module variables
 */

/** Options spec */
var OPTIONS = {
  encoding: {},
  incomingEncoding: {},
  paused: {}
};


/*
 * Helper functions
 */

/**
 * Construct a Sink state object.
 */
function State(emitter, source, options) {
  sourcesanity.validate(source);

  /** "parent" emitter */
  this.emitter = emitter;

  /** upstream source (must be stream-like, if not actually a Stream) */
  this.source = source;

  /** event emission encoding handler */
  this.decoder = new Codec();

  /** event receipt encoding handler */
  this.encoder = new Codec();

  /** currently paused? */
  this.paused = false;

  /** incrementally collected buffers */
  this.buffers = [];

  /** final combined data, once available */
  this.data = undefined;

  /** error payload that terminated the stream */
  this.error = consts.NO_ERROR;
<commit_msg>Remove unused parameter.<commit_after>// Copyright 2012 The Obvious Corporation.

/*
 * An in-memory collector for data events.
 */


/*
 * Modules used
 */

"use strict";

var assert = require("assert");
var stream = require("stream");
var util = require("util");

var consts = require("./consts");
var Codec = require("./codec").Codec;
var errors = require("./errors");
var opts = require("./opts");
var sealer = require("./sealer");
var sourcesanity = require("./sourcesanity");


/*
 * Module variables
 */

/** Options spec */
var OPTIONS = {
  encoding: {},
  incomingEncoding: {},
  paused: {}
};


/*
 * Helper functions
 */

/**
 * Construct a Sink state object.
 */
function State(emitter, source) {
  sourcesanity.validate(source);

  /** "parent" emitter */
  this.emitter = emitter;

  /** upstream source (must be stream-like, if not actually a Stream) */
  this.source = source;

  /** event emission encoding handler */
  this.decoder = new Codec();

  /** event receipt encoding handler */
  this.encoder = new Codec();

  /** currently paused? */
  this.paused = false;

  /** incrementally collected buffers */
  this.buffers = [];

  /** final combined data, once available */
  this.data = undefined;

  /** error payload that terminated the stream */
  this.error = consts.NO_ERROR;

{'fraction_non_alphanumeric': 0.1633435582822086, 'fraction_numerical': 0.003067484662576687, 'mean_word_length': 3.284072249589491, 'pattern_counts': {'":': 0, '<': 3, '<?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': '444808', 'n_tokens_mistral': 805, 'n_tokens_neox': 752, 'n_words': 235}