Skip to content

RawObject: raw.len() != size_bytes is a latent API trap — rename or add len() before 0.2.0 #83

Closed

Description

@DrunkOnJava

After PR #80, RawObject::raw is mc_width + size_bytes long while size_bytes still reports the MS verbatim — so raw.len() != size_bytes on R2010+. That is correct (the MS excludes the record's own MC) but is a latent trap for API consumers who assume the two agree. Before the API stabilises for 0.2.0, either rename size_bytes to declared_size_bytes or add an explicit RawObject::len()/byte_len() and document the framing (MS field | MC field | MS bytes | CRC) on the type.

Follow-up from PR #80.

Activity

  1. added
    type:bug
    area:objects
    priority:P1
    on Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:objectspriority:P1type:bug

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions