Package Exports
- buffer-to-base64
- buffer-to-base64/decode
- buffer-to-base64/encode
- buffer-to-base64/package.json
Readme
buffer-to-base64
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.