# toIntArray() function · @imqueue/net

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

Unpacks a binary list back into integer address ranges.

**Signature:**

```typescript
export declare function toIntArray(list: Buffer, type: NetworkType): [bigint, bigint][];
```

## Parameters


| Parameter | Type | Description |
| --- | --- | --- |
| list | Buffer | a buffer produced by [toBinaryList()](https://imqueue.org/api/net/latest/net.tobinarylist/) |
| type | [NetworkType](https://imqueue.org/api/net/latest/net.networktype/) | which family the buffer holds; the bytes do not say |


**Returns:**

\[bigint, bigint\]\[\]

One `[start, end]` tuple per record, in stored order — which is ascending, since [toBinaryList()](https://imqueue.org/api/net/latest/net.tobinarylist/) sorted them.

## Remarks

Reads fixed-width records, so `type` must match what was written: unpacking an IPv4 buffer as IPv6 does not fail, it silently reinterprets four 4-byte addresses as one 16-byte pair. A trailing partial record is read as though the missing bytes were zero rather than rejected.

