Zrodlo/Docs

zrodlo corpus inspect

Validate a corpus against its manifest and report the manifest.

Usage#

sh
zrodlo corpus inspect --corpus corpus/

Flags#

FlagRequiredDescription
--corpusyesThe corpus directory to validate

What it does#

Validates a corpus against its manifest, its token count and the digest of tokens.bin, and reports the manifest. It maps tokens.bin from disk and reads it in place, so a corpus larger than memory is read page by page. It writes nothing.

Refusals#

  • corpus manifest <path> cannot be read
  • <path> is not a Zrodlo corpus manifest
  • <path> belongs to product <name>, not zrodlo
  • <path> has digest <digest>, but <path> recorded <digest>; the corpus was changed after it was prepared
  • <path> holds <n> tokens, but its manifest recorded <n>
  • <path> is not a whole number of aligned u32 tokens: <n> bytes before and <n> after them