From 3b78ec9b8186eff8bfab0935096ce61a3c7fc890 Mon Sep 17 00:00:00 2001 From: XeonSquared Date: Thu, 27 May 2021 15:27:57 +1000 Subject: [PATCH] updated to differentiate between v0 and v1 archives --- mtar/README.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/mtar/README.md b/mtar/README.md index 53cb015..23fd360 100644 --- a/mtar/README.md +++ b/mtar/README.md @@ -4,7 +4,18 @@ mtar is a file format for storing multiple files in a single file, much like tar ## 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 - the file name