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

#403 in Compression

Download history 110/week @ 2024-01-01 241/week @ 2024-01-08 103/week @ 2024-01-15 117/week @ 2024-01-22 68/week @ 2024-01-29 107/week @ 2024-02-05 141/week @ 2024-02-12 112/week @ 2024-02-19 229/week @ 2024-02-26 119/week @ 2024-03-04 159/week @ 2024-03-11 121/week @ 2024-03-18 98/week @ 2024-03-25 175/week @ 2024-04-01 109/week @ 2024-04-08 131/week @ 2024-04-15

522 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
~189K SLoC