@mui/internal-docs-infra
Version:
MUI Infra - internal documentation creation tools.
20 lines • 911 B
text/typescript
/**
* Decompress a base64-encoded DEFLATE payload that was compressed with
* `compressHast`. Returns the original JSON string.
*
* When `textContent` is provided, the first 4 bytes of the decoded payload
* are treated as a dictionary checksum. If the checksum does not match the
* dictionary built from `textContent`, a `HastDictionaryMismatchError` is
* thrown — this prevents silently rendering corrupted data.
*
* When `textContent` is omitted, only the static dictionary is used for
* decompression and no checksum verification is performed.
*/
export declare function decompressHast(base64: string, textContent?: string): string;
/**
* Decompress a base64-encoded DEFLATE payload asynchronously.
* Returns the original JSON string.
*
* See `decompressHast` for `textContent` semantics.
*/
export declare function decompressHastAsync(base64: string, textContent?: string): Promise<string>;