How does kate / kwrite store text internally

[email protected]
Newsgroups gmane.comp.kde.devel.kwrite
Message-ID <[email protected]>
Mostly out of idle curiosity, I'd like to find out how kate / kwrite store text 
internally -- I mean a gapped buffer, a piece table, some (other) kind of tree, 
...

For extra credit ;-) is there any document that tells how that was decided and 
/ or compares it to alternate methods?

(Aside: Scintilla uses a gapped buffer with some auxillary structures (like a 
separate style buffer, maybe others), Iiuc, Microsoft Word uses some kind of 
tree.)

I have tried some Google searches, but no luck so far.

Thanks!
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.