I am not sure but you can try by implementing the interface HtmlLibraryManager. BTB do you see any issue with current yui compressor ? Just tying to understand your use case.
Oh, it's not a big deal, I just noticed that the YUI compressor doesn't seem to be as aggressive as whatever our front-end devs use when they manually minify files. Variables not getting renamed, etc
As Sham suggested, you can probably impelemnt the interface HTMLLbraryManager. I was trying something like that to use the google compiler based minification using rhino engine, but the yui-compressor.jar was interfering with the compiler.jar.
The yui-compressor.jar is for somereason part of another jar.