We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
原本的makeSpace_是根据前置字节+可读字节与len判断,容不下len时resize(writePos_ + len + 1)。想极端一点:这个如果当len刚好是prependableBytes()+1,而且之后的读都没比这个大的话,那不是一直占用没用到的字节?因为writableBytes()已经是0了,所以就得扩充额外的前置字节+1,但是理论上扩充长度为1,然后再把可读前移,就能放下了,感觉没必要扩充额外字节。 所以就修改了扩充字节数以及把else分支取消,无论怎么样都需要前移
The text was updated successfully, but these errors were encountered:
No branches or pull requests
原本的makeSpace_是根据前置字节+可读字节与len判断,容不下len时resize(writePos_ + len + 1)。想极端一点:这个如果当len刚好是prependableBytes()+1,而且之后的读都没比这个大的话,那不是一直占用没用到的字节?因为writableBytes()已经是0了,所以就得扩充额外的前置字节+1,但是理论上扩充长度为1,然后再把可读前移,就能放下了,感觉没必要扩充额外字节。

所以就修改了扩充字节数以及把else分支取消,无论怎么样都需要前移
The text was updated successfully, but these errors were encountered: