Function deltachat::imex::import_backup_stream

source ยท
pub(crate) async fn import_backup_stream<R: AsyncRead + Unpin>(
    context: &Context,
    backup_file: R,
    file_size: u64,
    passphrase: String,
) -> Result<()>
Expand description

Imports backup by reading a tar file from a stream.

file_size is used to calculate the progress and emit progress events. Ideally it is the sum of the entry sizes without the header overhead, but can be estimated as tar file size in which case the progress is underestimated and may not reach 99.9% by the end of import. Underestimating is better than overestimating because the progress jumps to 100% instead of getting stuck at 99.9% for some time.