https://github.com/topas/varintbitconverter
Varint encoding and decoding for .NET
https://github.com/topas/varintbitconverter
c-sharp encoding google-protocol-buffers nuget
Last synced: 7 months ago
JSON representation
Varint encoding and decoding for .NET
- Host: GitHub
- URL: https://github.com/topas/varintbitconverter
- Owner: topas
- License: other
- Created: 2012-04-22T12:54:00.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2012-04-22T19:56:58.000Z (over 13 years ago)
- Last Synced: 2025-06-05T06:51:44.514Z (7 months ago)
- Topics: c-sharp, encoding, google-protocol-buffers, nuget
- Language: PowerShell
- Size: 107 KB
- Stars: 23
- Watchers: 3
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.markdown
- License: LICENSE
Awesome Lists containing this project
README
About VarintBitConverter
=============
System.VarintBitConverter is static utility class very similar to BitConverter (http://msdn.microsoft.com/en-us/library/system.bitconverter.aspx).
Varint is 128 base encoding for numbers (https://developers.google.com/protocol-buffers/docs/encoding#varints) used by Protocol Buffers and other projects.
For signed numbers is using ZigZag encoding.
Usage:
-----------------
* method GetBytes(...) converts .NET type to varint byte array.
* To...(byte[]) method convert varint byte array to .NET type
Libraries & Tools
-----------------
This project is using:
* xUnit testing library: http://xunit.codeplex.com/
* Psake build automation tool: https://github.com/JamesKovacs/psake
Requirements
------------
* .NET Framework 4.0
* PowerShell for running Psake
License
-------
Project is released under BSD license.