https://github.com/djdeveloperr/deno_binutil
Utility to work with binary related data in Deno.
https://github.com/djdeveloperr/deno_binutil
Last synced: 4 months ago
JSON representation
Utility to work with binary related data in Deno.
- Host: GitHub
- URL: https://github.com/djdeveloperr/deno_binutil
- Owner: DjDeveloperr
- License: apache-2.0
- Created: 2021-10-03T11:47:26.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-10-03T13:43:16.000Z (over 3 years ago)
- Last Synced: 2025-01-22T02:35:29.074Z (5 months ago)
- Language: TypeScript
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# deno_binutil
Utility to work with binary related data in Deno.
```ts
class Point extends Struct {
static littleEndian = true;@field("U32")
x!: number;@field("U32")
y!: number;constructor(data?: Partial) {
super();
if (data) Object.assign(this, data);
}
}const point = new Point({ x: 50, y: 40 });
console.log(point.serialize());
// Uint8Array(8) [
// 50, 0, 0, 0,
// 40, 0, 0, 0
// ]
```Copyright 2021 @ DjDeveloperr