
Product
Socket for Asana Is Now Available
Create and manage Asana tasks directly from Socket alerts, with manual task creation, automated ticketing rules, and two-way sync.
html-compress-api
Advanced tools
Simple JS package to compress HTML data (optionally into a dataURI).
To use the package, start by importing it using:
const { compress } = require("html-compress-api")
The package offers two ways of compressing the data:
This will compress the HTML into a compressed self-extracting HTML file (using a script tag):
const sample = "<body>This is a test</body>"
const { compressed, bytes_saved } = compress(sample, "html")
This will compress the HTML into the compressed self-extracting first and then convert it into a dataURI. This mode is useful for fitting HTML pages into QR codes.
const sample = "<body>This is a test</body>"
const { compressed, bytes_saved } = compress(sample, "dataURI")
The compressor only works well on data over ~300 bytes, otherwise it may increase the size of the data.
The package first compresses the HTML data using raw-deflate, then encoded to base64 and finally packed it into a tiny decompressor.
FAQs
A simple API to compress HTML
We found that html-compress-api 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.

Product
Create and manage Asana tasks directly from Socket alerts, with manual task creation, automated ticketing rules, and two-way sync.

Security News
Open VSX has removed three extension IDs from its malicious-extension list as the legitimate publishers they impersonated move to claim the names for themselves.

Product
Socket’s PHP and Composer support is now in Beta for all customers, with PHP reachability analysis generally available.