middleout.js
Version:
A spoof compression library that pretends to revolutionize data compression using made-up algorithms — inspired by the legendary middle-out compression from Silicon Valley
13 lines (11 loc) • 579 B
TypeScript
/**
* Calculates a spoofed Weissman Score for a given compression.
*
* @param algorithm - The name of the algorithm used.
* @param originalSize - Size of the input string before compression.
* @param compressedSize - Size after compression.
* @param targetWeissman - The desired spoofed "ideal" score (optional).
* @returns A fake Weissman score that rewards better compression and tunes toward a target.
*/
declare function getWeissmanScore(algorithm: string, originalSize: number, compressedSize: number, targetWeissman?: number): number;
export { getWeissmanScore };