implement compress
add example