Skip to content

Expose encoded lengths for ULEB128 and SLEB128 values #762

Closed

Description

@LunaStev

Motivation

ULEB128/SLEB128 codecs expose read/write operations but no way to compute required encoded length without temporary encoding or duplicate caller logic.

Starting points: std/bytes/leb128.wave.

Scope

Expose exact encoded lengths for u64 ULEB128 and i64 SLEB128, with no allocation or cursor mutation. Keep both encodings together rather than splitting each numeric boundary into a separate task.

Difficulty: easy.

Completion criteria

  • Cover zero, extrema and every seven-bit length transition.
  • Include 127/128 and signed -64/-65 boundaries.
  • Compare reported length with actual writer position changes at O0/O2.

Activity

  1. added
    enhancement
    good first issue
    needs testing
    on Sep 25, 2026
  2. self-assigned this
    on Sep 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementgood first issueneeds testing

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions