File specification processing
When serving as a storage service, file specification processing is the first step in file storage.
File specification processing will cut the file into pieces according to the size of 64M, and fill the insufficient parts with zero. The cut file will soon become a segment. Then each segment will be redundantly processed to obtain 6 file fragments with a size of 16M, which is called For fragments, arrange all fragments in segment order called a tree structure, calculate the hash-256 values of all fragments, and the final calculated root hash of the tree is the root hash of the file, also called fid, which is used to uniquely identify the file. document.
Refer to the following code:
Last updated