hexdump

package module
Version: v0.0.0-...-6506f41 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 27, 2019 License: MIT Imports: 4 Imported by: 1

README

hexdump

Hex dumping utility function for Go.

Documentation

Overview

Package hexdump provides utility functions to display binary slices as hex and printable ASCII.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dump

func Dump(buf []byte) string

Dump the byte slice to a human-readable hex dump using the default configuration.

Types

type Config

type Config struct {
	// Number of bytes from the input buffer to print in a single row. The default
	// is 32.
	Width int
}

Config allows customizing the dump configuration.

func (Config) Dump

func (c Config) Dump(data []byte) string

Dump converts the byte slice to a human-readable hex dump.

func (Config) Stream

func (c Config) Stream(in io.Reader, out io.Writer) error

Read will read from the input io.Reader and write human-readable, formatted hexdumps (with color annotations) to the output. The entire input reader is consumed. Any errors other than io.EOF are returned.

Source Files

Directories

Path Synopsis
Hexdumper is a utility to dump binary files as hex (and ASCII).
Hexdumper is a utility to dump binary files as hex (and ASCII).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL