calculate
function calculate(data): PieceLink;Defined in: packages/synapse-core/src/piece.ts:79
Calculate the PieceCID (Piece Commitment) for a given data blob
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
data | Uint8Array | The binary data to calculate the PieceCID for |
Returns
Section titled “Returns”PieceLink
The calculated PieceCID CID