Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

ZstandardDictionary

OfficeIMO.Archives

Namespace
OfficeIMO.Archives
Assembly
OfficeIMO.Archives
Source revision
273d35d5ba8a with working tree changes
Modifiers
sealed

A Zstandard dictionary for frames compressed against shared content (RFC 8878, section 5).

Inheritance

  • object
  • ZstandardDictionary

Usage

Explore 3 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Returned or exposed by 2

Accepted by parameters 1

Methods

public static ZstandardDictionary Load(byte[] dictionary, ArchiveReadOptions? options = null) #

Parses a dictionary, such as one written by zstd --train. Bytes without the dictionary magic number are used as raw content, which must be at least 8 bytes. The content is held to ArchiveReadOptions.MaxWindowBytes of options before it is copied.

Parameters

dictionary byte[] required
options OfficeIMO.Archives.ArchiveReadOptions? = null optional

Exceptions

  • ArchiveCorruptionException – The dictionary header or tables are malformed.
  • OfficeInspectionResourceLimitException – The content is larger than the window limit.
public static ZstandardDictionary LoadRaw(byte[] content, ArchiveReadOptions? options = null) #

Uses content as a raw-content dictionary, even when it starts with the dictionary magic number, as zstd's raw dictionary mode does. Raw content must be at least 8 bytes and has dictionary ID zero. It is held to ArchiveReadOptions.MaxWindowBytes of options before it is copied.

Parameters

content byte[] required
options OfficeIMO.Archives.ArchiveReadOptions? = null optional

Exceptions

  • ArchiveCorruptionException – content is shorter than 8 bytes.
  • OfficeInspectionResourceLimitException – The content is larger than the window limit.

Properties

public uint Id { get; } #

Dictionary ID from the dictionary header, or zero for a raw-content dictionary.

public bool HasEntropyTables { get; } #

True when the dictionary carries its own entropy tables and repeat offsets.

public int ContentLength { get; } #

Length of the dictionary content that frames may reference.