add aif/aiff to compressable

This commit is contained in:
zefie
2021-08-13 01:30:52 -04:00
parent 3d5bddf653
commit bef2f9e248
2 changed files with 2 additions and 4 deletions

View File

@@ -74,7 +74,7 @@ class WTVMime {
if (compression_type == 2) { if (compression_type == 2) {
// gzip only // gzip only
if (content_type.match(/^audio\/(x-)?(s3m|mod|xm)$/)) compress_data = true; // s3m, mod, xm if (content_type.match(/^audio\/(x-)?(s3m|mod|xm)$/)) compress_data = true; // s3m, mod, xm
if (content_type.match(/^audio\/(x-)?(midi|wav|wave)$/)) compress_data = true; // midi & wav if (content_type.match(/^audio\/(x-)?(midi|wav|wave|aif(f)?)$/)) compress_data = true; // midi & wav
if (content_type.match(/^binary\/x-wtv-approm$/)) compress_data = true; // approms if (content_type.match(/^binary\/x-wtv-approm$/)) compress_data = true; // approms
if (content_type.match(/^binary\/doom-data$/)) compress_data = true; // DOOM WADs if (content_type.match(/^binary\/doom-data$/)) compress_data = true; // DOOM WADs
if (content_type.match(/^wtv\/download-list$/)) compress_data = true; // WebTV Download List if (content_type.match(/^wtv\/download-list$/)) compress_data = true; // WebTV Download List

View File

@@ -632,9 +632,7 @@ async function sendToClient(socket, headers_obj, data) {
case 2: case 2:
// zlib gzip implementation // zlib gzip implementation
headers_obj['Content-Encoding'] = 'gzip'; headers_obj['Content-Encoding'] = 'gzip';
data = zlib.gzipSync(data, { data = zlib.gzipSync(data);
'level': 9
});
break; break;
} }