| 272 | }; |
| 273 | |
| 274 | const writeInt64 = function (buffer, index, value) { |
| 275 | let lowBits = value.getLowBits(); |
| 276 | let highBits = value.getHighBits(); |
| 277 | // Encode low bits |
| 278 | buffer[index] = lowBits & 0xff; |
| 279 | buffer[index + 1] = (lowBits >> 8) & 0xff; |
| 280 | buffer[index + 2] = (lowBits >> 16) & 0xff; |
| 281 | buffer[index + 3] = (lowBits >> 24) & 0xff; |
| 282 | // Encode high bits |
| 283 | buffer[index + 4] = highBits & 0xff; |
| 284 | buffer[index + 5] = (highBits >> 8) & 0xff; |
| 285 | buffer[index + 6] = (highBits >> 16) & 0xff; |
| 286 | buffer[index + 7] = (highBits >> 24) & 0xff; |
| 287 | return; |
| 288 | }; |
| 289 | |
| 290 | module.exports = Request; |