Updated compress.cpp. Complete implementation. **Testing Required**