I'm curious, who here has a development workflow such that compressing/minifying code via an ad-hoc web tool makes sense? I've always just included it as part of a build process, or at the very least would pipe it into uglifyjs command line. I'm sure everyone's got their own needs but I just don't understand how that would be useful.
Anybody interested in this might be interested in CyberChef [1].<p>[1] <a href="https://gchq.github.io/CyberChef/" rel="nofollow">https://gchq.github.io/CyberChef/</a>
Current list of tools: html, css, js compressor, image to base64, json to csv, csv to json, OCR Reader, unzipper (browser only).
Built with react.js (next.js framework) and node.js. Uses some open source packages.
What is the HTML compressor using? It’s missing quite a few opportunities.<p>Take this input HTML:<p><pre><code> <!doctype html>
<html lang="en-au">
<head>
<meta charset="utf-8">
<title>This is a title</title>
</head>
<body class="foo">
<h1>Well.</h1>
<p>I wonder…</p>
</body>
</html>
</code></pre>
It produces this output:<p><pre><code> <!DOCTYPE html><html lang="en-au"><head><meta charset="utf-8"><title>This is a title</title></head><body class="foo"><h1>Well.</h1><p>I wonder…</p></body></html>
</code></pre>
It converted “doctype” to uppercase (equivalent, but bad for compression). It didn’t strip <head> and </head> as superfluous. It didn’t remove unnecessary quotes around attribute values. It didn’t remove the unnecessary </p></body></html> closing tags.<p>Here’s what I say it should have emitted:<p><pre><code> <!doctype html><html lang=en-au><meta charset=utf-8><title>This is a title</title><body class=foo><h1>Well.</h1><p>I wonder…
</code></pre>
30 characters shorter, and structurally equivalent.
Looks neat! My one critique is the Contact Us link. I find unexpected mailto: links annoying because they cause my desktop mail client (which I don't use) to open unexpectedly when I'm expecting to be taken to a page, in this case a Contact Us page.
maybe it's just me but i feel like using of any of these "tools" would slow me down when compared to using the equivalent shell-foo or a language built-in/library.<p>also seems like a terribly brittle externality to add to my life
In my bookmarks I have HTML encode/decode and URL encode/decode. Have you considered creating a single input and single output field with different buttons around?