Advertisement
Ham62

Blogpost Database Format.txt

Jun 19th, 2018
497
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. '******** Main DB file ********'
  2. ' Everything allocated in "chunks" of 32 bytes
  3.  
  4. File Header:
  5. DWORD Magic = BPFn where 'n' = file format version
  6. DWORD dwEntries ' Number of Posts in db
  7.  
  8. -------------------------------
  9.  
  10. ' Repeats for number of sections
  11. Post Header:
  12. WORD wSubSections ' Number of subsections in this part
  13. WORD wTitleLength ' Length of page title
  14. <page tile = n chunks>
  15.  
  16. ' Repeats depending on number of subsections
  17. Subsection Headers:
  18. uByte ID ' Will be one of the "Subsection IDs"
  19. uByte Reserved ' --> Reserved for future use
  20. uShort Reserved ' /
  21. DWORD dwLength ' Length of subsection in chunks (including header)
  22. <subsection data = dwLength chunks>
  23.  
  24. -------------------------------
  25.  
  26. Subsection IDs:
  27. &H01 Page content
  28.  
  29.  
  30. '******** Index file **********'
  31.  
  32. ' Repeated for number of entries in DB
  33. File Index:
  34. DWORD dwOffset:23 ' Offset of Post (in chunks)
  35. DWORD dwUsed:1 ' Is section used or free?
  36. DWORD dwLength:8 ' Length of Post (in chunks)
  37.  
  38. DWORD dwPostID ' ID of Post
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement