hexa.cr/README.md

38 lines
745 B
Markdown

# hexa
Bindings to `libhexa` to produce hexadecimal dumps of arbitrary input bytes.
This prints debug info in a pretty way.
## Installation
1. Add the dependency to your `shard.yml`:
```yaml
dependencies:
hexa:
branch: master
git: https://git.baguette.netlib.re/Baguette/hexa.cr.git
```
2. Run `shards install`
## Usage
```crystal
require "hexa"
h = Hexa.new 5_000 # Size of the output buffer.
# First, an hexadecimal dump of a small text.
text = "hello this is some text" # could be Bytes
puts h.dump text
# With a centered title on the first line.
title = "itz mai title lul"
puts h.dump title, text
```
## Contributors
- [Philippe PITTOLI](https://github.com/your-github-user) - creator and maintainer