Skip to content

Support Percent / URL encoding #16

Description

@dipu-bd

Add a byte-level percent-encoding codec. Uri.encodeComponent already exists in dart:core, so the value here is byte-level control — encoding arbitrary bytes (not just valid UTF-8 strings) and choosing the unreserved set.

Architecture fit

  • Standalone byte loop; bypasses the bit-regrouping engine entirely.
  • Codec class with configurable "unreserved" set (RFC 3986 default); toPercent/fromPercent public API with codec: override.

Differential oracle: Uri.encodeComponent / Uri.decodeComponent for the UTF-8-safe subset.

Spec: RFC 3986 §2.1

Effort: S

Checklist

  • Byte loop encode/decode, configurable unreserved set
  • Six standard test groups incl. differential vs Uri.*
  • Invalid-input group (truncated %, non-hex digits)
  • README / CHANGELOG / example / test_integration updated
  • Format / analyze / test (vm + node) green

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions