Sorry, I got it slightly wrong.
ipfs object
operates on the merkledag-pb layer, which wraps the unixfs-pb.
1677 is the actual file size as reported by a field in the unixfs-protobuf (which ls
uses).
1685 is the DataSize in the block, which is the [full_blocksize - links size] (the full merkledag-pb block being 1688 ytes). So this is the size of the unixfs protobuf inside the pb-merkledag block.
Instead, if we want answers from the unixfs layer we need to use ipfs files
:
ipfs files stat /ipfs/bafybeibxm2nsadl3fnxv2sxcxmxaco2jl53wpeorjdzidjwf5aqdg7wa6u
bafybeibxm2nsadl3fnxv2sxcxmxaco2jl53wpeorjdzidjwf5aqdg7wa6u
Size: 0
CumulativeSize: 6544
ChildBlocks: 7
Type: directory
ipfs files stat /ipfs/bafybeibxm2nsadl3fnxv2sxcxmxaco2jl53wpeorjdzidjwf5aqdg7wa6u/about
QmZTR5bcpQD7cFgTorqxZDYaew1Wqgfbd2ud9QqGPAkK2V
Size: 1677
CumulativeSize: 1688
ChildBlocks: 0
Type: file
In the last one, Size
is the actual file size as it would be on disk. CumulativeSize corresponds to that of ipfs object stat
, that is, the actual size the dag under that CID takes on IPFS.