text: add Decode convenience function