uvarint
Version, currently master branch1 version
- master branchlatestMay 16, 2017
github.com/freitagbr/crystal-uvarint
Unsigned Varint implementation in Crystal
2 stars
2 dependents
License: MIT
Installation
# Add this to your shard.yml
dependencies:
uvarint:
github: freitagbr/crystal-uvarint
branch: mastermaster is a branch, not a release, so this tracks it rather than pinning a version.
Then run:
shards installshard.yml
- Crystal
0.21.0- License
- MIT
- Author
- Brandon Freitag
Dependencies
This version declares no dependencies.
README
crystal-uvarint
crystal-uvarint is an
unsigned varint
implementation in Crystal. The implementation is based on
varint.go.
Installation
Add this to your application's shard.yml:
dependencies:
uvarint:
github: freitagbr/crystal-uvarint
Usage
require "uvarint"
e = UVarint.encode 300_u64
#=> e == [172_u8, 2_u8]
d = UVarint.decode e
#=> d == 300_u64
Use UVarint.encode to encode a UInt64 to a varint, which is an
Array(UInt8) (basically, an array of bytes).
Use UVarint.decode to decode a varint to a UInt64.
Development
Create an issue or submit a PR. Be sure to add tests if need be.
Contributing
- Fork it ( https://github.com/freitagbr/crystal-uvarint/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
Contributors
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This branch
- Branch
master- Seen
- May 16, 2017
- Crystal
0.21.0- Indexed
- yes
Dependents
Repository
github.com/freitagbr/crystal-uvarint
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 16, 2026
- Synced
- Aug 16, 2026
- Versions
- 1