implement decoder read and seek methods.