Table of Contents

BiffReaderState Struct

Definition

Namespace
Bodu.IO.Biff
Assembly
Bodu.IO.Biff.dll
Package
Bodu.IO.Biff 1.0.0
Source
BiffReaderState.cs

Carries the state a BiffReader needs to continue a stream across buffers: the established BIFF version and the active code page.

public struct BiffReaderState
Inherited Members
Extension Methods

Remarks

BiffReader is a ref struct and cannot be stored in a field. A consumer that reads incrementally - a class that walks a substream one record per call, or a loop feeding chunks of a Stream - captures CurrentState after each pass, slices its buffer at BytesConsumed, and constructs the next reader from the remaining bytes and the captured state. The record position itself is not part of the state: it is expressed by where the caller slices the buffer.

Constructors

BiffReaderState(BiffReaderOptions)

Initializes a new instance of the BiffReaderState struct describing the start of a stream.

public BiffReaderState(BiffReaderOptions options = default)

Parameters

options BiffReaderOptions

The options that seed the version and code page.

Properties

CodePage

Gets the code page in effect for byte strings.

public readonly int CodePage { get; }

Property Value

int

The Windows code page number from the most recent CODEPAGE record or the options, or DefaultCodePage when neither has supplied one.

Options

Gets the options the reader was created with.

public readonly BiffReaderOptions Options { get; }

Property Value

BiffReaderOptions

The options.

Version

Gets the BIFF version established so far.

public readonly BiffVersion Version { get; }

Property Value

BiffVersion

The version, or Unknown before a BOF record has been read.

Applies to

ProductVersions
.NET8, 10