Updated compression logic for android 4.4 compression flush bug.