Skip to content
This repository was archived by the owner on May 24, 2024. It is now read-only.
/ vlq Public archive

🔣Decode and encode Base64 VLQ.

License

Notifications You must be signed in to change notification settings

vivaxy/vlq

Folders and files

NameName
Last commit message
Last commit date

Latest commit

6416563 · May 24, 2024

History

42 Commits
May 24, 2024
Feb 18, 2021
Mar 7, 2020
Mar 8, 2020
Mar 7, 2020
Mar 7, 2020
Mar 7, 2020
Mar 7, 2020
Mar 7, 2020
Mar 7, 2020
Mar 7, 2020
Mar 7, 2020
Mar 7, 2020
Apr 10, 2023
Mar 7, 2020
Apr 10, 2023
Mar 7, 2020
Feb 18, 2021
May 9, 2020
Mar 7, 2020
Feb 18, 2021

Repository files navigation

@vivaxy/vlq

Build Status NPM Version NPM Downloads MIT License Standard Version Codecov DOI

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