updated to differentiate between v0 and v1 archives

This commit is contained in:
Izaya 2021-05-27 15:27:57 +10:00
parent 1f5c0b013e
commit 3b78ec9b81

View File

@ -4,7 +4,18 @@ mtar is a file format for storing multiple files in a single file, much like tar
## File format ## File format
mtar archive files consist of a number of file entries, in the following format: mtar archive files consist of a number of file entries, in any combination of the following formats:
### v1 format
- 0xFFFF (for differentiating versioned headers from legacy v0 headers)
- version byte, with the value 1
- 2 bytes file name length
- the file name
- 8 bytes file content length
- the file contents
### Legacy v0 format
- 2 bytes file name length - 2 bytes file name length
- the file name - the file name