Kit
Functions

getF64Decoder

getF64Decoder(config): FixedSizeDecoder<number, 8>

Returns a decoder for 64-bit floating-point numbers (f64).

This decoder deserializes f64 values from 8 bytes. Some precision may be lost during decoding due to floating-point representation.

For more details, see getF64Codec.

Parameters

ParameterTypeDescription
configNumberCodecConfigOptional configuration to specify endianness (little by default).

Returns

FixedSizeDecoder<number, 8>

A FixedSizeDecoder<number, 8> for decoding f64 values.

Example

Decoding an f64 value.

const decoder = getF64Decoder();
const value = decoder.decode(new Uint8Array([0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xbf])); // -1.5

See

getF64Codec

On this page