ZstandardDictionary
OfficeIMO.Archives
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
- Method ZstandardDictionary.Load
- Method ZstandardDictionary.LoadRaw
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[]
- options OfficeIMO.Archives.ArchiveReadOptions? = null
Returns
ZstandardDictionaryExceptions
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[]
- options OfficeIMO.Archives.ArchiveReadOptions? = null
Returns
ZstandardDictionaryExceptions
ArchiveCorruptionException– content is shorter than 8 bytes.OfficeInspectionResourceLimitException– The content is larger than the window limit.
Inherited Methods
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.