[data-uri] add decoding support; better API; no extra trailing newline in output