Skip to content

Commit 6b23876

Browse files
committed
Update README.md. Bump lib version to 0.0.5.
1 parent 2604375 commit 6b23876

File tree

3 files changed

+20
-5
lines changed

3 files changed

+20
-5
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "byte-transcoder"
3-
version = "0.0.4"
3+
version = "0.0.5"
44
edition = "2024"
55
rust-version = "1.85"
66
authors = ["Todd Everett Griffin <[email protected]>"]

README.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,26 @@ A Rust+Typescript library to transcode higher-level data types to/from bytes.
1010

1111
## Features
1212

13+
Supported data types:
14+
- `u8`/`u16`/`u32`/`u64`
15+
- `i8`/`i16`/`i32`/`i64`
16+
- `string`
17+
- `uuid`
18+
1319
### ByteReader
1420

1521
Wraps a byte slice (`[u8]` in Rust, `Uint8Array` in Typescript) and exposes
16-
easy-to-use retrieval functions for primitives (e.g. `u8`/`u16`/`u32`/`u64`,
17-
`string`, `uuid`, etc).
22+
easy-to-use retrieval functions for primitives.
23+
24+
Can manually specify endianness.
1825

1926
### ByteWriter
2027

21-
Typescript only. Helps write `number`s as specific primitives (e.g. `u8`/`u16`/`u32`/`u64`, `string`, `uuid`, etc).
28+
Typescript only.
29+
30+
Helps write primitives to a `Uint8Array`.
31+
32+
Can manually specify endianness.
2233

2334
## Examples
2435

@@ -79,6 +90,10 @@ byteWriter.writeString(payload.joinCode);
7990
const bytes: Uint8Array = byteWriter.getBytes();
8091
```
8192

93+
#### Rust
94+
95+
There is no need for a Rust version of `ByteWriter` as integers types already have `.to_le_bytes()` and `.to_be_bytes()` (and `.to_ne_bytes()`).
96+
8297
## Developers
8398

8499
**Project is under active maintenance - even if there are no recent commits!

deno.jsonc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@todd/byte-transcoder",
3-
"version": "0.0.4",
3+
"version": "0.0.5",
44
"exports": {
55
".": "./src-ts/mod.ts"
66
},

0 commit comments

Comments
 (0)