Skip to content

Encoding negative numbers makes the program stall #6

Open

Description

@jw2476

Using varint.encode(-1) makes the program indefinitely stall.
Is this expected behaviour, because I really need to be able to write negative varints.

Activity

  1. w1nte commented on Jul 25, 2020

    @w1nte

    I faced the same problem. According to the wikipedia article about Variable-length quanitity only unsigned integers are defined in the basic implementation. So you need another variant of varint like ZigZag encoding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions