39 releases (9 breaking)

0.15.0 Dec 24, 2023
0.13.3 Dec 24, 2023
0.11.1 May 7, 2023
0.10.8 Jan 31, 2023
0.7.0 Nov 12, 2021

#404 in Compression

Download history 179/week @ 2024-01-10 109/week @ 2024-01-17 121/week @ 2024-01-24 55/week @ 2024-01-31 102/week @ 2024-02-07 156/week @ 2024-02-14 153/week @ 2024-02-21 199/week @ 2024-02-28 111/week @ 2024-03-06 167/week @ 2024-03-13 111/week @ 2024-03-20 119/week @ 2024-03-27 140/week @ 2024-04-03 134/week @ 2024-04-10 105/week @ 2024-04-17 80/week @ 2024-04-24

490 downloads per month
Used in 8 crates (3 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
~188K SLoC