When a message isn't in the text column, it's a serialized NSAttributedString in
attributedBody — Apple's old NSArchiver "streamtyped" format. Type a message and watch the
bytes Apple actually writes to disk, then watch the decoder find your text inside them.
tl;dr
The blob is a length-prefixed walk of an Objective-C object graph:
streamtyped magic → the class hierarchy (NSAttributedString → NSObject →
NSString) → a + marker, a length byte, and finally your text → then an
NSDictionary of attribute runs. For short messages the framing dwarfs the payload — that's why a 5-char
message costs ~180 bytes.
1.Type a message
—
text payload (bytes)
—
structural overhead
—
total on disk
—
% overhead
payload (green) vs framing (grey). Drag the message longer and watch the green slice grow while the grey stays roughly fixed.
2.The bytes on disk
streamtyped magic class names length prefix your text framing / attribute runs