Tons of fixes around compression (rev. 17_b12) 

Signed-off-by: nixnodes <code@eth.si>