Code Monkey home page Code Monkey logo

base85-arraybuffer's Introduction

base85-arraybuffer

Base85 encoding and decoding using ArrayBuffers with no external dependencies and can be run outside NodeJS.

Prerequisites

Your JavaScript engine should support ArrayBuffers. Most modern browsers support this, as well as NativeScript, Node.JS and more.

Installation

npm install base85-arraybuffer --save

Usage

Use

Usage code snippets here

API

encode

Encode an ArrayBuffer or ArrayBufferView (like Uint8Array or other Typed Arrays)

encode(data: ArrayBuffer | ArrayBufferView, options?: Base85Options): string;

encodeString

Encodes a UTF-8 string

encodeString(data: string, options?: Base85Options): string;

decode

Decodes a Base85-encoded string to an ArrayBuffer.

decode(data: string, options?: Base85Options): ArrayBuffer;

decodeString

Decodes a Base85-encoded string to a UTF-8 string

decodeString(data: string, options?: Base85Options): string;

Base85Options

Property Default Description
variant Defaults to ascii85 The encoding variant to use. Possible values are ascii85 and z85
zeroesAsZ false Should a group of all zeroes be encoded as a single z (ascii85 only)
spacesAsY false Should a group of all spaces be encoded as a single y (ascii85 only)

License

base85-arraybuffer is licensed under the MIT license.

base85-arraybuffer's People

Contributors

ulvesked avatar

Watchers

 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.