<commit_before>/**
 * node-zip-stream
 *
 * Copyright (c) 2014 <NAME>, contributors.
 * Licensed under the MIT license.
 * https://github.com/ctalkington/node-zip-stream/blob/master/LICENSE-MIT
 */
var zlib = require('zlib');
var inherits = require('util').inherits;

var util = require('./');

function DeflateRawChecksum(options) {
  zlib.DeflateRaw.call(this, options);

  this.checksum = util.crc32();
  this.digest = null;

  this.rawSize = 0;
  this.compressedSize = 0;

  // BC v0.8
  if (typeof this.push !== 'function') {
    this.on('data', function(chunk) {
      if (chunk) {
        this.compressedSize += chunk.length;
      }
    });
  }

  this.once('end', function() {
    this.digest = this.checksum.digest();
  });
}

inherits(DeflateRawChecksum, zlib.DeflateRaw);
<commit_msg>fix for last commit using prototype.<commit_after>/**
 * node-zip-stream
 *
 * Copyright (c) 2014 <NAME>, contributors.
 * Licensed under the MIT license.
 * https://github.com/ctalkington/node-zip-stream/blob/master/LICENSE-MIT
 */
var zlib = require('zlib');
var inherits = require('util').inherits;

var util = require('./');

function DeflateRawChecksum(options) {
  zlib.DeflateRaw.call(this, options);

  this.checksum = util.crc32();
  this.digest = null;

  this.rawSize = 0;
  this.compressedSize = 0;

  // BC v0.8
  if (typeof zlib.DeflateRaw.prototype.push !== 'function') {
    this.on('data', function(chunk) {
      if (chunk) {
        this.compressedSize += chunk.length;
      }
    });
  }

  this.once('end', function() {
    this.digest = this.checksum.digest();
  });
}

inherits(DeflateRawChecksum, zlib.DeflateRaw);

{'fraction_non_alphanumeric': 0.16809290953545233, 'fraction_numerical': 0.012224938875305624, 'mean_word_length': 3.3653333333333335, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, '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': '4097631', 'n_tokens_mistral': 585, 'n_tokens_neox': 560, 'n_words': 109}