]> git.proxmox.com Git - proxmox-backup.git/blobdiff - src/backup/index.rs
add and implement chunk_from_offset for IndexFile
[proxmox-backup.git] / src / backup / index.rs
index efdf3b5408b7b616a76b9531e37871f5331efbf2..2eab8524d128cac031698be975b0e2465bf5fade 100644 (file)
@@ -22,6 +22,9 @@ pub trait IndexFile {
     fn index_bytes(&self) -> u64;
     fn chunk_info(&self, pos: usize) -> Option<ChunkReadInfo>;
 
+    /// Get the chunk index and the relative offset within it for a byte offset
+    fn chunk_from_offset(&self, offset: u64) -> Option<(usize, u64)>;
+
     /// Compute index checksum and size
     fn compute_csum(&self) -> ([u8; 32], u64);