toVarint

Encode a signed value into a VarInt-encoded series of bytes

This function is useful for encode int32 and int64 value types (Do not confuse it with signed values encoded by ZigZag!)

  1. void toVarint(ref R r, T src)
  2. void toVarint(ref R r, long src)
    void
    toVarint
    @safe @property
    (
    R
    )
    (
    ref R r
    ,
    long src
    )
    if (
    isOutputRange!(R, ubyte)
    )

Parameters

r
Type: R

output range

src
Type: long

The value to encode

Return Value

Type: void

The created VarInt

Meta