# @thi.ng/binary

> 100+ assorted binary / bitwise operations, conversions, utilities, lookup tables

Latest version **3.6.17** (published 2026-08-25) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @thi.ng/binary
pnpm add @thi.ng/binary
yarn add @thi.ng/binary
bun add @thi.ng/binary
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 3.6.17 |
| Published | 2026-08-25 |
| First published | 2018-10-17 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM |
| Node | >=18 |
| Dependencies | 1 |
| Unpacked size | 51.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Karsten Schmidt |
| Maintainers | thi.ng |
| Keywords | 8bit, 16bit, 32bit, 64bit, align, binary, conversion, count, dataview, float, graycode, integer, logic, lut, mask, math, shift, splat, swap, swizzle, typedarray, typescript |

## Links

- npm: https://www.npmjs.com/package/@thi.ng/binary
- Repository: https://codeberg.org/thi.ng/umbrella
- Homepage: https://thi.ng/binary
- Funding: https://github.com/sponsors/postspectacular
- npm.io page: https://npm.io/package/@thi.ng/binary

## Dependencies (1)

- [@thi.ng/api](https://npm.io/package/@thi.ng/api.md) ^8.12.28

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 3.6.17 (latest) — 2026-08-25
- 3.6.16 — 2026-07-02
- 3.6.15 — 2026-06-05
- 3.6.14 — 2026-05-23
- 3.6.13 — 2026-05-20
- 3.6.11 — 2026-05-11
- 3.6.10 — 2026-05-08
- 3.6.9 — 2026-04-26
- 3.6.8 — 2026-04-18
- 3.6.7 — 2026-04-02
- 3.6.6 — 2026-03-19
- 3.6.5 — 2026-03-07
- 3.6.4 — 2026-03-07
- 3.6.3 — 2026-02-07
- 3.6.2 — 2026-01-23
- … 181 more at https://npm.io/package/@thi.ng/binary/versions

## README

<!-- This file is generated - DO NOT EDIT! -->
<!-- Please see: https://codeberg.org/thi.ng/umbrella/src/branch/develop/CONTRIBUTING.md#changes-to-readme-files -->
# ![@thi.ng/binary](https://codeberg.org/thi.ng/umbrella/media/branch/develop/assets/banners/thing-binary.svg?69792d31)

[![npm version](https://img.shields.io/npm/v/@thi.ng/binary.svg)](https://www.npmjs.com/package/@thi.ng/binary)
![npm downloads](https://img.shields.io/npm/dm/@thi.ng/binary.svg)
[![Mastodon Follow](https://img.shields.io/mastodon/follow/109331703950160316?domain=https%3A%2F%2Fmastodon.thi.ng&style=social)](https://mastodon.thi.ng/@toxi)

> [!NOTE]

> This is one of 217 standalone projects. LLM-free, human-made and
> cared for software, maintained as part of the
> [@thi.ng/umbrella](https://codeberg.org/thi.ng/umbrella/) ecosystem and
> anti-framework.
>
> 🚀 Please help me to work full-time on these projects by [sponsoring
> me](https://codeberg.org/thi.ng/umbrella/src/branch/develop/CONTRIBUTING.md#donations).
> Thank you! ❤️

- [About](#about)
- [Status](#status)
- [Related packages](#related-packages)
- [Installation](#installation)
- [Dependencies](#dependencies)
- [Usage examples](#usage-examples)
- [API](#api)
- [Authors](#authors)
- [License](#license)

## About

100+ assorted binary / bitwise operations, conversions, utilities, lookup tables.

## Status

**STABLE** - used in production

[Search or submit any issues for this package](https://codeberg.org/thi.ng/umbrella/issues?q=%5Bbinary%5D)

## Related packages

- [@thi.ng/transducers-binary](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/transducers-binary) - Binary data related transducers & reducers

## Installation

```bash
yarn add @thi.ng/binary
```

ESM import:

```ts
import * as bin from "@thi.ng/binary";
```

Browser ESM import:

```html
<script type="module" src="https://esm.run/@thi.ng/binary"></script>
```

[JSDelivr documentation](https://www.jsdelivr.com/)

For Node.js REPL:

```js
const bin = await import("@thi.ng/binary");
```

Package sizes (brotli'd, pre-treeshake): ESM: 2.53 KB

## Dependencies

- [@thi.ng/api](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/api)

Note: @thi.ng/api is in _most_ cases a type-only import (not used at runtime)

## Usage examples

Two projects in this repo's
[/examples](https://codeberg.org/thi.ng/umbrella/src/branch/develop/examples)
directory are using this package:

| Screenshot                                                                                                             | Description                                                           | Live demo                                             | Source                                                                                     |
|:-----------------------------------------------------------------------------------------------------------------------|:----------------------------------------------------------------------|:------------------------------------------------------|:-------------------------------------------------------------------------------------------|
| <img src="https://codeberg.org/thi.ng/umbrella/media/branch/develop/assets/examples/hdom-benchmark2.png" width="240"/> | hdom update performance benchmark w/ config options                   | [Demo](https://demo.thi.ng/umbrella/hdom-benchmark2/) | [Source](https://codeberg.org/thi.ng/umbrella/src/branch/develop/examples/hdom-benchmark2) |
| <img src="https://codeberg.org/thi.ng/umbrella/media/branch/develop/assets/examples/simd-plot.png" width="240"/>       | Fitting, transforming & plotting 10k data points per frame using SIMD | [Demo](https://demo.thi.ng/umbrella/simd-plot/)       | [Source](https://codeberg.org/thi.ng/umbrella/src/branch/develop/examples/simd-plot)       |

## API

[Generated API docs](https://docs.thi.ng/umbrella/binary/)

TODO

## Authors

- [Karsten Schmidt](https://thi.ng)

If this project contributes to an academic publication, please cite it as:

```bibtex
@misc{thing-binary,
  title = "@thi.ng/binary",
  author = "Karsten Schmidt",
  note = "https://thi.ng/binary",
  year = 2016
}
```

## License

&copy; 2016 - 2026 Karsten Schmidt // Apache License 2.0

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