Companion
object Companion
Functions
Link copied to clipboard
suspend fun fromBytes(key: String, bytes: ByteArray, options: Document.Options = Options()): Document
Rebuilds a Document from a byte envelope produced by toBytes. The envelope carries at least four blobs (snapshot, checkpoint, changeID, pending changes); a missing epoch blob decodes as 0 and a missing docId blob decodes as "", so a legacy four- or five-blob envelope still decodes. Blobs beyond the sixth are ignored rather than rejected, so an app downgrade cannot discard un-pushed edits carried in an envelope written by a newer SDK.