The library defines two protocols, ByteSource and ByteSink. They expose a 'take-bytes!' and 'send-bytes!' method, respectively. An unoptimized transfer involves shuttling bytes between these two methods, which in most cases means one copy and one allocation (ByteBuffer can act as a ByteSource and requires neither).
An optimized transform is anything which short-circuits this default mechanism. Unfortunately, exactly how optimal this is depends heavily on what you're transferring. Copying a File to a Channel representing a file descriptor will often use OS-provided zero copy mechanisms, which makes it a lot more "optimal" than the optimized transfer between an InputStream and an OutputStream, which just involves reusing an array for shuttling data between them. Basically, 'optimized-transfer?' returning true means that a special function exists that is as optimal as I (or someone else who's written a def-transfer) know how to make it.
The number of steps is definitely not the number of copies. Wrapping an array in a ByteArrayInputStream, for instance, is just allocating a wrapper. Some are more complicated though; creating an array from a ByteBuffer is only zero-copy if the ByteBuffer is non-direct *and* the position and limit haven't been moved. Right now my traversal is treating each transform as equally complex, but an obvious improvement is to allow each transform to be annotated with some sort of overhead metric, and minimize based on that. A lot of the low-level optimizations are implementation-specific, though, so it's always going to be a little fuzzy.
If you have ideas on any of the above, please speak up.
Zach