Buffer Fragmentation and Challenges #30
Replies: 1 comment
-
|
I believe there is an issue with the timestamp bytes in challenge 1. If we read it as double from the buffer, then it produces 1701896373.429757, the integer part is nowhere near the expected timestamp 1672531200000. Even if you create fractional part to integer it still is not close enough. However, if you use these bytes: const b = Buffer.alloc(8);
b.writeDoubleBE(1672531200000, 0);
console.log(b) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Buffer Fragmentation and Challenges
Understanding memory fragmentation, challenges with buffer management, and solutions for optimal performance.
https://www.thenodebook.com/buffers/fragmentation-and-challenges
Beta Was this translation helpful? Give feedback.
All reactions