itkwasm_compress_stringify.compress_stringify_async¶

Module Contents¶

Functions¶

compress_stringify_async

Given a binary, compress and optionally base64 encode.

API¶

async itkwasm_compress_stringify.compress_stringify_async.compress_stringify_async(input: bytes, stringify: bool = False, compression_level: int = 3, data_url_prefix: str = 'data:application/zstd;base64,') bytes¶

Given a binary, compress and optionally base64 encode.

Parameters:
  • input (bytes) – Input binary

  • stringify (bool) – Stringify the output

  • compression_level (int) – Compression level, typically 1-9

  • data_url_prefix (str) – dataURL prefix

Returns:

Output compressed binary

Return type:

bytes