chmike / varint

variable length integer encoding using prefix code

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

contribute to the standard library

phanirithvij opened this issue · comments

If you don't mind me asking, why not contribute to the standard library instead of creating a new tool?

Forgive me as I don't know how the encode/decode logic is working but I can see that they are replacements with the same function signature as encoding/binary with obvious orders of magnitude of improvements from your benchmarks, that's why I'm asking this question.

Won't it be more useful to contribute to the standard library than create this, because of added dependency cost and discoverability of this repo?

Thank you for the compliment. It might be added in the standard library only if other packages of the standard library use it. The LEB128 encoding is used in protocol buffer, GOB, and many places. That is the reason it is present in the standard library.
The prefix encoding is known to be faster but not widely used.

The powerful package system of Go make it easy to use my varint package without being integrated in the standard library.

What is important is its visibility and this is where awesome-go plays a key role.

Ok thanks for clarifying