<commit_before>'use strict';
var gzip = require('zlib').gzip;
var gzipSync = require('browserify-zlib').gzipSync;

module.exports = function (str, cb) {
	if (!str) {
		cb(null, 0);
		return;
	}

	gzip(str, function (err, data) {
		if (err) {
			cb(err, 0);
			return;
		}

		cb(err, data.length);
	});
};

module.exports.sync = function (str) {
	return gzipSync(str).length;
};<commit_msg>use maximum compression level - fixes #<commit_after>'use strict';
var gzip = require('zlib').gzip;
var gzipSync = require('browserify-zlib').gzipSync;

module.exports = function (str, cb) {
	if (!str) {
		cb(null, 0);
		return;
	}

	gzip(str, {level: 9}, function (err, data) {
		if (err) {
			cb(err, 0);
			return;
		}

		cb(err, data.length);
	});
};

module.exports.sync = function (str) {
	return gzipSync(str, {level: 9}).length;
};
{'fraction_non_alphanumeric': 0.19082125603864733, 'fraction_numerical': 0.007246376811594203, 'mean_word_length': 3.876470588235294, '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': '2687479', 'n_tokens_mistral': 354, 'n_tokens_neox': 324, 'n_words': 75}