add compact method for Server
update doc