Skip to content
pubscout

base_codecs

1.0.1, released 5 years ago by an unverified publisher

Provides pure‑Dart codecs for base16, base32, base58, base58check and base85 encodings.

WASM-ready
$ flutter pub add base_codecs
Source repository

What it does

The package implements a collection of encoders and decoders for common base representations, including many variants of base32 and base58. It offers ready‑to‑use functions and codec objects for synchronous conversion of byte data to and from these textual formats.

AI-written summary of version 1.0.1, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to encode or decode data in hex, base32, base58 or base85 without native dependencies.
  • You require support for multiple alphabet variants such as Crockford base32 or Bitcoin base58.
  • You want a pure‑Dart solution that works on all Flutter platforms.

Skip it when

  • You need streaming or chunked encoding of very large data sets.
  • Performance‑critical encoding where a native implementation is required.

Strengths

  • Supports a wide range of base encodings and alphabet variants.
  • Pure Dart implementation works on all platforms.
  • Simple synchronous API with both codec objects and helper functions.

Weaknesses

  • No asynchronous or streaming API for large payloads.
  • Limited to encoding/decoding; no higher‑level utilities.

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
1
import 'package:base_codecs/base_codecs.dart';

void main() {
  final bytes = [0xDE, 0xAD, 0xBE, 0xEF];
  final hex = base16Encode(bytes); // "deadbeef"
  final base58 = base58BitcoinEncode(bytes);
  print('hex: $hex, base58: $base58');
}

Alternatives

Packages that do the same job and could replace base_codecs.

  • bs58

    Provides a focused, well‑tested base58 implementation with a smaller API surface.

  • fast_base58

    Optimized for performance with native code support.

  • blockchain_utils

    Includes base58 and other crypto utilities tailored for blockchain use cases.

Works with

Packages commonly used together with base_codecs: ones it builds on, ones built on it, and its own family.