- commit
- 70fdc19
- parent
- 43ba716
- author
- Evgenii Akentev
- date
- 2023-07-23 20:22:26 +0400 +04
Add comment about internal representation
1 files changed,
+4,
-0
+4,
-0
1@@ -10,6 +10,10 @@
2 --
3 -- Lazily builds the index with the line numbers while reading the file
4 -- making it possible to rewind to them quickly later.
5+--
6+-- The indices are stored using a list, with a fixed length capacity, and 'Data.Array'.
7+-- Each new element is added to the list and when the capacity is reached, the list items get flushed
8+-- to the array for faster access. The list's capacity can be configured using 'mkLineIndexedCursorWithCapacity'.
9 -----------------------------------------------------------------------------
10
11 module System.IO.LineIndexedCursor