docs: function readHead(type, buf) {
    var tap = new Tap(buf);
    var head = type._read(tap);
    if (!tap.isValid()) {
      throw new Error(f('truncated %j', type.schema()));
    }
    return {head: head, tail: tap.buf.slice(tap.pos)};
  }