Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Create signedVarInt reader #5230

Closed
pablitovicente opened this issue Apr 29, 2020 · 0 comments
Closed

Create signedVarInt reader #5230

pablitovicente opened this issue Apr 29, 2020 · 0 comments
Assignees
Milestone

Comments

@pablitovicente
Copy link
Contributor

pablitovicente commented Apr 29, 2020

Description

Create function signedVarint(buffer, schema) => value

Motivation

lisk-codec will include a set of Readers for each data type defined in the LIP, to that end
we need a function to read Signed VarInts.

Acceptance Criteria

  • signedVarint() should accept a buffer representation of a signed varint value
  • signedVarint() returns either a signed number or a BigInt (this is controlled by the schema)
  • Code should be optimised for speed as much as possible
  • Full test coverage
  • Performance stats are provided based on the reading of values of different sizes and measure the reading of 100, 500, 1000, 30000 signedVarint

Additional Information

Check if it will make sense to implement varints in same issue.

Related issues: #5200

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants