44 releases

0.16.4 Mar 22, 2025
0.15.0 Dec 24, 2023
0.11.1 May 7, 2023
0.10.8 Jan 31, 2023
0.7.0 Nov 12, 2021

#667 in Compression

Download history 60/week @ 2025-03-03 144/week @ 2025-03-10 553/week @ 2025-03-17 225/week @ 2025-03-24 74/week @ 2025-03-31 84/week @ 2025-04-07 92/week @ 2025-04-14 116/week @ 2025-04-21 160/week @ 2025-04-28 83/week @ 2025-05-05 159/week @ 2025-05-12 77/week @ 2025-05-19 65/week @ 2025-05-26 29/week @ 2025-06-02 84/week @ 2025-06-09 96/week @ 2025-06-16

290 downloads per month
Used in 10 crates (5 directly)

MIT license

140KB
3.5K SLoC

minify-html-onepass

An HTML minifier that provides the functionality of minify-html with much more performance, but with stricter parsing and less configurability.

  • Uses the same advanced minification strategy.
  • Minifies in one pass with zero memory allocations.
  • Outputs in place; no copy or buffer required.

Performance

Chart showing speed of HTML minifiers

Usage

The API is different compared to minify-html; refer to per-package documentation for more details.

If you don't see your preferred language here and the main library supports it, raise an issue.

Parsing

In addition to the minify-html rules, the onepass variant has additional requirements:

  • Opening tags must not be omitted.
  • Invalid closing tags are not allowed.
  • The document cannot end unexpectedly.

Dependencies

~14MB
~204K SLoC