(i)

WebMinifier - for HTML/CSS

WebMinifier action

Purpose

WebMinifier is HTML (HyperText Markup Language) and CSS (Cascading Style Sheets) minifier, available as a library and command line tool.

Minification removes comments and unneeded spaces (including tabs and newlines). HTML documents are keept well-formed if the source respects the XML (eXtended Markup Language) syntax. Embedded CSS is also minified.

It is written in C without any dependency.

Command line usage:

webminifier path/to/html_or_css_file path/to/minified_file

Library usage:

#include 

/*...*/
    char *input = " ...";
    char *output = (char *) malloc (strlen (input) * sizeof (char));
    if (output != NULL) {
        minify_html (input, output); //or minify_css
        printf ("%s", output);
        free (output);
    }
/*...*/

Compile with -lwebminifier (pkg-config --libs webminifier)

License

Copyright Frank ENDRES - 2022-12-12 - <frankendres@tuxfamily.org> (disabled; use <first@last.fr>).

This software is governed by the CeCILL-C license under French law, compatible with the LGPL (Lesser General Public License).