Skip to content

Instantly share code, notes, and snippets.

View JianWillWang's full-sized avatar
🏠
Working from home

william JianWillWang

🏠
Working from home
View GitHub Profile
@JianWillWang
JianWillWang / git-compressing-and-deltas.md
Created September 12, 2020 03:02 — forked from matthewmccullough/git-compressing-and-deltas.md
Git, Compression, and Deltas - An explanation

Git Compression of Blobs and Packfiles.

Many users of Git are curious about the lack of delta compression at the object (blob) level when commits are first written. This efficiency is saved until the pack file is written. Loose objects are written in compressed, but non-delta format at the time of each commit.

A simple run though of a commit sequence with only the smallest change to the image (in uncompressed TIFF format to amplify the observable behavior) aids the understanding of this deferred and different approach efficiency.

The command sequence:

Create the repo: