src/backup/data_blob.rs - encode: always compute crc
This commit is contained in:
parent
38a6cddad7
commit
eecb23560b
@ -128,7 +128,9 @@ impl DataBlob {
|
|||||||
zstd::stream::copy_encode(data, &mut comp_data, 1)?;
|
zstd::stream::copy_encode(data, &mut comp_data, 1)?;
|
||||||
|
|
||||||
if comp_data.len() < max_data_len {
|
if comp_data.len() < max_data_len {
|
||||||
return Ok(DataBlob { raw_data: comp_data });
|
let mut blob = DataBlob { raw_data: comp_data };
|
||||||
|
blob.set_crc(blob.compute_crc());
|
||||||
|
return Ok(blob);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user