Customizing block layout for files

Hi all,

I have a small project in which i get some liberty to experiment so I’m trying out an IPFS (private with swarm key) network as a backend.

I want to store files, but these files exist of blocks that repeat between files (<4k per block)

I was wondering if it would be possible/wise to split these files into these logical sections, store each section separately, then manually link these as a file. So that when I want to retrieve a file by its hash, i automagically get all the blocks in the right order, but when adding a file, I split it into the logical sections myself, then add those as blocks manually.

Your advise is appreciated :slight_smile:

Are the blocks a fixed size? It should be technically possible to create a custom DAG structure for the file without having to store them separately, but if they’re a fixed block size you can add the file using the default adder with a 4kB block size (for example) using ipfs add --chunker=size-4096 /path/to/file.

No, they’re variable in size unfortunately