Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Bandwürm Archive
- ## Architecture
- The file has its *File Header* at the beginning of the file. The header
- stores the file identifier, version and the offset of the initial directory.
- Each directory consists of a set of entries which can be either a directory
- or a file. The *Data Start* and *Data Length* describe the entries position
- and length in the file.
- A directory entry can either describe a file, a child directory or a directory
- extension.
- ### File
- A file entry describes a file with the file name and the position of the file.
- ### Directory
- A directory entry describes a child directory.
- ### Directory Extension
- A directory extension allows extending the a directory with more files by replacing
- any entry of the directory with a new directory (like a child directory). This new
- directory extends the contents of the current directory.
- Also when replacing an entry, the replaced entry must be added to the new directory.
- ## File Header
- | Offset | Size | Description
- |--------|--------|--------------
- | 0 | 4 | Magic Number
- | 4 | 4 | Initial Directory Position
- | 8 | 4 | Initial Directory Length (in Bytes)
- | 12 | 4 | Version
- ## Directory Entry
- | Offset | Size | Description
- |--------|--------|--------------
- | 0 | 4 | Type (0=invalid, 1=file, 2=directory, 3=directory-extension)
- | 4 | 4 | Flags
- | 8 | 32 | Entry Name, null terminated
- | 40 | 4 | Data Start (Directory or File Data)
- | 44 | 4 | Data Length (in Bytes)
Advertisement
Add Comment
Please, Sign In to add comment