Function
writeUInt32LE
(destination: Uint8Array, value: number, offset: number)
Source from the content-addressed store, hash-verified
| 170 | } |
| 171 | |
| 172 | export function writeUInt32LE(destination: Uint8Array, value: number, offset: number): void { |
| 173 | destination[offset + 0] = (value & 0b11111111); |
| 174 | value = value >>> 8; |
| 175 | destination[offset + 1] = (value & 0b11111111); |
| 176 | value = value >>> 8; |
| 177 | destination[offset + 2] = (value & 0b11111111); |
| 178 | value = value >>> 8; |
| 179 | destination[offset + 3] = (value & 0b11111111); |
| 180 | } |
| 181 | |
| 182 | export function readUInt8(source: Uint8Array, offset: number): number { |
| 183 | return source[offset]; |
Tested by
no test coverage detected