MCPcopy Index your code
hub / github.com/awayjs/core / writeUnsignedByte

Method writeUnsignedByte

lib/utils/ByteArray.ts:116–124  ·  view source on GitHub ↗
(b: number)

Source from the content-addressed store, hash-verified

114 }
115
116 public writeUnsignedByte(b: number): void {
117 this.ensureWriteableSpace(1);
118
119 const view = new Uint8Array(this.arraybytes);
120 view[this.position++] = (~~b) & 0xff; // ~~ is cast to int in js...
121
122 if (this.position > this.length)
123 this.length = this.position;
124 }
125
126 public readUnsignedByte(): number {
127 if (this.position >= this.length)

Callers 1

writeUTFBytesMethod · 0.95

Calls 1

ensureWriteableSpaceMethod · 0.95

Tested by

no test coverage detected