The formatted hex dumper is a configurable class that can dump hex in various formats. The default produced output is xxd compatible, though there are options to further adjust the output. One example is address prefixing, where base memory address of each line is used instead of an offset.
It is strongly recommended NOT to directly depend on this dump format; pw_hex_dump does NOT guarantee stability for the output format, but strives to remain xxd compatible.
Default:
Example 1: (32-bit machine, group_every=4, prefix_mode=kAbsolute, bytes_per_line = 8)
Example 2: (group_every=1, bytes_per_line = 16)
Example 3: (group_every=0, prefix_mode=kNone, show_header=false, show_ascii=false)
Classes | |
struct | Flags |
Public Types | |
enum | AddressMode { kDisabled = 0 , kOffset = 1 , kAbsolute = 2 } |
Public Member Functions | |
FormattedHexDumper (span< char > dest) | |
FormattedHexDumper (span< char > dest, Flags config_flags) | |
Status | SetLineBuffer (span< char > dest) |
Status | BeginDump (ConstByteSpan data) |
Status | DumpLine () |
Public Attributes | |
Flags | flags |