Roadroller compression library can make use of shared presets for better compression, but it is unclear how to leverage presets in the generated decoder. I have considered two possibilities:
Since the decoder itself is a sizable JS code, it can in principle double as a preset. Indeed in my testing giving the decoder as a preset resulted in 20--30B improvements for samples, but it was less than what I hoped for and the additional decoder size won't make it.
WebGL is highly standardized and versioned so we can in principle extract a list of identifiers out of WebGLRenderingContext as a context. But the actual list varied across browsers, and the WebGL spec doesn't prevent WebGLRenderingContext being amended anyway, so it was deemed unsafe.
Roadroller compression library can make use of shared presets for better compression, but it is unclear how to leverage presets in the generated decoder. I have considered two possibilities: