<commit_before>'use strict';

const fs = require('fs');
const EventEmitter = require('events').EventEmitter;
const inherits = require('util').inherits;
const Readable = require('stream').Readable;

const tarStream = require('tar-stream');
const gunzipMaybe = require('gunzip-maybe');
const yazl = require('yazl');
const pipe = require('pipe-io/legacy');

const isString = (a) => typeof a === 'string';
const isStream = (a) => a instanceof Readable;
const isFunction = (a) => typeof a === 'function';

const defaultFilter = () => true;
const defaultMap = () => {};

inherits(TarToZip, EventEmitter);

module.exports = (file, options) => {
    this.options = options || {};
    
    const isProgress = options.progress;
    const emitter = new TarToZip(file, options);
    
    process.nextTick(() => {
        const stream = getFile(file);
        
        if (!isProgress)
            return emitter.convert(stream);
        
        emitter._parse(stream, () => {
            emitter.convert(getFile(file));
        });
    });
    
    return emitter;
};

function TarToZip(file, options) {
    EventEmitter.call(this);
    
    this._zip = new yazl.ZipFile();
    this.getStream = () => {
        return this._zip.outputStream;<commit_msg>fix(tar-to-zip) revert dropped check call in #3 (#4)<commit_after>'use strict';

const fs = require('fs');
const EventEmitter = require('events').EventEmitter;
const inherits = require('util').inherits;
const Readable = require('stream').Readable;

const tarStream = require('tar-stream');
const gunzipMaybe = require('gunzip-maybe');
const yazl = require('yazl');
const pipe = require('pipe-io/legacy');

const isString = (a) => typeof a === 'string';
const isStream = (a) => a instanceof Readable;
const isFunction = (a) => typeof a === 'function';

const defaultFilter = () => true;
const defaultMap = () => {};

inherits(TarToZip, EventEmitter);

module.exports = (file, options) => {
    this.options = options || {};
    
    check(file, options);
    
    const isProgress = options.progress;
    const emitter = new TarToZip(file, options);
    
    process.nextTick(() => {
        const stream = getFile(file);
        
        if (!isProgress)
            return emitter.convert(stream);
        
        emitter._parse(stream, () => {
            emitter.convert(getFile(file));
        });
    });
    
    return emitter;
};

function TarToZip(file, options) {
    EventEmitter.call(this);
    
    this._zip = new yazl.ZipFile();
    this.getStream = () => {
        return this._zip.outputStream;
{'fraction_non_alphanumeric': 0.15740015661707127, 'fraction_numerical': 0.0007830853563038371, 'mean_word_length': 3.168026101141925, 'pattern_counts': {'":': 0, '<': 3, '<?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': '184963', 'n_tokens_mistral': 778, 'n_tokens_neox': 763, 'n_words': 180}