<commit_before>tarball-extract
===============

A simple tarball download and extraction lib for node.

## Install

    npm install tarball-extract

## method: extractTarball(sourceFile, destination, callback)
Extracts a tar file using **node-tar**. If the file ends in a **.tgz** or a **tar.gz** gzip will be used to deflate it before passing the stream to tar.

    var tarball = require('tarball')
    tarball.extractTarball('/tmp/test.tar', '/tmp/test', function(err){
      if(err) console.log(err)
    })

## method: extractTarballDownload(url, downloadFile, destination, options, callback)
Download a tarball from a **url** and automatically extract it. 

    var tarball = require('./tarball')
    url = 'http://example.com/testfile.tar.gz'
    tarball.extractTarballDownload(url , '/tmp/testfile.tar.gz', '/tmp/testfile', {}, function(err, result) {
      console.log(err, result)
    })

When the download is complete the callback is passed (err, info).

    { url: 'http://example.com/testfile.tar.gz',
      downloadFile: '/tmp/testfile.tar.gz',
      destination: '/tmp/testfile' }
<commit_msg>Updated bad module name in README.md<commit_after>tarball-extract
===============

A simple tarball download and extraction lib for node.

## Install

    npm install tarball-extract

## method: extractTarball(sourceFile, destination, callback)
Extracts a tar file using **node-tar**. If the file ends in a **.tgz** or a **tar.gz** gzip will be used to deflate it before passing the stream to tar.

    var tarball = require('tarball-extract')
    tarball.extractTarball('/tmp/test.tar', '/tmp/test', function(err){
      if(err) console.log(err)
    })

## method: extractTarballDownload(url, downloadFile, destination, options, callback)
Download a tarball from a **url** and automatically extract it. 

    var tarball = require('tarball-extract')
    url = 'http://example.com/testfile.tar.gz'
    tarball.extractTarballDownload(url , '/tmp/testfile.tar.gz', '/tmp/testfile', {}, function(err, result) {
      console.log(err, result)
    })

When the download is complete the callback is passed (err, info).

    { url: 'http://example.com/testfile.tar.gz',
      downloadFile: '/tmp/testfile.tar.gz',
      destination: '/tmp/testfile' }

{'fraction_non_alphanumeric': 0.1461572634384718, 'fraction_numerical': 0.0, 'mean_word_length': 3.843010752688172, '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': 14, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7670217', 'n_tokens_mistral': 691, 'n_tokens_neox': 674, 'n_words': 205}