(assoc-ordered a-map key val & rest)
assoc into an array-map, keeping insertion order. The normal clojure assoc function switches to hash maps on maps > size 10 and loses insertion order
assoc into an array-map, keeping insertion order. The normal clojure assoc function switches to hash maps on maps > size 10 and loses insertion order
(byte->ascii byte)
convert a byte to 'printable' ascii where possible, otherwise .
convert a byte to 'printable' ascii where possible, otherwise .
(bytes->hex bytes)
converts a byte array to a hex string
converts a byte array to a hex string
(get-dump-bytes x offset size)
utility function - return byte array from offset offset and with size size for nio ByteBuffer, netty ByteBuf, byte array, and String
utility function - return byte array from offset offset and with size size for nio ByteBuffer, netty ByteBuf, byte array, and String
(hex-dump x
&
{:keys [offset size print frame]
:or {offset 0 print true frame true}})
Create hex dump. Accepts byte array, java.nio.ByteBuffer, io.netty.buffer.ByteBuf, or String as first argument. Offset will start the dump from an offset in the byte array, size will limit the number of bytes dumped, and frames will print a frame around the dump if true. Set print to true to print the dump on stdout (default) or false to return it as a string. Example call: (hex-dump (byte-array (range 200)) :print false)
Create hex dump. Accepts byte array, java.nio.ByteBuffer, io.netty.buffer.ByteBuf, or String as first argument. Offset will start the dump from an offset in the byte array, size will limit the number of bytes dumped, and frames will print a frame around the dump if true. Set print to true to print the dump on stdout (default) or false to return it as a string. Example call: (hex-dump (byte-array (range 200)) :print false)
cljdoc builds & hosts documentation for Clojure/Script libraries
Ctrl+k | Jump to recent docs |
← | Move to previous article |
→ | Move to next article |
Ctrl+/ | Jump to the search field |