[PR #10099] [MERGED] Introduce til::rle - a run length encoded vector #27888

Open
opened 2026-01-31 09:24:53 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/10099
Author: @lhecker
Created: 5/14/2021
Status: Merged
Merged: 5/20/2021
Merged by: @undefined

Base: mainHead: dev/lhecker/rle


📝 Commits (4)

  • 4b0eeef Introduce til::rle - a run length encoded vector
  • 7fdfaa7 Address review comments
  • 8a4039f Address reviewer comments
  • a2ce9fc Improve documentation

📊 Changes

25 files changed (+1855 additions, -1686 deletions)

View changed files

📝 .github/actions/spelling/allow/allow.txt (+1 -0)
📝 src/buffer/out/AttrRow.cpp (+30 -535)
📝 src/buffer/out/AttrRow.hpp (+13 -30)
src/buffer/out/AttrRowIterator.cpp (+0 -136)
src/buffer/out/AttrRowIterator.hpp (+0 -80)
📝 src/buffer/out/Row.cpp (+67 -79)
📝 src/buffer/out/Row.hpp (+1 -2)
📝 src/buffer/out/TextAttribute.cpp (+7 -0)
📝 src/buffer/out/TextAttribute.hpp (+5 -15)
src/buffer/out/TextAttributeRun.hpp (+0 -50)
📝 src/buffer/out/TextColor.h (+1 -5)
📝 src/buffer/out/lib/bufferout.vcxproj (+0 -3)
📝 src/buffer/out/textBufferCellIterator.hpp (+2 -2)
src/buffer/out/ut_textbuffer/AttrRowTests.cpp (+0 -731)
📝 src/buffer/out/ut_textbuffer/TextBuffer.Unit.Tests.vcxproj (+1 -2)
📝 src/buffer/out/ut_textbuffer/sources (+0 -1)
📝 src/cascadia/UnitTests_TerminalCore/ConptyRoundtripTests.cpp (+1 -1)
📝 src/host/ut_host/Host.UnitTests.vcxproj.filters (+3 -0)
📝 src/inc/consoletaeftemplates.hpp (+30 -8)
📝 src/inc/til.h (+1 -0)

...and 5 more files

📄 Description

Summary of the Pull Request

Introduces til::rle, a vector-like container which stores elements of
type T in a run length encoded format. This allows efficient compaction
of repeated elements within the vector.

References

  • #8000 - Supports buffer rewrite work. A re-use of til::rle will be
    useful as a column counter as we pursue NxM storage and presentation.
  • #3075 - The new iterators allow skipping forward by multiple units,
    which wasn't possible under TextBuffer-/OutputCellIterator.
    Additionally it also allows a bulk insertions.
  • #8787 and #410 - High probability this should be pmr-ified
    like bitmap for things like chafa and cacafire
    which are changing the run length frequently.

PR Checklist

Validation Steps Performed

  • Ran cacafire in OpenConsole.exe and it looked beautiful
  • Ran new suite of RunLengthEncodingTests.cpp

Co-authored-by: Michael Niksa miniksa@microsoft.com


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/10099 **Author:** [@lhecker](https://github.com/lhecker) **Created:** 5/14/2021 **Status:** ✅ Merged **Merged:** 5/20/2021 **Merged by:** [@undefined](undefined) **Base:** `main` ← **Head:** `dev/lhecker/rle` --- ### 📝 Commits (4) - [`4b0eeef`](https://github.com/microsoft/terminal/commit/4b0eeef949b62d5c431eaf5d1374302b1362b6fe) Introduce til::rle - a run length encoded vector - [`7fdfaa7`](https://github.com/microsoft/terminal/commit/7fdfaa7f9500da2abfce314381b18f497c0b999d) Address review comments - [`8a4039f`](https://github.com/microsoft/terminal/commit/8a4039f94d828743466a6a385233dac98974c31b) Address reviewer comments - [`a2ce9fc`](https://github.com/microsoft/terminal/commit/a2ce9fcf83d0205b268a815097d9547fe301495a) Improve documentation ### 📊 Changes **25 files changed** (+1855 additions, -1686 deletions) <details> <summary>View changed files</summary> 📝 `.github/actions/spelling/allow/allow.txt` (+1 -0) 📝 `src/buffer/out/AttrRow.cpp` (+30 -535) 📝 `src/buffer/out/AttrRow.hpp` (+13 -30) ➖ `src/buffer/out/AttrRowIterator.cpp` (+0 -136) ➖ `src/buffer/out/AttrRowIterator.hpp` (+0 -80) 📝 `src/buffer/out/Row.cpp` (+67 -79) 📝 `src/buffer/out/Row.hpp` (+1 -2) 📝 `src/buffer/out/TextAttribute.cpp` (+7 -0) 📝 `src/buffer/out/TextAttribute.hpp` (+5 -15) ➖ `src/buffer/out/TextAttributeRun.hpp` (+0 -50) 📝 `src/buffer/out/TextColor.h` (+1 -5) 📝 `src/buffer/out/lib/bufferout.vcxproj` (+0 -3) 📝 `src/buffer/out/textBufferCellIterator.hpp` (+2 -2) ➖ `src/buffer/out/ut_textbuffer/AttrRowTests.cpp` (+0 -731) 📝 `src/buffer/out/ut_textbuffer/TextBuffer.Unit.Tests.vcxproj` (+1 -2) 📝 `src/buffer/out/ut_textbuffer/sources` (+0 -1) 📝 `src/cascadia/UnitTests_TerminalCore/ConptyRoundtripTests.cpp` (+1 -1) 📝 `src/host/ut_host/Host.UnitTests.vcxproj.filters` (+3 -0) 📝 `src/inc/consoletaeftemplates.hpp` (+30 -8) 📝 `src/inc/til.h` (+1 -0) _...and 5 more files_ </details> ### 📄 Description ## Summary of the Pull Request Introduces `til::rle`, a vector-like container which stores elements of type T in a run length encoded format. This allows efficient compaction of repeated elements within the vector. ## References * #8000 - Supports buffer rewrite work. A re-use of `til::rle` will be useful as a column counter as we pursue NxM storage and presentation. * #3075 - The new iterators allow skipping forward by multiple units, which wasn't possible under `TextBuffer-/OutputCellIterator`. Additionally it also allows a bulk insertions. * #8787 and #410 - High probability this should be `pmr`-ified like `bitmap` for things like `chafa` and `cacafire` which are changing the run length frequently. ## PR Checklist * [x] Closes #8741 * [x] I work here. * [x] Tests added. * [x] Tests passed. ## Validation Steps Performed * [x] Ran `cacafire` in `OpenConsole.exe` and it looked beautiful * [x] Ran new suite of `RunLengthEncodingTests.cpp` Co-authored-by: Michael Niksa <miniksa@microsoft.com> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:24:53 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#27888