This repository has been archived on 2025-10-15. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
minify-html/rust/onepass/README.md
Wilson Lin b6a0a9102e 0.10.3
2022-10-28 11:16:02 +11:00

1.3 KiB

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.