powered by
Encodes a sync state to a raw vector for persistence or transmission. The encoded state can later be restored with am_sync_state_decode().
am_sync_state_decode()
am_sync_state_encode(sync_state)
A raw vector containing the serialized sync state.
A sync state object (created with am_sync_state())
am_sync_state()
This is useful for persisting sync progress across sessions, avoiding the need to re-sync from scratch.
am_sync_state_decode(), am_sync_state()
sync_state <- am_sync_state() # Encode for storage bytes <- am_sync_state_encode(sync_state) bytes # Restore later restored <- am_sync_state_decode(bytes) restored
Run the code above in your browser using DataLab