simplified compress/uncompress