filecoin-pin
Version:
Bridge IPFS content to Filecoin Onchain Cloud using familiar tools
11 lines • 358 B
JavaScript
import { PDP_LEAF_SIZE } from './constants.js';
/**
* Pad raw size to the next multiple of 32 bytes
*
* @param rawSizeBytes - The actual size in bytes
* @returns Padded size (next multiple of 32)
*/
export function padSizeToPDPLeaves(rawSizeBytes) {
return Math.ceil(rawSizeBytes / PDP_LEAF_SIZE) * PDP_LEAF_SIZE;
}
//# sourceMappingURL=utils.js.map