Skip to content

Restores a sync state from a raw vector previously created by am_sync_state_encode(). This allows continuing a sync session from where it left off.

Usage

am_sync_state_decode(data)

Arguments

data

A raw vector containing a serialized sync state

Value

An am_syncstate object.

Examples

sync_state <- am_sync_state()
bytes <- am_sync_state_encode(sync_state)

# Restore sync state
restored <- am_sync_state_decode(bytes)
restored
#> <Automerge Sync State>