File: src/Scale/Signed/I16.sol
I16
Kind: library
ABI Surface
Errors
error OffsetOutOfBounds()
Function Surface
function encode(int16 value) internal pure returns (bytes)- Encodes an
int16into SCALE format (2-byte two's-complement little-endian).
- Encodes an
function encodedSizeAt(bytes data, uint256 offset) internal pure returns (uint256)- Returns the number of bytes that a
int16would occupy when SCALE-encoded.
- Returns the number of bytes that a
function decode(bytes data) internal pure returns (int16)- Decodes SCALE-encoded bytes into an
int16.
- Decodes SCALE-encoded bytes into an
function decodeAt(bytes data, uint256 offset) internal pure returns (int16)- Decodes an
int16at the specified offset.
- Decodes an
function toLittleEndian(int16 value) internal pure returns (bytes2)- Converts an int16 to little-endian bytes2 (two's complement)