Skip to main content

Module buffer

Module buffer 

Source
Expand description

Virtualized Balanced B-Tree Rope Line Buffer with O(log N) line indexing and fine-grained mutations.

Structs§

LineBuffer
Fast, indexed line-based text buffer backed by a balanced B-Tree Rope.
RopeInternal
An internal node in the B-Tree Rope maintaining balanced child references and aggregated metrics.
RopeLeaf
A leaf node containing a contiguous block of text lines in the B-Tree Rope.
SubtreeMetrics
Subtree character, newline, and byte count metrics cached at each node in the B-Tree.
TextRope
Balanced B-Tree Rope text data structure for logarithmic-time line indexing, splitting, joining, and editing across massive documents (100,000+ lines).

Enums§

RopeNode
A node in the balanced B-Tree Rope hierarchy (either an internal branch or a leaf node).
SplitResult
Result of a B-Tree insertion or split propagation.

Constants§

CHUNK_CAPACITY
Maximum number of lines per leaf node before splitting.
MAX_INTERNAL_CHILDREN
Maximum number of child nodes per internal B-Tree node before splitting.
MIN_CHUNK_SIZE
Minimum number of lines per leaf node.
MIN_INTERNAL_CHILDREN
Minimum number of child nodes per internal B-Tree node.

Functions§

byte_to_char
Converts a byte offset within s to a character-based column index.
char_to_byte
Converts a character-based column index to a byte offset within s.

Type Aliases§

RopeChunk
Alias for backwards compatibility with tests and callers expecting RopeChunk.