# toBigIntLE() function · @imqueue/net

Source: https://imqueue.org/api/net/latest/net.tobigintle/
Published: 2026-08-01
Author: @imqueue maintainers (https://github.com/imqueue)
Package: @imqueue/net 3.0.2 — generated reference, not hand-written

Reads a little-endian byte sequence as an unsigned `bigint`.

**Signature:**

```typescript
export declare function toBigIntLE(buf: Buffer | Uint8Array): bigint;
```

## Parameters


| Parameter | Type | Description |
| --- | --- | --- |
| buf | Buffer \| Uint8Array | the bytes to read, least significant first |


**Returns:**

bigint

The value they encode. An empty input gives `0n`.

## Remarks

Always unsigned — there is no sign bit and no length limit, so a 16-byte IPv6 address reads as a plain positive integer. That is what lets one comparison path serve both families.

Little-endian is the convention this package writes with ([toBufferLE()](https://imqueue.org/api/net/latest/net.tobufferle/)), so the pair round-trips. Reading a big-endian buffer with it returns a byte-reversed value rather than an error.

