(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 is a website building & hosting documentation for Clojure/Script libraries
× close