Re: [Interest] Smaller QString Serialization

2025-04-15 Thread Thiago Macieira
On Tuesday, 15 April 2025 01:32:56 Pacific Daylight Time Ivan Solovev via Interest wrote: > > My primary question is: is there a way to avoid doing a copy for the utf8 > > data (the char *buffer in operator>> and the QByteArray utf8 in > > operator<<)? > > QString stores the data as UTF-16, so yo

Re: [Interest] Smaller QString Serialization

2025-04-15 Thread Ivan Solovev via Interest
_ From: Interest on behalf of Josh Sent: Tuesday, April 15, 2025 7:39 AM To: interest@qt-project.org Subject: [Interest] Smaller QString Serialization Hello all, It looks like the standard QString serialization writes a 32-bit size (uses 0x for Null String, and uses 0xFFF

[Interest] Smaller QString Serialization

2025-04-14 Thread Josh
Hello all, It looks like the standard QString serialization writes a 32-bit size (uses 0x for Null String, and uses 0xFFFE if 32-bit isn't big enough and then writes a 64-bit size), followed by 16 bits for each character. To save space, I want to use a scheme that writes an 8-bit