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(R r, T src)
  2. void toVarint(R r, long src)
    @safe @property
    void
    toVarint
    (
    R
    )
    (
    ref R r
    ,
    long src
    )
    if (
    isOutputRange!(R, ubyte)
    )

Parameters

r R

output range

src long

The value to encode

Return Value

Type: void

The created VarInt

Meta