Skip to content

@statesync/persistence


@statesync/persistence / createBase64Adapter

Function: createBase64Adapter()

ts
function createBase64Adapter(): CompressionAdapter;

Defined in: persistence/src/compression.ts:278

Creates a CompressionAdapter that encodes data as Base64.

This increases data size (approximately 33% larger) but produces human-readable output that is useful for debugging and inspection. Handles Unicode strings correctly via TextEncoder/TextDecoder.

Returns

CompressionAdapter

A compression adapter with algorithm name 'base64'.

Released under the MIT License.