Skip to content

BlockSuite API Documentation / @blocksuite/store / Y / UpdateEncoderV2

Class: UpdateEncoderV2

Extends

  • DSEncoderV2

Constructors

new UpdateEncoderV2()

new UpdateEncoderV2(): UpdateEncoderV2

Returns

UpdateEncoderV2

Inherited from

DSEncoderV2.constructor

Properties

clientEncoder

clientEncoder: UintOptRleEncoder

Source

node_modules/.pnpm/yjs@13.6.15/node_modules/yjs/dist/src/utils/UpdateEncoder.d.ts:94


dsCurrVal

dsCurrVal: number

Inherited from

DSEncoderV2.dsCurrVal

Source

node_modules/.pnpm/yjs@13.6.15/node_modules/yjs/dist/src/utils/UpdateEncoder.d.ts:69


infoEncoder

infoEncoder: RleEncoder<number>

Source

node_modules/.pnpm/yjs@13.6.15/node_modules/yjs/dist/src/utils/UpdateEncoder.d.ts:97


keyClock

keyClock: number

Refers to the next uniqe key-identifier to me used. See writeKey method for more information.

Source

node_modules/.pnpm/yjs@13.6.15/node_modules/yjs/dist/src/utils/UpdateEncoder.d.ts:92


keyClockEncoder

keyClockEncoder: IntDiffOptRleEncoder

Source

node_modules/.pnpm/yjs@13.6.15/node_modules/yjs/dist/src/utils/UpdateEncoder.d.ts:93


keyMap

keyMap: Map<string, number>

Source

node_modules/.pnpm/yjs@13.6.15/node_modules/yjs/dist/src/utils/UpdateEncoder.d.ts:85


leftClockEncoder

leftClockEncoder: IntDiffOptRleEncoder

Source

node_modules/.pnpm/yjs@13.6.15/node_modules/yjs/dist/src/utils/UpdateEncoder.d.ts:95


lenEncoder

lenEncoder: UintOptRleEncoder

Source

node_modules/.pnpm/yjs@13.6.15/node_modules/yjs/dist/src/utils/UpdateEncoder.d.ts:101


parentInfoEncoder

parentInfoEncoder: RleEncoder<number>

Source

node_modules/.pnpm/yjs@13.6.15/node_modules/yjs/dist/src/utils/UpdateEncoder.d.ts:99


restEncoder

restEncoder: Encoder

Inherited from

DSEncoderV2.restEncoder

Source

node_modules/.pnpm/yjs@13.6.15/node_modules/yjs/dist/src/utils/UpdateEncoder.d.ts:68


rightClockEncoder

rightClockEncoder: IntDiffOptRleEncoder

Source

node_modules/.pnpm/yjs@13.6.15/node_modules/yjs/dist/src/utils/UpdateEncoder.d.ts:96


stringEncoder

stringEncoder: StringEncoder

Source

node_modules/.pnpm/yjs@13.6.15/node_modules/yjs/dist/src/utils/UpdateEncoder.d.ts:98


typeRefEncoder

typeRefEncoder: UintOptRleEncoder

Source

node_modules/.pnpm/yjs@13.6.15/node_modules/yjs/dist/src/utils/UpdateEncoder.d.ts:100

Methods

resetDsCurVal()

resetDsCurVal(): void

Returns

void

Inherited from

DSEncoderV2.resetDsCurVal

Source

node_modules/.pnpm/yjs@13.6.15/node_modules/yjs/dist/src/utils/UpdateEncoder.d.ts:71


toUint8Array()

toUint8Array(): Uint8Array

Returns

Uint8Array

Inherited from

DSEncoderV2.toUint8Array

Source

node_modules/.pnpm/yjs@13.6.15/node_modules/yjs/dist/src/utils/UpdateEncoder.d.ts:70


writeAny()

writeAny(any): void

Parameters

any: any

Returns

void

Source

node_modules/.pnpm/yjs@13.6.15/node_modules/yjs/dist/src/utils/UpdateEncoder.d.ts:139


writeBuf()

writeBuf(buf): void

Parameters

buf: Uint8Array

Returns

void

Source

node_modules/.pnpm/yjs@13.6.15/node_modules/yjs/dist/src/utils/UpdateEncoder.d.ts:143


writeClient()

writeClient(client): void

Parameters

client: number

Returns

void

Source

node_modules/.pnpm/yjs@13.6.15/node_modules/yjs/dist/src/utils/UpdateEncoder.d.ts:113


writeDsClock()

writeDsClock(clock): void

Parameters

clock: number

Returns

void

Inherited from

DSEncoderV2.writeDsClock

Source

node_modules/.pnpm/yjs@13.6.15/node_modules/yjs/dist/src/utils/UpdateEncoder.d.ts:75


writeDsLen()

writeDsLen(len): void

Parameters

len: number

Returns

void

Inherited from

DSEncoderV2.writeDsLen

Source

node_modules/.pnpm/yjs@13.6.15/node_modules/yjs/dist/src/utils/UpdateEncoder.d.ts:79


writeInfo()

writeInfo(info): void

Parameters

info: number

An unsigned 8-bit integer

Returns

void

Source

node_modules/.pnpm/yjs@13.6.15/node_modules/yjs/dist/src/utils/UpdateEncoder.d.ts:117


writeJSON()

writeJSON(embed): void

This is mainly here for legacy purposes.

Initial we incoded objects using JSON. Now we use the much faster lib0/any-encoder. This method mainly exists for legacy purposes for the v1 encoder.

Parameters

embed: any

Returns

void

Source

node_modules/.pnpm/yjs@13.6.15/node_modules/yjs/dist/src/utils/UpdateEncoder.d.ts:151


writeKey()

writeKey(key): void

Property keys are often reused. For example, in y-prosemirror the key bold might occur very often. For a 3d application, the key position might occur very often.

We cache these keys in a Map and refer to them via a unique number.

Parameters

key: string

Returns

void

Source

node_modules/.pnpm/yjs@13.6.15/node_modules/yjs/dist/src/utils/UpdateEncoder.d.ts:160


writeLeftID()

writeLeftID(id): void

Parameters

id: ID

Returns

void

Source

node_modules/.pnpm/yjs@13.6.15/node_modules/yjs/dist/src/utils/UpdateEncoder.d.ts:105


writeLen()

writeLen(len): void

Write len of a struct - well suited for Opt RLE encoder.

Parameters

len: number

Returns

void

Source

node_modules/.pnpm/yjs@13.6.15/node_modules/yjs/dist/src/utils/UpdateEncoder.d.ts:135


writeParentInfo()

writeParentInfo(isYKey): void

Parameters

isYKey: boolean

Returns

void

Source

node_modules/.pnpm/yjs@13.6.15/node_modules/yjs/dist/src/utils/UpdateEncoder.d.ts:125


writeRightID()

writeRightID(id): void

Parameters

id: ID

Returns

void

Source

node_modules/.pnpm/yjs@13.6.15/node_modules/yjs/dist/src/utils/UpdateEncoder.d.ts:109


writeString()

writeString(s): void

Parameters

s: string

Returns

void

Source

node_modules/.pnpm/yjs@13.6.15/node_modules/yjs/dist/src/utils/UpdateEncoder.d.ts:121


writeTypeRef()

writeTypeRef(info): void

Parameters

info: number

An unsigned 8-bit integer

Returns

void

Source

node_modules/.pnpm/yjs@13.6.15/node_modules/yjs/dist/src/utils/UpdateEncoder.d.ts:129