Home - kratenko/papup GitHub Wiki
Ideas and such
header1 - page header
PAPUP Version 0 - UUID: 46e1f803-12ba-4681-8a6e-4176ca24ea7e - Page: 1/3 - Blocks: 384 - Columns: 16
PAPUP Version %d - UUID: %s - Page: %d/%d - Blocks: %d - Columns: %d
5: "PAPUP"
1: version uint8
16: uuuuuuuuiiiidddd
4: page uint32
4: pages uint32
2: blocks uint16
2: columns uint16
---------------------
34: TOTAL
64: RS'ed
header2 - payload header
Payload size: 5412548
Redundancy: 3, ReedSolomon(255, 192)
Compression: 1, BZIP2(9)
Encryption: 0, None
8: payload size (bytes) uint64
1: redundancy uint8
1: redundancy_padding uint8
1: compression uint8
1: compression_padding uint8
1: encryption uint8
1: encryption_padding uint8
-----------------------------
14: TOTAL
32: RS'ed
Values for payload header configurations
Redundancy
0x00: no redundancy added (not recommended)
0x01: Reed-Solomon(255, 247)
0x02: Reed-Solomon(255, 239)
0x03: Reed-Solomon(255, 223) (default)
0x04: Reed-Solomon(255, 191)
0x05: Reed-Solomon(255, 127)
Compression
0x00: no compression
0x01: bzip2, compression level 9
Encryption
0x00: no encryption
header3/4 - clear/crypt meta
1+X: nFname
2+X: nnComment
1+X: MIME-Type
20: sha1 ??
8: timestamp
+-------+-------+--------+--------+-----------+
| h1 | h2 | h3 | h4 | content |
+-------+-------+--------+-----------+
| | | | compress |
| | | +--------------------+
| | | | crypt |
| | +--------+--------------------+
| RS-1 | RS-2 | RS-content |
+---------------+-----------------------------+
+-------------+--------------------------+
| page header | page data |
+-------------+--------------------------+
| RS(64,34) | |
+-------------+--------------------------+