Guest User

Bandwürm Specs

a guest
Jan 29th, 2016
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.54 KB | None | 0 0
  1.  
  2. # Bandwürm Archive
  3.  
  4. ## Architecture
  5.  
  6. The file has its *File Header* at the beginning of the file. The header
  7. stores the file identifier, version and the offset of the initial directory.
  8.  
  9. Each directory consists of a set of entries which can be either a directory
  10. or a file. The *Data Start* and *Data Length* describe the entries position
  11. and length in the file.
  12.  
  13. A directory entry can either describe a file, a child directory or a directory
  14. extension.
  15.  
  16. ### File
  17. A file entry describes a file with the file name and the position of the file.
  18.  
  19. ### Directory
  20. A directory entry describes a child directory.
  21.  
  22. ### Directory Extension
  23. A directory extension allows extending the a directory with more files by replacing
  24. any entry of the directory with a new directory (like a child directory). This new
  25. directory extends the contents of the current directory.
  26.  
  27. Also when replacing an entry, the replaced entry must be added to the new directory.
  28.  
  29. ## File Header
  30.  
  31. | Offset | Size | Description
  32. |--------|--------|--------------
  33. | 0 | 4 | Magic Number
  34. | 4 | 4 | Initial Directory Position
  35. | 8 | 4 | Initial Directory Length (in Bytes)
  36. | 12 | 4 | Version
  37.  
  38. ## Directory Entry
  39.  
  40. | Offset | Size | Description
  41. |--------|--------|--------------
  42. | 0 | 4 | Type (0=invalid, 1=file, 2=directory, 3=directory-extension)
  43. | 4 | 4 | Flags
  44. | 8 | 32 | Entry Name, null terminated
  45. | 40 | 4 | Data Start (Directory or File Data)
  46. | 44 | 4 | Data Length (in Bytes)
Advertisement
Add Comment
Please, Sign In to add comment