# @litert/binary

> The binary data operate library for LiteRT.

Latest version **0.3.1** (published 2022-10-06) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @litert/binary
pnpm add @litert/binary
yarn add @litert/binary
bun add @litert/binary
```

## Health

**Score 40/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.3.1 |
| Published | 2022-10-06 |
| First published | 2021-06-05 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 318.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Angus.Fenying |
| Maintainers | fenying |
| Keywords | litert, binary, buffer |

## Links

- npm: https://www.npmjs.com/package/@litert/binary
- Repository: https://github.com/litert/binary.js
- Homepage: https://github.com/litert/binary.js#readme
- Issues: https://github.com/litert/binary.js/issues
- npm.io page: https://npm.io/package/@litert/binary

## Dependencies (1)

- [@litert/exception](https://npm.io/package/@litert/exception.md) ^1.1.5

## Alternatives

- [flatbuffers](https://npm.io/package/flatbuffers.md) — 6.0M weekly downloads
- [jwt-simple](https://npm.io/package/jwt-simple.md) — 259.5K weekly downloads
- [@exodus/patch-broken-hermes-typed-arrays](https://npm.io/package/@exodus/patch-broken-hermes-typed-arrays.md) — 28.5K weekly downloads
- [@native-to-anchor/buffer-layout](https://npm.io/package/@native-to-anchor/buffer-layout.md) — 12.2K weekly downloads
- [binary-parser-encoder](https://npm.io/package/binary-parser-encoder.md) — 5.3K weekly downloads

## Recent versions

- 0.3.1 (latest) — 2022-10-06
- 0.3.0 — 2022-10-02
- 0.2.0 — 2021-06-09
- 0.1.0 — 2021-06-05

## README

# LiteRT/Binary

[![Strict TypeScript Checked](https://badgen.net/badge/TS/Strict "Strict TypeScript Checked")](https://www.typescriptlang.org)
[![npm version](https://img.shields.io/npm/v/@litert/binary.svg?colorB=brightgreen)](https://www.npmjs.com/package/@litert/binary "Stable Version")
[![License](https://img.shields.io/npm/l/@litert/binary.svg?maxAge=2592000?style=plastic)](https://github.com/litert/binary.js/blob/master/LICENSE)
[![GitHub issues](https://img.shields.io/github/issues/litert/binary.js.svg)](https://github.com/litert/binary.js/issues)
[![GitHub Releases](https://img.shields.io/github/release/litert/binary.js.svg)](https://github.com/litert/binary.js/releases "Stable Release")

The binary data operate library for LiteRT.

This library currently provides following components:

- [`BufferReader`](./src/examples/demo.BufferReader.ts): A helper of `Buffer` that controls the reading position automatically.
- [`BufferWriter`](./src/examples/demo.BufferWriter.ts): A helper of `Buffer` that controls the writing position automatically.
- [`AlignedBufferReader`](./src/examples/demo.AlignedBufferReader.ts): An implement of `BufferReader` with C-struct-like alignment supports.
- [`AlignedBufferWriter`](./src/examples/demo.AlignedBufferWriter.ts): An implement of `BufferWriter` with C-struct-like alignment supports.

- `SyncFileReader`: A helper of `File` that controls the reading position automatically, using synchronous IO.
- `SyncFileBufferReader`: A helper of `File` that controls the reading position automatically, using buffer to reduce the synchronous IO.
- `AsyncFileReader`: A helper of `File` that controls the reading position automatically, using asynchronous IO.
- `AsyncFileBufferReader`: A helper of `File` that controls the reading position automatically, using buffer to reduce the asynchronous IO.

- `SyncFileWriter`: A helper of `File` that controls the writing position automatically, using synchronous IO.
- `SyncFileBufferWriter`: A helper of `File` that controls the writing position automatically, using buffer to reduce the synchronous IO.
- `AsyncFileWriter`: A helper of `File` that controls the writing position automatically, using asynchronous IO.
- `AsyncFileBufferWriter`: A helper of `File` that controls the writing position automatically, using buffer to reduce the asynchronous IO.

## Installation

```sh
npm install @litert/binary --save
```

## Requirements

- Node.js v14.x (Or newer)
- TypeScript v4.1.x (Or newer)

## License

This library is published under [Apache-2.0](./LICENSE) license.

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