A hash.Hash implementation of fil-commitment-unsealed
Package commp allows calculating a Filecoin Unsealed Commitment (commP/commD) given a bytestream. It is implemented as a standard hash.Hash() interface, with the entire padding and treebuilding algorithm written in golang.
The returned digest is a 32-byte raw commitment payload. Use something like DataCommitmentV1ToCID in order to convert it to a proper cid.Cid.
The output of this library is 100% identical to ffi.GeneratePieceCIDFromFile()