Table of Contents

BiffLimits Class

Definition

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

Defines the structural limits of the BIFF record format.

public static class BiffLimits
Inheritance
BiffLimits
Inherited Members

Remarks

The per-version maximum payload is enforced by BiffWriter and tolerated, not enforced, by BiffReader, which frames any length the 16-bit field can express. DefaultCodePage is assumed for BIFF5 byte strings until a CODEPAGE record is read, and UnicodeCodePage is the value a BIFF8 CODEPAGE record carries.

Fields

AbsoluteMaxPayloadLength

The largest payload the 16-bit length field can express, in bytes. A reader tolerates declared lengths up to this value; a writer enforces the per-version maximum.

public const int AbsoluteMaxPayloadLength = 65535

Field Value

int

Biff5MaxPayloadLength

The largest payload a BIFF5 record may declare, in bytes.

public const int Biff5MaxPayloadLength = 2080

Field Value

int

Biff8MaxPayloadLength

The largest payload a BIFF8 record may declare, in bytes.

public const int Biff8MaxPayloadLength = 8224

Field Value

int

DefaultCodePage

The default code page assumed for byte strings when no CODEPAGE record has been read (Windows-1252).

public const int DefaultCodePage = 1252

Field Value

int

RecordHeaderSize

The size, in bytes, of a record header: a 16-bit identifier followed by a 16-bit payload length.

public const int RecordHeaderSize = 4

Field Value

int

UnicodeCodePage

The code page value a BIFF8 CODEPAGE record carries to declare UTF-16LE text.

public const int UnicodeCodePage = 1200

Field Value

int

Methods

GetMaxPayloadLength(BiffVersion)

Gets the largest payload a record may declare under the specified version, in bytes.

public static int GetMaxPayloadLength(BiffVersion version)

Parameters

version BiffVersion

The BIFF version.

Returns

int

Biff5MaxPayloadLength for Biff5, Biff8MaxPayloadLength for Biff8, and AbsoluteMaxPayloadLength when the version is unknown.

Applies to

ProductVersions
.NET8, 10

See Also