Skip to content

Instantly share code, notes, and snippets.

Dan Clarke danclarke

Block or report user

Report or block danclarke

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
danclarke / compress.js
Created Mar 20, 2017
Compress files in directory and sub directories using gzip and brotli
View compress.js
const brotli = require('brotli');
const zlib = require('zlib');
const fs = require('fs');
const path = require('path');
const compressDir = function (dir) {
console.log('Reading in: ' + dir);
fs.readdir(dir, function (err, files) {
if (err) {
console.error("Could not list the directory.", err);
You can’t perform that action at this time.