move chunker.rs to backup/
This commit is contained in:
		@ -134,7 +134,7 @@ impl Chunker {
 | 
			
		||||
            let copy_len = if need < data_len { need } else { data_len };
 | 
			
		||||
            unsafe {
 | 
			
		||||
                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);
 | 
			
		||||
            }
 | 
			
		||||
            pos += copy_len;
 | 
			
		||||
@ -178,10 +178,7 @@ impl Chunker {
 | 
			
		||||
 | 
			
		||||
        if self.chunk_size < self.chunk_size_min { return false; }
 | 
			
		||||
 | 
			
		||||
        if ((self.h % self.discriminator) == (self.discriminator - 1)) {
 | 
			
		||||
            return true;
 | 
			
		||||
        }
 | 
			
		||||
        false
 | 
			
		||||
        (self.h % self.discriminator) == (self.discriminator - 1)
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    fn start(&mut self) {
 | 
			
		||||
@ -11,7 +11,7 @@ use proxmox_backup::api::router::*;
 | 
			
		||||
//use proxmox_backup::backup::image_index::*;
 | 
			
		||||
//use proxmox_backup::config::datastore;
 | 
			
		||||
use proxmox_backup::catar::encoder::*;
 | 
			
		||||
use proxmox_backup::catar::chunker::*;
 | 
			
		||||
use proxmox_backup::backup::chunker::*;
 | 
			
		||||
use proxmox_backup::backup::datastore::*;
 | 
			
		||||
use serde_json::{Value};
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -39,7 +39,6 @@
 | 
			
		||||
 | 
			
		||||
pub mod binary_search_tree;
 | 
			
		||||
pub mod format_definition;
 | 
			
		||||
pub mod chunker;
 | 
			
		||||
pub mod encoder;
 | 
			
		||||
pub mod decoder;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -36,6 +36,7 @@ pub mod section_config;
 | 
			
		||||
 | 
			
		||||
pub mod backup {
 | 
			
		||||
 | 
			
		||||
    pub mod chunker;
 | 
			
		||||
    pub mod chunk_store;
 | 
			
		||||
    pub mod image_index;
 | 
			
		||||
    pub mod datastore;
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user