make WPP decoding robust against stream errors
remove redundant code
update README
several fixes to make it more robust to errors in headers