mirror of
https://github.com/TheBinaryNinja/tvapp2.git
synced 2026-06-09 18:15:41 -04:00
build: push tvapp v2 docker files
This commit is contained in:
22
node_modules/user-agents/src/gunzip-data.js
generated
vendored
Normal file
22
node_modules/user-agents/src/gunzip-data.js
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
import fs from 'fs';
|
||||
import { gunzipSync } from 'zlib';
|
||||
|
||||
|
||||
const gunzipData = (inputFilename) => {
|
||||
if (!inputFilename || !inputFilename.endsWith('.gz')) {
|
||||
throw new Error('Filename must be specified and end with `.gz` for gunzipping.');
|
||||
}
|
||||
const outputFilename = inputFilename.slice(0, -3);
|
||||
const compressedData = fs.readFileSync(inputFilename);
|
||||
const data = gunzipSync(compressedData);
|
||||
fs.writeFileSync(outputFilename, data);
|
||||
};
|
||||
|
||||
|
||||
if (!module.parent) {
|
||||
const inputFilename = process.argv[2];
|
||||
gunzipData(inputFilename);
|
||||
}
|
||||
|
||||
|
||||
export default gunzipData;
|
||||
Reference in New Issue
Block a user