ecoji-d implements Ecoji encoding standard using the D programming language.
Ecoji-d encodes data as base1024 but with emoji character set.
ecoji-d can be used both as a library or as a CLI utility, in both cases D compiler and dub are required:
You can find ecoji-d on the D package registry.
API consists of 2 modules:
- ecoji.d.encode, which provides encoding functionality
- ecoji.d.decode, which provides decoding functionality
You can import modules individally or import ecoji.d which will do this for you:
import ecoji.d;Once it is imported you can call functions of ecoji-d:
auto encode(Range)(Range r) if(isInputRange!Range && is(ElementType!Range : ubyte));This function takes a range of ubytes or chars and returns a range of dchars.
auto decode(Range)(Range r) if(isInputRange!Range && is(ElementType!Range : dchar));This functions takes a range of dchars and returns a range of ubytes.
Both encoding and decoding happen lazily which decreases memory consumption and increases speed.
$ dub fetch ecoji-d
$ dub run ecoji-d -- [OPTIONS] [FILES]
Usage: ./ecoji-d [OPTIONS] [FILES]
-e --encode Encode data (default).
-d --decode Decode data.
-o --output Output file (default: stdout).
-h --help This help information.
If no input file is specified, stdin is used.