diff options
author | pixel <pixel> | 2003-01-24 08:17:00 +0000 |
---|---|---|
committer | pixel <pixel> | 2003-01-24 08:17:00 +0000 |
commit | a1176b45029cf5c7645627d38dfc96f66ea213f5 (patch) | |
tree | 57f497f9862147f93eb9e80bc7e4116c65dbb494 /lib/Input.cc | |
parent | debc9f5e2933494e946c86f8575cb130472dbc04 (diff) |
All for NPAQ files...
Diffstat (limited to 'lib/Input.cc')
-rw-r--r-- | lib/Input.cc | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/lib/Input.cc b/lib/Input.cc index e9b859a..6644dd0 100644 --- a/lib/Input.cc +++ b/lib/Input.cc @@ -22,6 +22,40 @@ #define BUILTIN_SIG 0x5141504e +/* + + NPAQ file format + ================ + +off|siz|description +---+---+----------- + 0 | 4 | Magic: NPAQ + 4 | X | Index +4+X| Y | Files + +Index: +It's composed of entries. Each entries have the same format: + +off|siz|description +---+---+----------- + 0 | 1 | name size = n + 1 | n | file name +1+n| 4 | file size +5+n| 1 | type --> 0 = file / 1 = directory + +If it's a directory, it means the following entries belongs to this directory. +If n = 0, there is nothing else afterward (no filesize nor type) and it +means the end of the current directory. The end of the root directory +means the end of the index. + +Files: +Each file are gzipped. They are all concatenated after the index. They +all start with a four bytes length which correspond to the unpacked size. +The size in the index corresponds to the size of the gzipped result plus +those 4 bytes. + +*/ + static Input::openresults_t gresults; Input::Input(const String & no) throw (GeneralException) : |