A method of transmitting a computer file across a network, said method comprising:
- using at least one transmitting network peer computer, and a hash operation, to divide said computer file into a plurality of smaller parts, and describe each part with a part-hash-value, a part-offset, and a file-part-hash-context value, thereby creating a plurality of part-descriptors;
- each said part-descriptor comprising said part-hash-value, said part-offset, and said file-part-hash-context value;
- wherein said file-part-hash-context value comprises an intermediate state of an original computer file hash, produced by said hash operation, from a beginning of said computer file to a position of a given part in said computer file;
- wherein, for an arbitrary part, said arbitrary part's part-hash-value is produced by said hash operation on said arbitrary part from a beginning of said arbitrary part to an end of said arbitrary part;
- wherein, for a last part of said computer file, said hash operation on a file-part-hash context-value of the part prior to the last part, and said last part, equals said hash operation on said computer file;
- generating part-descriptors for each said parts, packaging at least some of said part-descriptors in at least one container;
- and transmitting at least some parts, and said at least one container with at least some of said part-descriptors, to at least one other receiving network peer computer;
- receiving, at said at least one other receiving network peer computer, at least some parts as received parts, and received containers comprising at least some said part-descriptors as a received part-descriptors, thus receiving at least some received parts, received part-hash-values, received part-offsets, and received part-hash-context values;
- using said at least some said received parts, said received part-hash values, said received part offsets, and said received part-hash-context values to perform any of:
- a) identify missing/corrupted received parts or missing/corrupted received part containers with missing/corrupted part descriptors, and sending network requests for said missing/corrupted received parts or missing/corrupted received part containers;
- b) create a candidate received computer file, and using said hash operation to compute a candidate received computer-file-hash, and verifying accuracy of said candidate received computer file by comparing said candidate received computer-file-hash with said hash operation on at least one received part-hash-value and this part's corresponding received file-part-hash-context value, through to the last part;
- c) continuing a hash operation on a received candidate computer file in an absence of certain received parts, by taking from a received container, a received file-part-hash-context value of a file part with the largest part offset, and using its received file-part-hash-context value to continue with said hash operation in an absence of at least some received parts with smaller part offsets;
- d) reducing a required computation time for recalculation of hashes of any modified files by utilizing a part-hash-context-value of the part that ends closest to the offset of said modification, such that the modification start offset minus the end of the file-part is the smallest zero-or-positive number, thus reducing the number of bytes required to be re-examined by said hashing operation;
- e) notifying peer nodes regarding relationship between computer-file-hashes, their related container hashes, and any specific file modification operations that connect them together.