Handles both signed and unsigned of any length.
No generics here, because we want the executable binary as small as possible.
Convenience method, to avoid having to specify type when calling dep_decode.
Especially useful in the macros.
Also checks that the entire slice was used.
The input doesn’t need to be mutable because we are not changing the underlying data.
Adds the concantenated encoded contents of a slice to an output buffer,
without serializing the slice length.
Byte slice is treated separately, via direct transmute.
Convenience function for getting an object nested-encoded to a Vec directly.
Top-decodes the result using the NestedDecode implementation.
Top-decodes the result using the NestedDecode implementation.
Uses the fast-exit mechanism in case of error.
Adds number to output buffer.
No argument generics here, because we want the executable binary as small as possible.
Smaller types need to be converted to u64 before using this function.
TODO: there might be a quicker version of this using transmute + reverse bytes.