From 3df1ad07e666d1c43c94827b552d1048c545ef45 Mon Sep 17 00:00:00 2001 From: Josh Leeb-du Toit Date: Mon, 3 Jul 2023 20:52:47 +1000 Subject: [PATCH] Minor updates to docs --- README.md | 3 ++- src/chunk.rs | 2 +- src/lib.rs | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 3ffdf6d..e6ec55c 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,8 @@ An implementation of the FastCDC algorithm for content-defined chunking. -FastCDC builds on the [Gear hashing][gear] function by applying techniques of +FastCDC builds on the [Gear-based CDC][gear] function with the following +improvements. 1. simplified and enhanced hash judgement; 2. sub-minimum chunk cut-point skipping; and diff --git a/src/chunk.rs b/src/chunk.rs index afad7d8..94abd28 100644 --- a/src/chunk.rs +++ b/src/chunk.rs @@ -48,7 +48,7 @@ impl Opts { /// /// # Panics /// - /// If the `min_len` >= `desired_len`. + /// If the minimum chunk length >= desired chunk length. pub fn with_min_len(self, min_len: usize) -> Self { assert!(min_len < self.desired_len); Self { min_len, ..self } diff --git a/src/lib.rs b/src/lib.rs index 8b11237..ff6ab46 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -8,7 +8,7 @@ pub mod chunk; mod mask; mod table; -/// Gear hasher. +/// FastCDC enhanced Gear hasher. #[derive(Clone)] pub struct Hasher<'t> { table: &'t Table, @@ -48,7 +48,7 @@ impl<'t> Hasher<'t> { } /// Returns true if the current digest is a chunk boundary with the `mask`, and false - /// otherwise. To generate a mask value, see [`mask`]. + /// otherwise. pub fn is_chunk_boundary(&self, mask: u64) -> bool { self.hash & mask == 0 } -- 2.45.2