ipfs / ipfs/kubo

Intelligent chunking for archives

Open
#5,323 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
17.1k
Forks
3.2k
Avg merge
3d 18h
Merged PRs (30d)
11

Description

#### Type:

Enhancement.

#### Description:

A commonly cited use of IPFS is in managing archival data, however currently the process IPFS handles archives with could be improved. Take the use case of an archival utility that regularly takes a snapshot of a set of files in ZIP format. Despite many of the files being identical between the archives, even slight changes (especially in files earlier in the archive) can cause the archive to produce an entirely different hash, unnecessarily requiring complete duplication of the archive in the IPFS repo.

![a](https://user-images.githubusercontent.com/8099139/43507190-81dae0fa-95c0-11e8-80ec-acd8c74f4004.png)

Pictured above is the file structure of the ZIP-64 archive format. The method to read it is to parse the final bytes of the archive to get the offset of the central directory, and then step through the directory which contains the offsets of every compressed file in the archive. If these file offsets were interpreted by IPFS as bytes to start a new chunk at, this alone would be sufficient to deduplicate the files across any number of zip archives (presuming the archives were created using the same compression options).

Contributor guide

Open the contributing guide

Research direction

No files, tests, or entry points are named; begin by tracing how Kubo parses archives and chooses chunk boundaries, then assess the proposed ZIP central-directory offsets. Done would require an agreed design, implementation scope, and tests demonstrating deduplication across changed archives.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.