It seems also that we could provide a Resource#getAttribute(String,boolean) in order to decode or encode.