Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions GEMINI.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Project Overview

This project is a Dart package named `base32_codec`. It provides a flexible and efficient way to encode and decode Base32 data, following the conventions of `dart:convert`. The package is written in pure Dart and has no platform-specific dependencies.

## Key Features

* **Multiple Base32 Variants:** Supports three popular Base32 alphabets:
* [RFC 4648](https://datatracker.ietf.org/doc/html/rfc4648) (the standard)
* [RFC 4648 "Hex"](https://datatracker.ietf.org/doc/html/rfc4648#section-7)
* [Crockford's Base32](http://www.crockford.com/base32.html)
* **Stream-Based Conversion:** The API is compatible with Dart's `Stream` and `Codec` interfaces, making it suitable for processing large data sets without loading everything into memory.
* **Synchronous Conversion:** For smaller data, the library provides simple `encode` and `decode` methods.

# Building and Running

This is a Dart library, so there is no main executable to run. However, you can run the tests to verify its functionality.

## Running Tests

The project uses the `test` package for testing. To run the tests, use the following command:

```bash
dart test
```

# Development Conventions

## Code Style

The project follows the standard Dart and Flutter linting rules, as defined in the `analysis_options.yaml` file. The `lints` package is used to enforce these rules.

## Testing

The project has a comprehensive test suite in the `test` directory. The tests cover all three Base32 variants and include test vectors from RFC 4648 to ensure correctness. The tests also cover the stream-based (chunked) conversion logic.
2 changes: 1 addition & 1 deletion pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -394,4 +394,4 @@ packages:
source: hosted
version: "3.1.3"
sdks:
dart: ">=3.9.3 <4.0.0"
dart: ">=3.9.0 <4.0.0"
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ topics:
- codec

environment:
sdk: ^3.9.3
sdk: ^3.9.0

dev_dependencies:
lints: ^6.0.0
Expand Down