framer: better compression methods

This fixes a couple of compression issues in framer.

Fixes #2