muvon / kiss-varint
varint read and pack convertion int/uint
Installs: 1 081
Dependents: 3
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 1
Open Issues: 0
Requires (Dev)
- phpunit/phpunit: ^10
This package is auto-updated.
Last update: 2025-03-12 22:56:36 UTC
README
KISS implementation of varint encode and decoder for int/uint
Basic usage
use Muvon\KISS\VarInt; VarInt::packInt($value); // Pack value to a signed variable integer, little-endian VarInt::packUint($value); // Pack value to signed variable integer, little-endian VarInt::readInt($hex); // Unpack hex string as signed integer VarInt::readUint($hex); // Unpack hax string as unsigned integer