MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / readS16

Method readS16

tools/compressbmf.js:268–273  ·  view source on GitHub ↗
(bytes)

Source from the content-addressed store, hash-verified

266 return value;
267 }
268 readS16(bytes) {
269 let value = (bytes[bytes.position]) | (bytes[bytes.position + 1] << 8);
270 if (value > 32767) value -= 65536;
271 bytes.position += 2;
272 return value;
273 }
274 readU8(bytes) {
275 return bytes[bytes.position++];
276 }

Callers 1

runMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected