MLA icon indicating copy to clipboard operation
MLA copied to clipboard

Add a "check" API / command

Open commial opened this issue 5 years ago • 0 comments

For now, integrity checks are opt-out by default. Indeed, they potentially imply a costly additional content read. One can already check for them, using the get_hash API, for each file.

It would be nice to have a dedicated helper in mla and a mlar check command, to easily check for:

  • Integrity of all files in the archive
  • Proper termination of the archive (presence of the EndOfArchiveData, meaning the file contents are not truncated)
  • Presence and readability of the footer, with a potential sanity check of it (does the raw information in the archive matches the footer?)

This would be a convenient way to easily ensure that an archive is readable on receive / before sending it.

Regarding the implementation in mla, a linear read is probably the best and faster method to achieve it.

commial avatar Aug 18 '20 12:08 commial