On Sun, Aug 29, 2021 at 1:08 PM Kamil Ziemian <kziemian...@gmail.com> wrote:
> Thank for explanation, but I don't understand "But how many bits do you > need to represent 0? The question is malformed as there are no set bits in > the used representation of 0.". Why this is malformed questions? When I > think of coding 1, I think about thaking one bit with 1 inside and when it > goes to 0, I would take one bit with 0 inside. > Consider a variable length encoding scheme as used by some RPC protocols or mechanisms like Google protobufs. How many bits does it take to encode a zero? Zero with a length prefix of zero. -- Kurtis Rader Caretaker of the exceptional canines Junior and Hank -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CABx2%3DD9R-R%2BksNvcGr7i_WB2qEkWNJx6harJgY6a8e3TOP3d0w%40mail.gmail.com.