This package provides implementations for various Base32 encoding schemes, including RFC 4648 and Crockford's Base32, tailored for JavaScript environments. Base32 offers distinct advantages over Base64, such as case-insensitivity, suitability for filenames (as it avoids the '/' character), and an alphabet carefully designed to minimize ambiguous characters (e.g., omitting 1, 8, 0 to prevent confusion with I, B, O). However, this comes at the cost of increased data size, with Base32 representations being approximately 20% larger than Base64. The package is currently at version 0.1.0, suggesting it is either an early-stage project or one that has not seen significant updates or active maintenance in a considerable amount of time, lacking a clear release cadence. It differentiates itself by supporting multiple Base32 variants and providing pre-built files for browser compatibility.
npm install base32.jsVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates encoding and decoding binary data using Crockford Base32 and the default RFC4648 (no padding) variant, showcasing the streaming API.
Consider migrating to a more actively maintained Base32 library that supports modern JavaScript environments and provides ongoing security updates. If continued use is necessary, carefully review the source code for vulnerabilities and ensure compatibility with your target environment.
Always remember to call both `.write(data)` and `.finalize()` to process data and retrieve the output from `Encoder` and `Decoder` instances.
Explicitly configure the `type` and `padding` options in the `Encoder` and `Decoder` constructors to ensure compatibility with your target Base32 standard and padding requirements (e.g., `{ type: 'rfc4648', padding: true }`).Use `import * as base32 from 'base32.js';` and ensure your bundler or Node.js environment is configured to handle CommonJS interop.
Use `import * as base32 from 'base32.js';` to import the module object containing `Encoder` and `Decoder`.
Ensure both `Encoder` and `Decoder` are initialized with the same `type` and `padding` options. If the encoded string was padded, the decoder must be initialized with `{ padding: true }`. Verify the input string is valid Base32 according to the specified type.No dependency data recorded yet.