   "An encoder converts values to binary sequences and writes the results to an
   output stream."
 
-  (encode-to
-    [codec output value]
+  (encode
+    [codec ^java.io.OutputStream output value]
     "Write the value as a sequence of bytes to the output stream. Returns the
     number of bytes written."))
 

(defprotocol Decoder
  "A decoder reads binary sequences and interpretes them as Clojure values."

  (decode-from
    [codec input]
    "Reads bytes from the input stream and returns the read value."))




  Encoder

  (encode
    [this output value]
    ; TODO: select encoder, write out header, use codec to write value
    nil)
