Skip to content

dymynyc/acid-leb128

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

acid-leb128

LEB128 codec in acidlisp.

same api as chrisdickinson/varint following abstract-encoding interface.

currently, only int32 is supported.

encode(int, byte_vector, start) => bytes

encode int as leb128 varint into byte_vector at position start. returns the number of bytes used.

decode(byte_vector, start) => int

decodes a varint from byte_vector at position start. returns the int that was decoded.

bytes()

returns the number of bytes used by previous call to decode or encode

encoding_length(int) => bytes

returns the number of bytes needed to encode int

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages