|
2 | 2 | *
|
3 | 3 | * astreamer.h
|
4 | 4 | *
|
5 |
| - * Each tar archive returned by the server is passed to one or more |
6 |
| - * astreamer objects for further processing. The astreamer may do |
7 |
| - * something simple, like write the archive to a file, perhaps after |
| 5 | + * The "archive streamer" interface is intended to allow frontend code |
| 6 | + * to stream from possibly-compressed archive files from any source and |
| 7 | + * perform arbitrary actions based on the contents of those archives. |
| 8 | + * Archive streamers are intended to be composable, and most tasks will |
| 9 | + * require two or more archive streamers to complete. For instance, |
| 10 | + * if the input is an uncompressed tar stream, a tar parser astreamer |
| 11 | + * could be used to interpret it, and then an extractor astreamer could |
| 12 | + * be used to write each archive member out to a file. |
| 13 | + * |
| 14 | + * In general, each archive streamer is relatively free to take whatever |
| 15 | + * action it desires in the stream of chunks provided by the caller. It |
| 16 | + * may do something simple, like write the archive to a file, perhaps after |
8 | 17 | * compressing it, but it can also do more complicated things, like
|
9 | 18 | * annotating the byte stream to indicate which parts of the data
|
10 | 19 | * correspond to tar headers or trailing padding, vs. which parts are
|
@@ -33,9 +42,9 @@ typedef struct astreamer_ops astreamer_ops;
|
33 | 42 |
|
34 | 43 | /*
|
35 | 44 | * Each chunk of archive data passed to a astreamer is classified into one
|
36 |
| - * of these categories. When data is first received from the remote server, |
37 |
| - * each chunk will be categorized as ASTREAMER_UNKNOWN, and the chunks will |
38 |
| - * be of whatever size the remote server chose to send. |
| 45 | + * of these categories. When data is initially passed to an archive streamer, |
| 46 | + * each chunk will be categorized as ASTREAMER_UNKNOWN, and the chunks can |
| 47 | + * be of whatever size the caller finds convenient. |
39 | 48 | *
|
40 | 49 | * If the archive is parsed (e.g. see astreamer_tar_parser_new()), then all
|
41 | 50 | * chunks should be labelled as one of the other types listed here. In
|
|
0 commit comments