1.1.0 • Published 4 years ago

@vivaxy/vlq v1.1.0

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

@vivaxy/vlq

Build Status NPM Version NPM Downloads MIT License Standard Version Codecov

Install

yarn add @vivaxy/vlq or npm i @vivaxy/vlq

Usage

import { encode, decode } from '@vivaxy/vlq';
// encode
encode(0);
// decode
decode('A');

API

encode(input: number | number[]): string

decode(input: string): number[]

Benchmark

decode

vlq#decode x 1,103,260 ops/sec ±0.62% (91 runs sampled)

@vivaxy/vlq#decode x 1,935,656 ops/sec ±0.47% (95 runs sampled)

Fastest is @vivaxy/vlq#decode

encode

vlq#encode x 4,445,119 ops/sec ±0.91% (91 runs sampled)

@vivaxy/vlq#encode x 3,454,481 ops/sec ±0.76% (92 runs sampled)

Fastest is vlq#encode

Related Projects

(Project created by create-n.)