News for hackers. Stuff that matters.
Re:CSSnano by a-french-anon on Monday September 16, 2024 @08:57AM (#41555609)
Eh, even on this example, most of the gains come from simply removing the comments (something that can easily be done with `cpp -E -P <in.css >out_cpp.css` or regexps since CSS doesn't allow comment nesting) on most UNIXes.

Here's a more complete result adding brotli and the aforementioned cpp version:

  $ gdu -b *.css *.css.gz *.css.br | awk '{if (NR % 3 == 1) {ref = $1; print} else print $0, "(" $1 - ref ")"}'
  623 in.css
  197 out.css (-426)
  355 out_cpp.css (-268)
  345 in.css.gz
  185 out.css.gz (-160)
  235 out_cpp.css.gz (-110)
  284 in.css.br
  141 out.css.br (-143)
  177 out_cpp.css.br (-107)
Re:CSSnano by sionisrecur on Monday September 16, 2024 @12:19PM (#41557675)
cpp as in a C preprocesor? That's a neat trick. I guess it removes what looks like /* comments */ and leaves the rest alone?