# readuint64be

> Safely convert a 64 bit stream to a number

Latest version **1.0.5** (published 2017-01-12) · ISC license · 0 weekly downloads

## Install

```sh
npm install readuint64be
pnpm add readuint64be
yarn add readuint64be
bun add readuint64be
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2017-01-12 |
| First published | 2017-01-11 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Craig OConnor |
| Maintainers | oconnorct1 |

## Links

- npm: https://www.npmjs.com/package/readuint64be
- Repository: https://github.com/CraigglesO/readUInt64BE
- Homepage: https://github.com/CraigglesO/readUInt64BE#readme
- Issues: https://github.com/CraigglesO/readUInt64BE/issues
- npm.io page: https://npm.io/package/readuint64be

## Dependencies (1)

- [writeuint64be](https://npm.io/package/writeuint64be.md) ^1.0.2

## Recent versions

- 1.0.5 (latest) — 2017-01-12
- 1.0.4 — 2017-01-12
- 1.0.3 — 2017-01-12
- 1.0.2 — 2017-01-11

## README

# readUInt64BE

### Safely read 64 Big Endian hex buffers

Reads hex buffer at the specified offset with specified big endian format. Number should be a valid signed 64-bit integer.

In computing. The number 9,223,372,036,854,775,807, equivalent to the hexadecimal value 7FFF,FFFF,FFFF,FFFF16, is the maximum value for a 64-bit signed integer in computing.

value is interpreted and written as a signed integer.

readInt32BE(buf, [, offest])
* `buf <Buffer> Original buffer to edit or change`
* `offset <Integer> Where to start writing. Must satisfy: 0 <= offset <= buf.length - 8`

## Install

```
npm install readuint64be
```

## Usage
```
const Buffer = require('buffer').Buffer;
const writeUInt64BE = require('writeUInt64BE');
const readUInt64BE = require('./readUInt64BE');

// First example, read a buffer at the beginning of the buffer:

let buf = new Buffer(8);

writeUInt64BE(buf, 123456789);
console.log(buf); // <Buffer 00 00 00 00 07 5b cd 15>

let decimal = readUInt64BE(buf);
console.log(decimal); // 123456789

// Second example, read a buffer at an offset

let buf2 = new Buffer(16);
buf2.fill(0);

writeUInt64BE(buf2, 123456789, 8);
console.log(buf2); // <Buffer 00 00 00 00 00 00 00 00 00 00 00 00 07 5b cd 15>

let decimal2 = readUInt64BE(buf2, 8);
console.log(decimal2); // 123456789


```

---
_Source: https://npm.io/package/readuint64be · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
