@kpv/encoder
TypeScript icon, indicating that this package has built-in type declarations

0.0.0-alpha.3 • Public • Published

@kpv/encoder

🚴 Installation

npm install @kpv/encoder

🚴 Usage

Vite

import url from "@kpv/encoder/web/kpv_encoder_bg.wasm?url";
import init, { encode_v0_0_1, decode_v0_0_1 } from "@kpv/encoder/web";

init(url).then(() => {
  const input = new Uint8Array(Array.from({ length: 9999 }, () =>
    Math.floor(Math.random() * 256)
  ));
  const bits = decode_v0_0_1(input);
  encode_v0_0_1(bits);
});

Node.js

const { encode_v0_0_1, decode_v0_0_1 } = require("@kpv/encoder");

const input = Array.from({ length: 9999 }, () =>
  Math.floor(Math.random() * 256)
);
const bits = decode_v0_0_1(input);
encode_v0_0_1(bits);

License

Readme

Keywords

none

Package Sidebar

Install

npm i @kpv/encoder

Weekly Downloads

0

Version

0.0.0-alpha.3

License

MIT

Unpacked Size

42.3 kB

Total Files

13

Last publish

Collaborators

  • gqxqd