{"id":50991333,"url":"https://github.com/dropbear-software/base32_codec","last_synced_at":"2026-06-20T03:32:20.383Z","repository":{"id":322689633,"uuid":"1090507217","full_name":"dropbear-software/base32_codec","owner":"dropbear-software","description":"A Dart library for encoding and decoding Base32 data.","archived":false,"fork":false,"pushed_at":"2026-05-23T19:56:31.000Z","size":211,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-23T21:24:59.683Z","etag":null,"topics":["base32","base32hex","codec","converter","crockford-base32","dart","rfc4648"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/base32_codec","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dropbear-software.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-05T18:58:19.000Z","updated_at":"2026-05-23T19:56:28.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/dropbear-software/base32_codec","commit_stats":null,"previous_names":["dropbear-software/base32_codec"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dropbear-software/base32_codec","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dropbear-software%2Fbase32_codec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dropbear-software%2Fbase32_codec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dropbear-software%2Fbase32_codec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dropbear-software%2Fbase32_codec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dropbear-software","download_url":"https://codeload.github.com/dropbear-software/base32_codec/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dropbear-software%2Fbase32_codec/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34556494,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-20T02:00:06.407Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["base32","base32hex","codec","converter","crockford-base32","dart","rfc4648"],"created_at":"2026-06-20T03:32:20.326Z","updated_at":"2026-06-20T03:32:20.376Z","avatar_url":"https://github.com/dropbear-software.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![pub package](https://img.shields.io/pub/v/base32_codec.svg)](https://pub.dev/packages/base32_codec)\n[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)\n[![Open in Firebase Studio](https://cdn.firebasestudio.dev/btn/open_light_20.svg)](https://studio.firebase.google.com/import?url=https%3A%2F%2Fgithub.com%2Fdropbear-software%2Fbase32_codec)\n\nA flexible and efficient Dart package for encoding and decoding Base32 data.\nThis package provides a `Codec`-based API that aligns with `dart:convert`\nconventions, making it easy to work with synchronous and asynchronous data\nstreams.\n\n## Features\n\n*   **Multiple Variants:** Supports RFC 4648, RFC 4648 \"Hex\", and Crockford's\n    Base32 alphabets.\n*   **Stream-Compatible:** Implements chunked conversion, allowing it to be\n    used as a `StreamTransformer` for efficient processing of large data.\n*   **Dart Native:** A pure Dart implementation with no platform-specific\n    dependencies.\n*   **Well-Tested:** Comes with a comprehensive test suite, including RFC 4648\n    test vectors.\n\n## Getting started\n\nAdd this package to your `pubspec.yaml` file:\n\n```yaml\ndependencies:\n  base32_codec: ^1.0.0 # Replace with the latest version\n```\n\nThen, run `pub get` or `flutter pub get` to install the package.\n\n## Usage\n\n### Synchronous Conversion\n\nFor simple, in-memory encoding and decoding, you can use the `encode` and\n`decode` methods directly.\n\n**Default (RFC 4648)**\n\n```dart\nimport 'dart:convert';\nimport 'package:base32_codec/base32_codec.dart';\n\nvoid main() {\n  final codec = Base32Codec();\n  final data = ascii.encode('foobar');\n\n  final encoded = codec.encode(data);\n  print(encoded); // MZXW6YTBOI======\n\n  final decoded = codec.decode(encoded);\n  print(ascii.decode(decoded)); // foobar\n}\n```\n\n**Crockford Variant**\n\nTo use a different variant, instantiate the corresponding codec.\n\n```dart\nimport 'dart:convert';\nimport 'package:base32_codec/base32_codec.dart';\n\nvoid main() {\n  final codec = Base32Codec.crockford();\n  final data = ascii.encode('foobar');\n\n  final encoded = codec.encode(data);\n  print(encoded); // CSQPYRK1E8\n\n  final decoded = codec.decode(encoded);\n  print(ascii.decode(decoded)); // foobar\n\n  // Crockford decoding also ignores hyphens for readability.\n  print(ascii.decode(codec.decode('CSQPY-RK1E8'))); // foobar\n}\n```\n\n### Asynchronous (Stream) Conversion\n\nFor handling larger data, like files or network streams, you can use the\ncodec's encoder and decoder as a `StreamTransformer`.\n\n```dart\nimport 'dart:convert';\nimport 'dart:io';\nimport 'package:base32_codec/base32_codec.dart';\n\nFuture\u003cvoid\u003e main() async {\n  // Create a stream from a file or network source\n  final inputStream = Stream.value(ascii.encode('foobar'));\n\n  // Transform the stream by encoding it\n  final encodedStream = inputStream.transform(Base32Codec().encoder);\n\n  // Print each chunk of the encoded output\n  await for (final chunk in encodedStream) {\n    print(chunk); // MZXW6YTBOI======\n  }\n\n  // You can also pipe the stream to a file\n  // await inputStream\n  //     .transform(Base32Codec().encoder)\n  //     .pipe(File('output.txt').openWrite());\n}\n```\n\n## Performance Benchmarks\n\nThis package includes a suite of performance benchmarks to measure the speed of encoding and decoding operations across different Base32 variants and conversion types (synchronous and asynchronous).\n\nTo run the benchmarks, execute the following command from the project root:\n\n```bash\ndart run benchmark/base32_codec_benchmark.dart\n```\n\n## Contributing\n\nThis package is open source and contributions are welcome!\n\nIf you find a bug or have a feature request, please file an issue on the\n[GitHub issue tracker](https://github.com/dropbear-software/base32_codec/issues). When\nfiling an issue, please provide a clear description of the problem and include\na minimal, reproducible example if possible.\n\nIf you would like to contribute code, please fork the repository and submit a\npull request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdropbear-software%2Fbase32_codec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdropbear-software%2Fbase32_codec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdropbear-software%2Fbase32_codec/lists"}