Testing and slight refactor of compression.js.

I don't like the interface for that at the moment, may move to a more
connect-like signature for the external contact point.