Add api to set default decode format.

Fixes #177.