Skip to content

AntonMeep/ecoji-d

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ecoji-d 👦🔉🦐🔼🍽🔓☕☕ Page on DUBLicenseBuild Status TravisCI

ecoji-d implements Ecoji encoding standard using the D programming language.

Ecoji-d encodes data as base1024 but with emoji character set.

Usage

ecoji-d can be used both as a library or as a CLI utility, in both cases D compiler and dub are required:

As a library

Installation

You can find ecoji-d on the D package registry.

API

API consists of 2 modules:

  1. ecoji.d.encode, which provides encoding functionality
  2. 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.

As a CLI utility

Installation

$ dub fetch ecoji-d

Usage

$ 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.

About

Encodes and decodes data as emojis

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages