encoder: emit close event
decoder: remove unused properties
examples: use encoder close event