Disc Space Cost Function

From @ibnesayeed on Thu Mar 24 2016 03:50:00 GMT+0000 (UTC)

Given a UNIX directory path with handful of files in it of varying sizes, is there any way to estimate how much storage space will be needed in the IPFS Data directory if everything is added to it? Is there a function in which we can put these parameters and calculate the storage requirement?


Copied from original issue: https://github.com/ipfs/faq/issues/101

From @Kubuxu on Thu Mar 24 2016 05:54:15 GMT+0000 (UTC)

It can be from 1.2 times more to anywhere less.

It is because IPFS adds some overhead but it also performs deduplication.
Good example is cdnjs, the directory in linux file system is 21GB, the IPFS data directory after adding it is 15GB.