Skip to content

Commit

Permalink
fix(preprocessor): treat *.tgz, *.tbz2, *.txz & *.xz as binary
Browse files Browse the repository at this point in the history
Tarballs often use extensions joined with used compression, e.g. *.tgz instead
of *.tar.bz.

Also, there is a new xz lossless compression format that is slower but gives
better results than gzip or bzip2.
  • Loading branch information
mgol committed Aug 6, 2014
1 parent f2a1905 commit 7b64244
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/preprocessor.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ var isBinary = Object.create(null);
'movie', 'smv', 'bmp', 'cgm', 'g3', 'gif', 'ief', 'jpg', 'jpeg', 'ktx', 'png', 'btif',
'sgi', 'tiff', 'psd', 'uvi', 'sub', 'djvu', 'dwg', 'dxf', 'fbs', 'fpx', 'fst', 'mmr',
'rlc', 'mdi', 'wdp', 'npx', 'wbmp', 'xif', 'webp', '3ds', 'ras', 'cmx', 'fh', 'ico', 'pcx', 'pic',
'pnm', 'pbm', 'pgm', 'ppm', 'rgb', 'tga', 'xbm', 'xpm', 'xwd', 'zip', 'rar', 'tar', 'bz2', 'eot',
'ttf', 'woff', 'dat', 'nexe', 'pexe', 'epub', 'gz', 'mp3', 'ogg', 'swf'
'pnm', 'pbm', 'pgm', 'ppm', 'rgb', 'tga', 'xbm', 'xpm', 'xwd', 'xz', 'zip', 'rar', 'tar', 'tbz2',
'tgz', 'txz', 'bz2', 'eot', 'ttf', 'woff', 'dat', 'nexe', 'pexe', 'epub', 'gz', 'mp3', 'ogg',
'swf'
].forEach(function(extension) {
isBinary['.' + extension] = true;
});
Expand Down

0 comments on commit 7b64244

Please sign in to comment.