Skip to content
This repository has been archived by the owner. It is now read-only.

File systems chunk small files - big files #223

Closed
rddaz2013 opened this issue Feb 7, 2017 · 2 comments
Closed

File systems chunk small files - big files #223

rddaz2013 opened this issue Feb 7, 2017 · 2 comments

Comments

@rddaz2013
Copy link

rddaz2013 commented Feb 7, 2017

I hope the description on the site https://medium.com/@ConsenSys/an-introduction-to-ipfs-9bba4860abd0#.zbe99k4rn is not out of date.

My question is...

A small file (< 256 kB) is represented by an IPFS object with data being the file contents (plus a small header and footer) and no links, i.e. the links array is empty. Note that the file name is not part of the IPFS object, so two files with different names and the same content will have the same IPFS object representation and hence the same hash.

That fine....but for large files..

A large file (> 256 kB) is represented by a list of links to file chunks that are < 256 kB, and only minimal Data specifying that this object represents a large file. The links to the file chunks have empty strings as names.

Why 256kB?
Is the Hash taken only from the data - not 'Name' and 'Link'?

@whyrusleeping
Copy link

whyrusleeping commented Feb 7, 2017

256k was chosen as a decent size block chunk that is evenly divisible by standard disk block sizes. Hashes are taken over the entire structure, as a merkletree

@flyingzumwalt
Copy link
Contributor

flyingzumwalt commented May 23, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants