base85 1.0.0 copy "base85: ^1.0.0" to clipboard
base85: ^1.0.0 copied to clipboard

outdated

A starting point for Dart libraries or applications.

base85 #

Base85 encoder/decoder.

Supported encoding specifications

Example #

Base85

import 'dart:typed_data';

import 'package:base85/base85.dart';

void main() {
  var z85 = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRST' //
      'UVWXYZ.-:+=^!/*?&<>()[]{}@%\$#';
  var codec = Base85Codec(z85);
  var encode = codec.encode(Uint8List.fromList('Hello, world!!!!'.codeUnits));
  print(encode);

  /// =>   nm=QNz.92Pz/PV8aT50L
  print(String.fromCharCodes(codec.decode(encode)));

  /// =>   Hello, world!!!!

  var ascii85 = '!"#\$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRS' //
      'TUVWXYZ[\\]^_`abcdefghijklmnopqrstu';
  codec = Base85Codec(ascii85);
  print(codec.encode(Uint8List.fromList('Hello, world'.codeUnits)));
  /// =>    87cURD_*#TDfTZ)

  print(String.fromCharCodes(codec.decode('87cURD_*#TDfTZ)')));
  /// =>    Hello, world
}

Alphabets #

See below for a list of commonly recognized alphabets.

Algo Alphabet
z85 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.-:+=^!/*?&<>()[]{}@%$#
ascii85 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_abcdefghijklmnopqrstu`
7
likes
0
pub points
55%
popularity

Publisher

unverified uploader

A starting point for Dart libraries or applications.

Repository (GitHub)
View/report issues

License

unknown (license)

More

Packages that depend on base85