DOC(4)
π DOC(4) π
okay bestie, so this is the DOC page from the Kernel Interfaces Manual β it's all about the Pilot standard text document file format, and ngl it's kinda iconic once you get it. grab a strawberry π and let's go.
β¨ NAME β¨
DOC β the (Pilot standard text document) file format. that's it, that's the whole vibe π
πΈ SYNOPSIS πΈ
struct doc_record0 { /* 16 bytes total */
Word version; /* 1 = plain text, 2 = compressed text */
Word reserved1;
DWord doc_size; /* uncompressed size in bytes */
Word num_recs; /* not counting itself */
Word rec_size; /* in bytes: usually 4096 (4K) */
DWord reserved2;
};
likeβ¦ the whole format is right there in one little struct. main character energy, fr fr π
π¦ DESCRIPTION π¦
so the Doc file format is the standard text document format that literally every single model of the Palm Pilot uses. no exceptions, no cap. β¨
a Doc file is a pdb(4) file β and this manual page is only gonna talk about the parts that are specific to Doc files. everything else? that's a pdb(4) situation, go read that page for the deets. π«Ά
a Doc file is made up of 0 to num_recs records. record 0 is the header for the document. and before you @ me β yes, this header is different from the pdb(4) header. two separate headers, two separate moments, iykyk. π
the rest of the records contain the actual text, and it's either plain or compressed depending on version. that's the plot twist. π
π Word Sizes π
in the synopsis up there, the types Word and DWord are used exactly the way they're used in the Pilot headers. so:
Wordis 16 bits β¨DWordis 32 bits β¨
and both of them are in big-endian format. big-endian girlies rise π
π§ Compression Format π§
a character c inside a compressed record falls into one of four classes, and this is the part where it gets lowkey spicy:
01-08β copycbytes π00,09-7Fβ Self80-BFβ SequenceC0-FFβ a space plus the ASCII characterc ^ 0x80π«
π SEE ALSO π
also!! if you wanna go straight to the source, it's giving:
Christopher Bey and Kathleen Dupre. Palm File Format Specification, Document Number 3008-003, Palm, Inc., May 16, 2000.
π AUTHOR π
Paul J. Lucas <pauljlucas@mac.com> β we stan π«Ά
okay that's the whole page, bestie!! this one came from the txt2pdbdoc crew and it's dated January 21, 2005, which is honestly so retro of it. slay, periodt, go read your pdb(4) page too πβ¨ππ¦
π¦ where this page comes from
- debian bookworm: txt2pdbdoc 1.4.4-8+b1
- ubuntu jammy: txt2pdbdoc 1.4.4-8
- ubuntu noble: txt2pdbdoc 1.4.4-8build2
- Copyright (C) 1998 Paul J. Lucas
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms