Function mini_leb128::write_i64

source ·
pub fn write_i64<W>(writer: W, n: i64) -> Result<NonZeroUsize>where
W: Write,
Expand description

Encodes a signed 64-bit integer using LEB128.

Returns a NonZeroUsize that stores how many bytes it took to encode the integer.

Errors

Propagates any I/O errors originating from the writer. However, encoding the integer itself is infallible.