woff2-encoder
Version:
A TypeScript library for handling WOFF2 encoding using WebAssembly
15 lines (14 loc) • 517 B
TypeScript
/**
* Compresses SFNT (TrueType/OpenType) font data to WOFF2 font data.
*
* @param buffer The SFNT font data.
* @returns A promise resolving to the WOFF2 font data.
*/
export function compress(buffer: ArrayBuffer | Uint8Array): Promise<Uint8Array>;
/**
* Decompresses WOFF2 font data back to SFNT (TrueType/OpenType) font data.
*
* @param buffer The WOFF2 font data.
* @returns A promise resolving to the SFNT font data.
*/
export function decompress(buffer: ArrayBuffer | Uint8Array): Promise<Uint8Array>;