MCPcopy Create free account
hub / github.com/ColmapView/Colmapview.github.io / writeShareDataLength

Function writeShareDataLength

src/utils/shareDataCodec.ts:104–116  ·  view source on GitHub ↗
(
  view: DataView,
  offset: number,
  value: number,
  lengthFieldBytes: ShareDataLengthBytes
)

Source from the content-addressed store, hash-verified

102}
103
104function writeShareDataLength(
105 view: DataView,
106 offset: number,
107 value: number,
108 lengthFieldBytes: ShareDataLengthBytes
109): number {
110 if (lengthFieldBytes === 4) {
111 view.setUint32(offset, value, true);
112 } else {
113 view.setUint16(offset, value, true);
114 }
115 return offset + lengthFieldBytes;
116}
117
118function readShareDataLength(
119 view: DataView,

Callers 1

encodeShareDataFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected