]> Cypherpunks.ru repositories - nncp.git/blob - doc/chunked.texi
Chunked files documentation
[nncp.git] / doc / chunked.texi
1 @node Chunked
2 @unnumbered Chunked files
3
4 There is ability to transfer huge files with splitting them into smaller
5 chunks. Each chunk is treated like a separate file, producing separate
6 outbound packet unrelated with other ones.
7
8 This is useful when your removable storage device has smaller capacity
9 than huge file's size. You can transfer those chunks on different
10 storage devices, and/or at different time, reassembling the whole packet
11 on the destination node.
12
13 Splitting is done with @ref{nncp-file, nncp-file -chunk} command and
14 reassembling with @ref{nncp-reass} command.
15
16 Chunked @file{FILE} produces @file{FILE.nncp.meta},
17 @file{FILE.nncp.chunk0}, @file{FILE.nncp.chunk1}, ... files. All
18 @file{.nncp.chunkXXX} can be concatenated together to produce original
19 @file{FILE}. @file{.nncp.meta} contains information about file/chunk
20 size and their hash checksums:
21
22 @verbatim
23 +------------------------------+---------------------+
24 | MAGIC | FILESIZE | CHUNKSIZE | HASH0 | HASH1 | ... |
25 +------------------------------+---------------------+
26 @end verbatim
27
28 @multitable @columnfractions 0.2 0.3 0.5
29 @headitem  @tab XDR type @tab Value
30 @item Magic number @tab
31     8-byte, fixed length opaque data @tab
32     @verb{|N N C P M 0x00 0x00 0x01|}
33 @item File size @tab
34     unsigned hyper integer @tab
35     Whole reassembled file's size
36 @item Chunk size @tab
37     unsigned hyper integer @tab
38     Size of each chunks (except for the last one, that could be smaller).
39 @item Checksums @tab
40     variable length array of 32 byte fixed length opaque data @tab
41     BLAKE2b-256 checksum of each chunk
42 @end multitable