Skip to content

(future) Consider ReadOnlySequence everywhere #3

@Warpten

Description

@Warpten

(ReadOnly)Span<T> is limited to int.MaxValue amout of entries. For all intents and purposes this is fine but is bound to break on files larger than 2GB. The alternative here is to instead use (ReadOnly)Sequence<T>, but this introduces the need for special care across individual span boundaries.

Normally this is also a non-issue because TACT || CASC files are not larger than 2 GB, but this is something to keep in mind for the future.

The general consensus would be to use ReadOnlySequenceAccessor and work off the sequence, trying to abstract away the span boundaries.

References:

  1. Memory<T> and large memory mapped files dotnet/runtime#24805

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions