bytedump-1.0: Flexible byte dump helpers for human readers.
LicenseBSD-style
MaintainerVincent Hanquez <vincent@snarc.org>
Stabilityexperimental
Portabilityunknown
Safe HaskellSafe-Inferred
LanguageHaskell98

Text.Bytedump

Description

A module containing some routines to debug data dump

Synopsis

Documentation

hexString :: Word8 -> String Source #

Dump one byte into a 2 hexadecimal characters.

Formatted string configuration

data BytedumpConfig Source #

Configuration structure used for formatting functions

Constructors

BytedumpConfig 

Fields

defaultConfig :: BytedumpConfig Source #

Default Config using 16 bytes by row with a separation at the 8th byte, and dumping printable ascii character on the right.

Dump bytes into not formatted strings

dumpRaw :: [Word8] -> String Source #

Dump a list of word8 into a raw string of hex value

dumpRawS :: String -> String Source #

Dump a string into a raw string of hex value

dumpRawBS :: ByteString -> String Source #

Dump a bytestring into a raw string of hex value

dumpRawLBS :: ByteString -> String Source #

Dump a lazy bytestring into a raw string of hex value

Dump bytes into formatted strings using a specific config

dumpWith :: BytedumpConfig -> [Word8] -> String Source #

Dump a list of bytes into formatted strings using a specific config

dumpWithS :: BytedumpConfig -> String -> String Source #

Dump a string into formatted strings using a specific config

dumpWithBS :: BytedumpConfig -> ByteString -> String Source #

Dump a bytestring into formatted strings using a specific config

dumpWithLBS :: BytedumpConfig -> ByteString -> String Source #

Dump a lazy bytestring into formatted strings using a specific config

Dump bytes into formatted strings using default config

dump :: [Word8] -> String Source #

Dump a list of word8 into a formatted string of hex value

dumpS :: String -> String Source #

Dump a string into a formatted string of hex value

dumpBS :: ByteString -> String Source #

Dump a bytestring into a formatted string of hex value

dumpLBS :: ByteString -> String Source #

Dump a lazy bytestring into a formatted string of hex value

Dump 2 set of bytes into formatted side-by-side strings using default config

dumpDiff :: [Word8] -> [Word8] -> String Source #

Dump two list of word8 into a formatted string of hex value side by side

dumpDiffS :: String -> String -> String Source #

Dump a string into a formatted string of hex value

dumpDiffBS :: ByteString -> ByteString -> String Source #

Dump a bytestring into a formatted string of hex value

dumpDiffLBS :: ByteString -> ByteString -> String Source #

Dump a lazy bytestring into a formatted string of hex value