bytedump-1.0: Flexible byte dump helpers for human readers.

Portabilityunknown
Stabilityexperimental
MaintainerVincent Hanquez <vincent@snarc.org>
Safe HaskellSafe-Infered

Text.Bytedump

Contents

Description

A module containing some routines to debug data dump

Synopsis

Documentation

hexString :: Word8 -> StringSource

Dump one byte into a 2 hexadecimal characters.

Formatted string configuration

data BytedumpConfig Source

Configuration structure used for formatting functions

Constructors

BytedumpConfig 

Fields

configRowSize :: Int

number of bytes per row.

configRowGroupSize :: Int

number of bytes per group per row.

configRowGroupSep :: String

string separating groups.

configRowLeft :: String

string on the left of the row.

configRowRight :: String

string on the right of the row.

configCellSep :: String

string separating cells in row.

configPrintChar :: Bool

if the printable ascii table is displayed.

defaultConfig :: BytedumpConfigSource

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] -> StringSource

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

dumpRawS :: String -> StringSource

Dump a string into a raw string of hex value

dumpRawBS :: ByteString -> StringSource

Dump a bytestring into a raw string of hex value

dumpRawLBS :: ByteString -> StringSource

Dump a lazy bytestring into a raw string of hex value

Dump bytes into formatted strings using a specific config

dumpWith :: BytedumpConfig -> [Word8] -> StringSource

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

dumpWithS :: BytedumpConfig -> String -> StringSource

Dump a string into formatted strings using a specific config

dumpWithBS :: BytedumpConfig -> ByteString -> StringSource

Dump a bytestring into formatted strings using a specific config

dumpWithLBS :: BytedumpConfig -> ByteString -> StringSource

Dump a lazy bytestring into formatted strings using a specific config

Dump bytes into formatted strings using default config

dump :: [Word8] -> StringSource

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

dumpS :: String -> StringSource

Dump a string into a formatted string of hex value

dumpBS :: ByteString -> StringSource

Dump a bytestring into a formatted string of hex value

dumpLBS :: ByteString -> StringSource

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] -> StringSource

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

dumpDiffS :: String -> String -> StringSource

Dump a string into a formatted string of hex value

dumpDiffBS :: ByteString -> ByteString -> StringSource

Dump a bytestring into a formatted string of hex value

dumpDiffLBS :: ByteString -> ByteString -> StringSource

Dump a lazy bytestring into a formatted string of hex value