Bindings for the hexa library (search for libhexa in Baguette).
Go to file
2024-06-21 13:28:45 +02:00
examples Hexa bindings: first commit. 2024-06-21 13:28:45 +02:00
src Hexa bindings: first commit. 2024-06-21 13:28:45 +02:00
.gitignore Hexa bindings: first commit. 2024-06-21 13:28:45 +02:00
makefile Hexa bindings: first commit. 2024-06-21 13:28:45 +02:00
README.md Hexa bindings: first commit. 2024-06-21 13:28:45 +02:00
shard.yml Hexa bindings: first commit. 2024-06-21 13:28:45 +02:00

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:

    dependencies:
      hexa:
        branch: master
        git: https://git.baguette.netlib.re/Baguette/hexa.cr.git
    
  2. Run shards install

Usage

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