File: README

package info (click to toggle)
hare 0.25.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,948 kB
  • sloc: asm: 1,264; makefile: 123; sh: 114; lisp: 101
file content (15 lines) | stat: -rw-r--r-- 748 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
hex: hexadecimal encoding and decoding support

A stream-based encoding and decoding interface is available via [[newencoder]]
and [[newdecoder]], which transparently encode or decode bytes to or from
hexadecimal representation when writing to or reading from an underlying I/O
handle.

Convenience functions for encoding a byte slice into a hexadecimal string or
decoding from a string into a byte slice are also available; see [[encodestr]]
and [[decodestr]]. These functions dynamically allocate their return values; use
the stream interface if you require static allocation.

Note that writes are always encoded as lowercase hexadecimal characters, but the
functions in this module can decode both upper- and lower-case hexadecimal
characters.