# @protobufjs/utf8

> A minimal UTF8 implementation for number arrays.

Latest version **1.1.2** (published 2026-07-05) · BSD-3-Clause license · 0 weekly downloads

## Install

```sh
npm install @protobufjs/utf8
pnpm add @protobufjs/utf8
yarn add @protobufjs/utf8
bun add @protobufjs/utf8
```

## Health

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

Positive: has types; no vulnerabilities; recently updated; high maintenance score; high quality score; popular repo.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 1.1.2 |
| Published | 2026-07-05 |
| First published | 2016-12-11 |
| Weekly downloads | 0 |
| License | BSD-3-Clause |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 41.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 10584 |
| Author | Daniel Wirtz |
| Maintainers | dcode, protobufjs, google-wombot |

## Links

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

## Recent versions

- 1.1.2 (latest) — 2026-07-05
- 1.1.1 — 2026-04-27
- 1.1.0 — 2017-01-25
- 1.0.7 — 2017-01-07
- 1.0.6 — 2017-01-03
- 1.0.5 — 2016-12-26
- 1.0.4 — 2016-12-20
- 1.0.3 — 2016-12-13
- 1.0.2 — 2016-12-11
- 1.0.1 — 2016-12-11
- 1.0.0 — 2016-12-11

## README

@protobufjs/utf8
================
[![npm](https://img.shields.io/npm/v/@protobufjs/utf8.svg)](https://www.npmjs.com/package/@protobufjs/utf8)

A minimal UTF8 implementation for number arrays.

API
---

* **utf8.length(string: `string`): `number`**<br />
  Calculates the UTF8 byte length of a string.

* **utf8.read(buffer: `Uint8Array`, start: `number`, end: `number`): `string`**<br />
  Reads UTF8 bytes as a string.

* **utf8.write(string: `string`, buffer: `Uint8Array`, offset: `number`): `number`**<br />
  Writes a string as UTF8 bytes.


**License:** [BSD 3-Clause License](https://opensource.org/licenses/BSD-3-Clause)

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