# @oslojs/encoding

> Runtime-agnostic library for encoding and decoding data

Latest version **1.1.0** (published 2024-09-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install @oslojs/encoding
pnpm add @oslojs/encoding
yarn add @oslojs/encoding
bun add @oslojs/encoding
```

## Health

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

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

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2024-09-24 |
| First published | 2024-05-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 17.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | pilcrowOnPaper |
| Maintainers | pilcrowonpaper |
| Keywords | auth, encoding, hex, base16, base32, base64, base64url |

## Links

- npm: https://www.npmjs.com/package/@oslojs/encoding
- Repository: https://github.com/oslo-project/encoding
- Homepage: https://github.com/oslo-project/encoding#readme
- Issues: https://github.com/oslo-project/encoding/issues
- npm.io page: https://npm.io/package/@oslojs/encoding

## Alternatives

- [@clerk/clerk-expo](https://npm.io/package/@clerk/clerk-expo.md) — 133.6K weekly downloads
- [@pothos/plugin-authz](https://npm.io/package/@pothos/plugin-authz.md) — 12.4K weekly downloads
- [@bounded-sh/client](https://npm.io/package/@bounded-sh/client.md) — 3.2K weekly downloads
- [@luigi-project/plugin-auth-oauth2](https://npm.io/package/@luigi-project/plugin-auth-oauth2.md) — 2.3K weekly downloads
- [@nocobase/plugin-verification](https://npm.io/package/@nocobase/plugin-verification.md) — 2.0K weekly downloads

## Recent versions

- 1.1.0 (latest) — 2024-09-24
- 1.0.0 — 2024-09-19
- 0.4.1 — 2024-08-01
- 0.4.0 — 2024-08-01
- 0.3.0 — 2024-06-08
- 0.2.0 — 2024-05-10
- 0.1.0 — 2024-05-02

## README

# @oslojs/encoding

**Documentation: https://encoding.oslojs.dev**

A JavaScript library for encoding and decoding data with hexadecimal, base32, base64, and base64url encoding schemes based on [RFC 4648](https://datatracker.ietf.org/doc/html/rfc4648). Implementations may be stricter than most to follow the RFC as close as possible.

- Runtime-agnostic
- No third-party dependencies
- Fully typed

```ts
import { encodeBase64, decodeBase64 } from "@oslojs/encoding";

const data: Uint8Array = new TextEncoder().encode("hello world");
const encoded = encodeBase64(data);
const decoded = decodeBase64(encoded);
```

## Installation

```
npm i @oslojs/encoding
```

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