add compress/uncompress functions