JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1360
  • Score
    100M100P100Q112018F
  • License MIT

A base64 encoder/decoder with gzip or deflate abilities

Package Exports

  • buffer-to-base64
  • buffer-to-base64/decode
  • buffer-to-base64/encode
  • buffer-to-base64/package.json

Readme

buffer-to-base64

build status Coverage Status

A base64 encoder/decoder with gzip or deflate abilities.

import { encode, decode } from 'buffer-to-base64';

// return a base64 string after compression
const packed = await encode(buffer);

// return an ArrayBuffer after decompression
const original = await decode(packed);

This module goal is to simplify the embedding of WASM or other blobs within code as base64 that can return the original array without bloating space on the file.