Why is the maxHeaderSize
21 and not 22=5+5+10+1+1?
Sorry, but no one will be able to address your question in short or mid term. Who kept that part of the code is not 100% available. Maybe he will appear in the future.
cc @ibrahim
I don’t remember how 21 was calculated but it looks like it should be 22.
Based on binary package - encoding/binary - Go Packages
We will have
type header struct {
klen uint32 // min 1 byte, max 5 bytes
vlen uint32 // min 1 byte, max 5 bytes
expiresAt uint64 // min 1 byte, max 10 bytes
meta byte // min 1 byte, max 1 byte
userMeta byte // min 1 byte, max 1 byte
}
So we get maxHeaderSize=22
1 Like
Yes, I also think the value of maxHeaderSize
is 22, not 21. Could you help to confirm it? Thanks.