Add addPackHandler and addUnpackHandler to set custom handler. fix #4