## 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:

```sh
webminifier path/to/html_or_css_file path/to/minified_file
```


### Library usage:

```c
#include <webminifier.h>

/*...*/
    char *input = "<html> ...";
    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 - &lt;frankendres@tuxfamily.org&gt; (disabled; use &lt;first@last.fr&gt;).

This software is governed by the [CeCILL-C license](http://cecill.info/licences/Licence_CeCILL-C_V1-en.html)
under French law, compatible with the LGPL (Lesser General Public License).
