public async ValueTask <SignatureOptions> ReadHeader(CancellationToken ct) { var header = await _reader.Read <SignatureHeader>(ct).ConfigureAwait(false) ?? throw new FormatException($"expected {nameof(SignatureHeader)}; got EOF"); return(header.Options); }
private async ValueTask ReadHeader(CancellationToken ct) { var header = await _reader.Read <DeltaHeader>(ct).ConfigureAwait(false); if (!header.HasValue) { throw new FormatException("failed to read delta header"); } }