MCPcopy Create free account
hub / github.com/Tencent/libpag / readEncodedUint32

Method readEncodedUint32

web/lite/src/codec/utils/byte-array.ts:171–189  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

169 }
170
171 public readEncodedUint32(): number {
172 const valueMask = 127;
173 const hasNext = 128;
174 let value = 0;
175 let byte = 0;
176 for (let i = 0; i < 32; i += 7) {
177 if (this._position >= this.length) {
178 throw Error('readEncodedUint32 End of file was encountered.');
179 }
180 byte = this.dataView.getUint8(this._position);
181 this._position += 1;
182 value |= (byte & valueMask) << i;
183 if ((byte & hasNext) === 0) {
184 break;
185 }
186 }
187 this.positonChanged();
188 return value;
189 }
190
191 public readEncodeInt32(): number {
192 const data = this.readEncodedUint32();

Callers 14

readEncodeInt32Method · 0.95
readRatioFunction · 0.45
readIDFunction · 0.45
readLayerIDFunction · 0.45
readMaskIDFunction · 0.45
readCompositionIDFunction · 0.45
readKeyframesFunction · 0.45
readValueMethod · 0.45
readCompositionReferenceFunction · 0.45
readVectorCompositionFunction · 0.45
readVideoSequenceFunction · 0.45

Calls 1

positonChangedMethod · 0.95

Tested by

no test coverage detected