Skip to content

chunkLayout

chunkLayout(ciphertextSize, chunkSize): ChunkLayout

Defined in: packages/filecoin-encryption-envelope/src/chunk-layout.ts:27

Derive the chunk layout of a stored blob from its ciphertext size and chunk size — never the reverse. A declared chunk_count header must be checked against chunkLayout(...).chunkCount, not the other way around, or a truncated object would go undetected (docs/tech-spec.md, “Three rules make the check correct”).

ParameterType
ciphertextSizenumber
chunkSizenumber

ChunkLayout