
Security News
/Company News
Securing the Financial Frontier: How Capital One Uses Socket for Open Source Security
Capital One is partnering with Socket to proactively secure its open source supply chain.
demolishedcompressor
Advanced tools
demolishedcompressor pack's a javascript file into a PNG image with an HTML payload. When opened in a browser, the HTML extracts and executes the javascript.
demolishedCompressor pack's a .js/json/text file into a PNG image with an optinal HTML payload.
The default behavior is when a packed file opened in a browser the HTML is extracted and the javascript executes. This option (default) is designed to pack/compress 4k, 8k and 64k demos build using Javascript into one "executable".
By using the external/custom unpacker you can pack 1-n resources and take advantage of demolishedcompressor and its functionality.
npm install demolishedcompressor
Pngify(src:string,outputfile:string,html:string,useDefaultUnpacker:boolean)
export declare class Compressor {
static Pngify(src: string, dest: string, preHTML?: string, useScript?: boolean): void;
}
let instance = U.I();
instance.F("packedfile.png", (result) => {
// deal with the unpacked result
// i.e JSON.parse, eval etc.
});
declare class U {
u(i: HTMLImageElement, cb: (result: any) => {}): void;
F(file: string, cb: (result: any) => {}): void;
constructor();
static I(): U;
}
import { Compressor } from 'demolishedcompressor';
const html = '<p>replace this with your html</p>'
// packs foo.js into output.png.html
Compressor.Pngify("foo.js","output.png.html",html,true);
Compile and run the script
import { Compressor } from 'demolishedcompressor';
// packs /tiny/rawsong.json into tiny.png
let html = ``;
Compressor.Pngify("/tiny-efflux/rawsong.json","/tiny-efflux/tiny.png",html,false)
Compile and run the script
Below you find a short description of each example as well as links that lets you se the result.
This example uses demolishedPlayer (WebGL & GLSL Shader rendering engine), demolishedSynth (DSP/Procedual audio) and procedual textures created using demolishedTexture and GLSL Shader code and some custom markup.
Unpacked size 12173 bytes, packed result is 6235 without any major minification of code.
https://magnusthor.github.io/demolishedcompressor/example/output.png.html
Note , Click the canvas to start audio.
This example packs a song created using Efflux ( https://www.igorski.nl/application/efflux/ ) unpacks and plays the song.
https://magnusthor.github.io/demolishedcompressor/tiny-efflux/index.html
FAQs
demolishedcompressor pack's a javascript file into a PNG image with an HTML payload. When opened in a browser, the HTML extracts and executes the javascript.
We found that demolishedcompressor demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.

Security News
/Company News
Capital One is partnering with Socket to proactively secure its open source supply chain.

Security News
Socket CTO Ahmad Nassri discusses how to keep AI agents from bypassing package blocks, limit credential access, and monitor their actions.

Security News
GPT-6 Astra tried to plant malicious code in simulated open source projects using fake GitHub accounts and deceptive PRs during an assigned CTF challenge.