ansi-color-codec

Crates.ioansi-color-codec
lib.rsansi-color-codec
version0.7.0
sourcesrc
created_at2022-11-13 20:44:23.06873
updated_at2023-08-25 23:23:05.38279
descriptionEncode bytes as ANSI background colors
homepagehttps://github.com/conqp/ansi-color-codec/
repositoryhttps://github.com/conqp/ansi-color-codec/
max_upload_size
id714501
size26,403
Richard Neumann (conqp)

documentation

https://docs.rs/ansi-color-codec

README

ansi-color-codec

Encode arbitrary byte sequences with ANSI background colors.

showcase.webm

Usage

You can use the program as a library or as a command line utility.

Library

The library provides a trait ColorCodec<T> that allows arbitrary byte iterators (Iterator<Item = u8>) to encode their bytes as ANSI background color codes or decode them back again. Therefor the trait provides the functions encode() and decode().

Command line utility

You can encode bytes or decode color codes by passing them to ansi-color-codec's STDIN:

$ echo "I use Arch btw" | ansi-color-codec
$ echo "I use Arch btw" | ansi-color-codec | ansi-color-codec -d

For more options, see ansi-color-codec -h.

Commit count: 250

cargo fmt