Struct perlin::storage::compression::VByteEncoded [] [src]

pub struct VByteEncoded { /* fields omitted */ }

Stores the result of a vbyte encode operation without indirection that a Vec<u8> would introduce. Can thus be used to vbyte_encode on the stack

Methods

impl VByteEncoded
[src]

Performs a vbyte encode without allocating memory on the heap Can then be written to a Write-implementor

Return how many bytes are used to encode the number. Min: 1 Max: 10

Access to the written data as slice Currently only used in tests

Writes the given VByteEncoded number to a target. Returns the number of bytes written (equal to bytes_used) or an io::Error