2 // map types from key to human-friendly name
3 exports.name = new Map([
9 // Devices and FIFOs aren't fully supported
10 // they are parsed, but skipped when unpacking
11 ['3', 'CharacterDevice'],
16 ['7', 'ContiguousFile'],
18 ['g', 'GlobalExtendedHeader'],
19 ['x', 'ExtendedHeader'],
20 // vendor-specific stuff
23 // like 5, but with data, which should be skipped
25 // metadata only, skip
27 // data = link path of next file
28 ['K', 'NextFileHasLongLinkpath'],
29 // data = path of next file
30 ['L', 'NextFileHasLongPath'],
32 ['M', 'ContinuationFile'],
34 ['N', 'OldGnuLongPath'],
38 ['V', 'TapeVolumeHeader'],
40 ['X', 'OldExtendedHeader']
43 // map the other direction
44 exports.code = new Map(Array.from(exports.name).map(kv => [kv[1], kv[0]]))