Commit Graph

9 Commits

Author SHA1 Message Date
Laurence Withers 19b2560e2d cmd/htpacker: swap out progress bar library
Switch to a simpler progress bar library. I've been having trouble tracking
down a panic that seemed to affect the prior code; the new code is much
easier and uses far fewer async channels and things.
2024-08-24 09:54:25 +01:00
Laurence Withers 439bf2422b cmd/htpacker: don't try to compress tiny files
If we have some really tiny files, it's not worth compressing them. Among other things,
this will work around a bug in go-zopfli for 0- or 1-byte files.
2023-04-28 15:57:28 +01:00
Laurence Withers 1b84160dcf cmd/htpacker: cope with zero-length input files
Sometimes we might be asked to serve up a zero-length input file,
typically from some machine-generated CSS etc. We make some very
rudimentary guess about the content-type the caller wanted and skip the
mmap(2) call.
2020-04-02 12:33:04 +01:00
Laurence Withers 6f532296ef Add CLI progress bars to the packer tool
Since packing can be quite slow, it is nice to display progress to the
caller. We use the excellent github.com/vbauerster/mpb library to do so,
and add a bit of colour with github.com/logrusru/aurora.

Finally, augment the inspector and packer with a summary printer that
displays the overall file size/count, and compression ratio for each
compression type.
2020-02-15 11:22:24 +00:00
Laurence Withers 984639d475 Finish porting child modules to src.lwithers.me.uk 2020-01-15 18:36:05 +00:00
Laurence Withers 280bf2b181 brotli CLI no longer takes --input argument 2019-12-10 15:03:41 +00:00
Laurence Withers e47ed4e4c2 cmd/htpacker now split into its own module 2019-04-12 09:15:28 +01:00
Laurence Withers ce6749f0a3 Workaround for splitting to multiple modules 2019-04-12 09:14:21 +01:00
Laurence Withers fdd1990e89 Reorganise ready to split into modules 2019-04-12 09:07:17 +01:00