Coder Social home page Coder Social logo

imagechans / data-encoding Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ia0/data-encoding

0.0 2.0 0.0 662 KB

Generic data encoding (base64, base32, hex, etc.) functions in Rust

License: MIT License

Makefile 0.78% Rust 92.22% Shell 7.00%

data-encoding's Introduction

Generic data encoding functions

Latest VersionLatest License Build Status Coverage Status

This crate provides generic encoding and decoding functions with instances for common bases (base64, base32, hex, etc.). It also provides a file encoding and decoding binary example exercising the library quite exhaustively.

About the library

The implementation is meant:

  • to guarantee mathematical properties,
  • to conform to RFC 4648 (base64, base32, hex, etc.),
  • to be efficient (wrt. the base64 GNU program), and
  • to give choice between allocating and in-place functions.

For more information, please refer to the documentation or to the changelog.

About the binary

The binary can be build with make encode. Here is its usage:

Usage: encode [<options>]

Options:
    -b, --base <name>   select base 2, 4, 8, 16 (or hex), 32, 32hex, 64, or
                        64url if <name> matches. Otherwise, build base using
                        the first character of <name> as padding and the
                        remaining characters as symbols in value order.
                        Default is 64.
    -d, --decode        decode data. Default is to encode data.
    -i, --input <file>  use <file> as input. Default is to use standard input.
    -o, --output <file> use <file> as output. Default is to use standard
                        output.
    -s, --skip          when decoding, skip newlines. Default is to accept
                        only well-formed input.
    -w, --wrap <cols>   when encoding, add newlines every <cols> characters
                        and at the end. Default is to produce well-formed
                        output.

Examples:
    encode
    encode -d
    encode -b32 -d -s
    encode -b=0123456789abcdef -w76

data-encoding's People

Contributors

frewsxcv avatar ia0 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.