Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/mysql2/index.d.ts>Buffer#readIntLE

MySQL client for Deno with focus on performance. Supports prepared statements, non-utf8 encodings, binary log protocol, compression much more
Latest
method Buffer.prototype.readIntLE
Re-export
import { Buffer } from "https://deno.land/x/mysql2@v1.0.6/index.d.ts";

Reads byteLength number of bytes from buf at the specified offsetand interprets the result as a little-endian, two's complement signed value supporting up to 48 bits of accuracy.

import { Buffer } from 'buffer';

const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]);

console.log(buf.readIntLE(0, 6).toString(16));
// Prints: -546f87a9cbee

Parameters

offset: number

Number of bytes to skip before starting to read. Must satisfy 0 <= offset <= buf.length - byteLength.

byteLength: number

Number of bytes to read. Must satisfy 0 < byteLength <= 6.

Returns

number