minify-html/python/onepass
Wilson Lin e5307d4c9f 0.11.1 2023-05-07 19:34:04 +07:00
..
.cargo Create onepass variant for Python 2022-06-22 12:24:15 +10:00
src [Python] Fix ambiguous imports 2022-10-26 14:45:04 +11:00
.gitignore Create onepass variant for Python 2022-06-22 12:24:15 +10:00
Cargo.toml 0.11.1 2023-05-07 19:34:04 +07:00
README.md Create onepass variant for Python 2022-06-22 12:24:15 +10:00
minify_html_onepass.pyi Create onepass variant for Python 2022-06-22 12:24:15 +10:00
pyproject.toml Add python source distribution (#112) 2022-10-26 07:29:40 +11:00

README.md

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.