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

Create signedVarInt writer #5229

Closed
pablitovicente opened this issue Apr 29, 2020 · 0 comments · Fixed by #5319
Closed

Create signedVarInt writer #5229

pablitovicente opened this issue Apr 29, 2020 · 0 comments · Fixed by #5319
Assignees
Milestone

Comments

@pablitovicente
Copy link
Contributor

pablitovicente commented Apr 29, 2020

Description

Create function signedVarint(value: number, schema) => buffer

Motivation

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

Acceptance Criteria

  • signedVarint() should accept signed numbers (including bigInts)
  • signedVarint() returns a buffer that can be passed through the signedVarint reader to get the original value
  • Code should be optimised for speed as much as possible
  • Full test coverage
  • Performance stats are provided based on the writing of values of different sizes and measure the writing of 100, 500, 1000, 30000 signedVarint

Additional Information

Check if it will make sense to implement along with 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

Successfully merging a pull request may close this issue.

3 participants