src/backup/file_formats.rs: improve docs
This commit is contained in:
@ -13,24 +13,6 @@ use super::*;
|
||||
/// them on disk or transfer them over the network. Please use index
|
||||
/// files to store large data files (".fidx" of ".didx").
|
||||
///
|
||||
/// The format start with a 8 byte magic number to identify the type,
|
||||
/// followed by a 4 byte CRC. This CRC is used on the server side to
|
||||
/// detect file corruption (computed when upload data), so there is
|
||||
/// usually no need to compute it on the client side.
|
||||
///
|
||||
/// Encrypted blobs contain a 16 byte IV, followed by a 16 byte AD
|
||||
/// tag, followed by the encrypted data:
|
||||
///
|
||||
/// (MAGIC || CRC32 || IV || TAG || EncryptedData).
|
||||
///
|
||||
/// Unencrypted blobs simply contain the CRC, followed by the
|
||||
/// (compressed) data.
|
||||
///
|
||||
/// (MAGIC || CRC32 || Data)
|
||||
///
|
||||
/// This is basically the same format we use for ``DataChunk``, but
|
||||
/// with other magic numbers so that we can distinguish them.
|
||||
|
||||
pub struct DataBlob {
|
||||
raw_data: Vec<u8>, // tagged, compressed, encryped data
|
||||
}
|
||||
|
Reference in New Issue
Block a user