MCPcopy
hub / github.com/webpack/webpack / readU8

Method readU8

lib/serialization/BinaryMiddleware.js:278–290  ·  view source on GitHub ↗

* Returns u8. * @returns {number} U8

()

Source from the content-addressed store, hash-verified

276 * @returns {number} U8
277 */
278 readU8() {
279 this.ensureBuffer();
280 /**
281 * There is no need to check remaining buffer size here
282 * since {@link ReadState#checkOverflow} guarantees at least one byte remaining
283 */
284 const byte =
285 /** @type {Buffer} */
286 (this.currentBuffer).readUInt8(this.currentPosition);
287 this.currentPosition += I8_SIZE;
288 this.checkOverflow();
289 return byte;
290 }
291
292 /**
293 * Returns u32.

Callers 2

_deserializeMethod · 0.95

Calls 2

ensureBufferMethod · 0.95
checkOverflowMethod · 0.95

Tested by

no test coverage detected