There’s a little sample here, only for writing, though; the whole top of the doc is file-centric, but I got tired of that and decided on a memory-rather-than-file destination for the Writer demonstration. I think it’s pretty easy to see, from that, how to go both ways. Of interest, perhaps: when the writer is .fixed(&buf) (memory destination), there is no need to .flush(), of course. It’s a no-op (but may be best left in the code so that when you swap a file in, rather than memory, all should still work).