This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const zlib = require('zlib'); | |
const fs = require('fs'); | |
const { performance } = require('perf_hooks'); | |
const filePath = './output.fixture.json'; // Change this to your file | |
const outputPath = './compressed.br'; | |
// Weight for time and size in the calculation. Must be between 0 and 1. | |
const timeWeight = 0.5; // weight for time | |
const sizeWeight = 1 - timeWeight; // weight for size |
OlderNewer