Implementing some compression functions (some made up, some existing)