compound-binary-file-js
Version:
This is an implementation of [Compound Binary File v.3](https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-cfb/53989ce4-7b05-4f8d-829b-d08d6148375b) \ Allows reading existing files, creation of the/write operation
30 lines (27 loc) • 821 B
text/typescript
import {Event} from "benchmark";
import {CompoundFile, initializedWidth} from "../src";
const Benchmark = require('benchmark');
const suite = new Benchmark.Suite("test copy performance", {
minSamples: 10,
maxTime: 60
});
const streamsToCreate: number[] = [];
for (let i = 0; i < 10; i++) {
initializedWidth(4096, i);
}
// add tests
suite.add('RegExp#test', function() {
const compoundFile = new CompoundFile();
for (const streamBytes of streamsToCreate) {
}
// /o/.test('Hello World!');
})
// add listeners
.on('cycle', function(event: Event) {
console.log(String(event.target));
})
.on('complete', function() {
console.log('Fastest is ' + this.filter('fastest').map('name'));
})
// run async
.run({ 'async': true });