So basically i have this piece of code that i have found into someone else's code and works fine for the thing i'm trying to do but i will like to understand how it works.
I wanna know how it differences from writting an uint32 into an array like using Uint8Array and writing inside the Uint32Array buffer or using a DataView with setUint32 doesn't gives the same result
function writeUint32(message, value){
while(true){
if((value & -128) === 0){
message.push(value)
return
}
else {
message.push(value & 127 | 128)
value >>>= 7
}
}
}