Function compressYaz0

  • Compresses a data buffer using the Yaz0 algorithm.

    Parameters

    • data: ArrayBuffer | Uint8Array<ArrayBufferLike>

      The uncompressed source buffer.

    • alignment: number = 0

      The data start offset alignment inside the Yaz0 header. Defaults to 0.

    • level: number = 0

      Compression search depth (0 = fast/no compression search, 9 = maximum search depth). Defaults to 0.

    Returns Uint8Array

    The compressed Yaz0 Uint8Array bytes.