1. Magic number (3 Bytes): 'PSv' 2. Saved settings (1 Byte): Bit 0: Legacy mode Bit 1: Pause mode Bit 2-3: Gravity mode Bit 4-6: Air mode Bit 7: Newtonian gravity mode 3. Game version (1 Byte) 4. Cell size (1 Byte) 5. Width, in cells (1 Bytes) 6. Heigth, in cells (1 Bytes) 7. Unzipped size of the save data (4 Bytes) 8. Save data, zipped with bzip2:
1. All walls (1 Byte each) 2. For FANs: X speed (1 Byte each) 3. For FANs: Y speed (1 Byte each) 4. All particles, types (1 Byte each) 5. Particles X speed (1 Byte each) 6. Particles Y speed (1 Byte each) 7. Particles life (2 Byte each) 8. Particles tmp (2 Byte each) 9. Particles deco alpha (1 Byte each) 10. Particles deco red (1 Byte each) 11. Particles deco green (1 Byte each) 12. Particles deco blue (1 Byte each) 13. Particles temperature (2 Byte each) 14. Particles ctype, only for CLNE, PCLN, BCLN, SPRK, LAVA & PIPE (1 Byte each) 15. Number of signs (1 Byte) Then for each sign:
1. X position (2 Bytes) 2. Y position (2 Bytes) 3. Text align (1 Byte) 4. Length of text (1 Byte) 5. Text (IV Bytes)
EOF"
Since the EOF is indicated as part of the format I assume I need to signal the EOF (end of file) withing the file itself. How do I signal an EOF in TPT stamp format?