use size_t during compression
add a toplevel compress_ptr function