Where is the patches format documented?

At https://pijul.org/manual/format.html#format-of-a-pijul-repository only the pristine subdirectory is documented but how about the rest of the repository format? In particular I’d like to know more about the patches subdirectory:

  • how and from what are the hash values computed (so they can be verified/computed with standard command line tools)?
  • what’s the data structure/format of a patch? (I could reverse-engineer zcat ... | hd) but there sure is a better way