Skip to content

Instantly share code, notes, and snippets.

@ztellman
Forked from joshrotenberg/gist:1563014
Created January 5, 2012 00:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ztellman/1563018 to your computer and use it in GitHub Desktop.
Save ztellman/1563018 to your computer and use it in GitHub Desktop.
request
(compile-frame
(ordered-map
:req (string :utf-8 :length 4)
:type :int32
:data (string :utf-8 :prefix :int32))
(fn [x] (update-in x [:data] #(->> % (interpose "\0") (apply str))))
(fn [x] (update-in x [:data] #(seq (.split ^String % "\0")))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment