std/encoding/mod.ts
Doctor 0f7a71f96b
feat(encoding/unstable): adds streaming versions for hex, base32, base32hex, base64 and base64url (#4915)
* feat(encoding): adds streaming versions of several encoding methods.

Adds streaming methods for:
- Hex
- Base32
- Base64
- Base64Url

* move(encoding): streaming versions to their own modules.

* fix(encoding): jsdoc examples

* fix(encoding): error when chunk's are smaller than the minimum size.

* add(encoding): Base32Hex Encoder/Decoder Streams

* fix(encoding): mod.ts not exporting ./base32hex_stream.ts

* hex stream

* RandomSliceStream

* polish

* base32

* base64hex

* base64

* base64url

* tweak

* fix

---------

Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-08-22 15:02:36 +10:00

31 lines
890 B
TypeScript

// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
/**
* Utilities for encoding and decoding common formats like hex, base64, and varint.
*
* ```ts
* import { encodeBase64, decodeBase64 } from "@std/encoding";
* import { assertEquals } from "@std/assert";
*
* const foobar = new TextEncoder().encode("foobar");
* assertEquals(encodeBase64(foobar), "Zm9vYmFy");
* assertEquals(decodeBase64("Zm9vYmFy"), foobar);
* ```
*
* @module
*/
export * from "./ascii85.ts";
export * from "./base32.ts";
export * from "./base32_stream.ts";
export * from "./base32hex.ts";
export * from "./base32hex_stream.ts";
export * from "./base58.ts";
export * from "./base64.ts";
export * from "./base64_stream.ts";
export * from "./base64url.ts";
export * from "./base64url_stream.ts";
export * from "./hex.ts";
export * from "./hex_stream.ts";
export * from "./varint.ts";