   (println (format "body->h: '%s' '%s'" body (first body)))
   (first body))
 
-
-
 (defn h->b [hd] 
   "Called when decoding. Determines how to construct the body."
   (println (format "header h->b: '%s'" hd))
     (case hd
-      "gets" GETS
-      "get"  GET
-      "set" SET
-      "VALUE" VALUE
+      "gets"   GETS
+      "get"    GET
+      "set"    SET
+      "VALUE"  VALUE
       "STORED" STORED
-      "END" END
+      "END"    END
           ERRC))
-
-
 
 (defn b->h 
   "Called when encoding. Determines the header that is generated."

  (println (format "b->h '%s'" body))
  (first body))

(defn memcache-pre-encode [req]
  (println (format "memcache-pre-encode '%s'" req))
  req)

(defn memcache-post-decode [res]
  (println (format "memcache-post-decode '%s'" res))
  res)

(defcodec MEMCACHE (compile-frame 
                     (header CMD h->b b->h)


;get <key>*\r\n
;gets <key>*\r\n
(defcodec GET ["get" CR])
(defcodec GETS ["gets" CR])

;VALUE <key> <flags> <bytes> [<cas unique>]\r\n<data block>\r\n
;VALUE <key> <flags> <bytes>\r\n<data block>\r\n
(defcodec VALUE ["VALUE" K V CR CR])

;END\r\n
(defcodec END ["END"])

(defcodec ERRC CR)

