move chunker.rs to backup/

This commit is contained in:
Dietmar Maurer 2018-12-31 15:46:16 +01:00
parent 1c287cb19a
commit cb4412b18e
4 changed files with 4 additions and 7 deletions

View File

@ -134,7 +134,7 @@ impl Chunker {
let copy_len = if need < data_len { need } else { data_len }; let copy_len = if need < data_len { need } else { data_len };
unsafe { unsafe {
let src_ptr = data.as_ptr().add(pos); let src_ptr = data.as_ptr().add(pos);
let mut dest_ptr = self.window.as_mut_ptr().add(self.window_size); let dest_ptr = self.window.as_mut_ptr().add(self.window_size);
std::ptr::copy_nonoverlapping(src_ptr, dest_ptr, copy_len); std::ptr::copy_nonoverlapping(src_ptr, dest_ptr, copy_len);
} }
pos += copy_len; pos += copy_len;
@ -178,10 +178,7 @@ impl Chunker {
if self.chunk_size < self.chunk_size_min { return false; } if self.chunk_size < self.chunk_size_min { return false; }
if ((self.h % self.discriminator) == (self.discriminator - 1)) { (self.h % self.discriminator) == (self.discriminator - 1)
return true;
}
false
} }
fn start(&mut self) { fn start(&mut self) {

View File

@ -11,7 +11,7 @@ use proxmox_backup::api::router::*;
//use proxmox_backup::backup::image_index::*; //use proxmox_backup::backup::image_index::*;
//use proxmox_backup::config::datastore; //use proxmox_backup::config::datastore;
use proxmox_backup::catar::encoder::*; use proxmox_backup::catar::encoder::*;
use proxmox_backup::catar::chunker::*; use proxmox_backup::backup::chunker::*;
use proxmox_backup::backup::datastore::*; use proxmox_backup::backup::datastore::*;
use serde_json::{Value}; use serde_json::{Value};

View File

@ -39,7 +39,6 @@
pub mod binary_search_tree; pub mod binary_search_tree;
pub mod format_definition; pub mod format_definition;
pub mod chunker;
pub mod encoder; pub mod encoder;
pub mod decoder; pub mod decoder;

View File

@ -36,6 +36,7 @@ pub mod section_config;
pub mod backup { pub mod backup {
pub mod chunker;
pub mod chunk_store; pub mod chunk_store;
pub mod image_index; pub mod image_index;
pub mod datastore; pub mod datastore;