Raynes/conch — pull request #16 by tommclaughlin (2014-06-27 09:20:49+00:00)
Title: Feature/binary support

Some programs write binary data to their stdout, and conch currently insists on mangling such output by interpreting it as string of characters. For example, the Graphviz `dot` program run with the `-Tpng` option writes the binary image data to stdout.

This PR adds the ability to enable binary support by passing `:binary true` as an option to `run-command`. When this option is enabled, the result is returned as a byte array. Similarly, when `:out` is `redirect`ed to a `File` or `Writer`, we write the raw bytes. This option seems to play well with `:seq true` and the various `:buffer` options, although mixing it with `:buffer :line` is clearly a bad idea.

I needed this to work with Graphviz, hope it can be merged into Conch!