Skip to content

Commit 71af366

Browse files
committed
docs for git-odb crate (top-level)
1 parent 98c1360 commit 71af366

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

git-odb/src/lib.rs

+16
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,20 @@
11
#![deny(unsafe_code, rust_2018_idioms)]
2+
//! Git stores all of its data as _Objects_, which are nothing more than data along with a hash over all data. Thus it's an
3+
//! object store indexed by data with inherent deduplication: the same data will have the same hash, and thus occupy the same
4+
//! space within the database.
5+
//!
6+
//! There are various flavours of object databases, all of which supporting iteration, reading and possibly writing.
7+
//!
8+
//! * [`loose::Db`]
9+
//! * A database storing one object per file, named by its hash, using zlib compression.
10+
//! * O(1) reads and writes, bound by IO operations per second
11+
//! * [`pack::Bundle`]
12+
//! * A database storing multiple objects within an indexed pack file, reaching compression ratios of 60 to 1 or more.
13+
//! * Slow writes and fast reads
14+
//! * [`compound::Db`]
15+
//! * A database using a [`loose::Db`] for writes and multiple [`pack::Bundle`]s for object reading. It can also refer to multiple
16+
//! additional [`compound::Db`] instances using git-alternates.
17+
//! * This is the database closely resembling the object database in a git repository, and probably what most people would want to use.
218
319
mod zlib;
420

0 commit comments

Comments
 (0)