File tree Expand file tree Collapse file tree 2 files changed +36
-0
lines changed Expand file tree Collapse file tree 2 files changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -66,6 +66,24 @@ import * as utils from './utils';
6666 * storing the actual value. These are the currently supported keys for
6767 * the extended metadata:
6868 * - path (corresponding to file path if it is longer than 255 characters)
69+ *
70+ * The high-level diagram of a tar file looks like the following.
71+ * - [File header]
72+ * - [Data]
73+ * - [Data]
74+ * - [Extended header]
75+ * - [Data]
76+ * - [File header]
77+ * - [Data]
78+ * - [Data]
79+ * - [Directory header]
80+ * - [Null chunk]
81+ * - [Null chunk]
82+ *
83+ * A file header preceedes file data. A directory header has no data. An
84+ * extended header is the same as a file header, but it has differnet metadata
85+ * than one, and must be immediately followed by either a file or a directory
86+ * header. Two null chunks are always at the end, marking the end of archive.
6987 */
7088class Generator {
7189 protected state : GeneratorState = GeneratorState . HEADER ;
Original file line number Diff line number Diff line change @@ -61,6 +61,24 @@ import * as utils from './utils';
6161 * storing the actual value. These are the currently supported keys for
6262 * the extended metadata:
6363 * - path (corresponding to file path if it is longer than 255 characters)
64+ *
65+ * The high-level diagram of a tar file looks like the following.
66+ * - [File header]
67+ * - [Data]
68+ * - [Data]
69+ * - [Extended header]
70+ * - [Data]
71+ * - [File header]
72+ * - [Data]
73+ * - [Data]
74+ * - [Directory header]
75+ * - [Null chunk]
76+ * - [Null chunk]
77+ *
78+ * A file header preceedes file data. A directory header has no data. An
79+ * extended header is the same as a file header, but it has differnet metadata
80+ * than one, and must be immediately followed by either a file or a directory
81+ * header. Two null chunks are always at the end, marking the end of archive.
6482 */
6583class Parser {
6684 protected state : ParserState = ParserState . HEADER ;
You can’t perform that action at this time.
0 commit comments