implement of compress program with c++