@thi.ng/transducers-binary 2.1.203 → 2.1.205
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +38 -37
- package/package.json +10 -10
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<!-- This file is generated - DO NOT EDIT! -->
|
|
2
|
-
<!-- Please see: https://
|
|
3
|
-
# 
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/@thi.ng/transducers-binary)
|
|
6
6
|

|
|
@@ -8,11 +8,12 @@
|
|
|
8
8
|
|
|
9
9
|
> [!NOTE]
|
|
10
10
|
> This is one of 214 standalone projects, maintained as part
|
|
11
|
-
> of the [@thi.ng/umbrella](https://
|
|
11
|
+
> of the [@thi.ng/umbrella](https://codeberg.org/thi.ng/umbrella/) ecosystem
|
|
12
12
|
> and anti-framework.
|
|
13
13
|
>
|
|
14
|
-
> 🚀 Please help me to work full-time on these projects by [sponsoring
|
|
15
|
-
>
|
|
14
|
+
> 🚀 Please help me to work full-time on these projects by [sponsoring
|
|
15
|
+
> me](https://codeberg.org/thi.ng/umbrella/src/branch/develop/CONTRIBUTING.md#donations).
|
|
16
|
+
> Thank you! ❤️
|
|
16
17
|
|
|
17
18
|
- [About](#about)
|
|
18
19
|
- [Status](#status)
|
|
@@ -33,10 +34,10 @@
|
|
|
33
34
|
|
|
34
35
|
## About
|
|
35
36
|
|
|
36
|
-
Binary data related transducers & reducers. This is a support package for [@thi.ng/transducers](https://
|
|
37
|
+
Binary data related transducers & reducers. This is a support package for [@thi.ng/transducers](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/transducers).
|
|
37
38
|
|
|
38
39
|
Like the transducers and reducers defined in
|
|
39
|
-
[@thi.ng/transducers](https://
|
|
40
|
+
[@thi.ng/transducers](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/transducers),
|
|
40
41
|
all functions defined in this package too accept an optional input
|
|
41
42
|
iterable for direct use.
|
|
42
43
|
|
|
@@ -44,13 +45,13 @@ iterable for direct use.
|
|
|
44
45
|
|
|
45
46
|
**STABLE** - used in production
|
|
46
47
|
|
|
47
|
-
[Search or submit any issues for this package](https://
|
|
48
|
+
[Search or submit any issues for this package](https://codeberg.org/thi.ng/umbrella/issues?q=%5Btransducers-binary%5D)
|
|
48
49
|
|
|
49
50
|
## Related packages
|
|
50
51
|
|
|
51
|
-
- [@thi.ng/binary](https://
|
|
52
|
-
- [@thi.ng/bitstream](https://
|
|
53
|
-
- [@thi.ng/unionstruct](https://
|
|
52
|
+
- [@thi.ng/binary](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/binary) - 100+ assorted binary / bitwise operations, conversions, utilities, lookup tables
|
|
53
|
+
- [@thi.ng/bitstream](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/bitstream) - ES6 iterator based read/write bit streams with support for variable word widths
|
|
54
|
+
- [@thi.ng/unionstruct](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/unionstruct) - C-style struct, union and bitfield read/write views of ArrayBuffers
|
|
54
55
|
|
|
55
56
|
## Installation
|
|
56
57
|
|
|
@@ -82,27 +83,27 @@ Package sizes (brotli'd, pre-treeshake): ESM: 2.51 KB
|
|
|
82
83
|
|
|
83
84
|
## Dependencies
|
|
84
85
|
|
|
85
|
-
- [@thi.ng/binary](https://
|
|
86
|
-
- [@thi.ng/compose](https://
|
|
87
|
-
- [@thi.ng/errors](https://
|
|
88
|
-
- [@thi.ng/hex](https://
|
|
89
|
-
- [@thi.ng/random](https://
|
|
90
|
-
- [@thi.ng/strings](https://
|
|
91
|
-
- [@thi.ng/transducers](https://
|
|
86
|
+
- [@thi.ng/binary](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/binary)
|
|
87
|
+
- [@thi.ng/compose](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/compose)
|
|
88
|
+
- [@thi.ng/errors](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/errors)
|
|
89
|
+
- [@thi.ng/hex](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/hex)
|
|
90
|
+
- [@thi.ng/random](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/random)
|
|
91
|
+
- [@thi.ng/strings](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/strings)
|
|
92
|
+
- [@thi.ng/transducers](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/transducers)
|
|
92
93
|
|
|
93
94
|
## Usage examples
|
|
94
95
|
|
|
95
96
|
Five projects in this repo's
|
|
96
|
-
[/examples](https://
|
|
97
|
+
[/examples](https://codeberg.org/thi.ng/umbrella/src/branch/develop/examples)
|
|
97
98
|
directory are using this package:
|
|
98
99
|
|
|
99
|
-
| Screenshot | Description | Live demo | Source
|
|
100
|
-
|
|
101
|
-
| <img src="https://
|
|
102
|
-
| <img src="https://
|
|
103
|
-
| <img src="https://
|
|
104
|
-
| <img src="https://
|
|
105
|
-
| <img src="https://
|
|
100
|
+
| Screenshot | Description | Live demo | Source |
|
|
101
|
+
|:-------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------|:--------------------------------------------------------|:---------------------------------------------------------------------------------------------|
|
|
102
|
+
| <img src="https://codeberg.org/thi.ng/umbrella/media/branch/develop/assets/examples/bitmap-font.gif" width="240"/> | Figlet-style bitmap font creation with transducers | [Demo](https://demo.thi.ng/umbrella/bitmap-font/) | [Source](https://codeberg.org/thi.ng/umbrella/src/branch/develop/examples/bitmap-font) |
|
|
103
|
+
| <img src="https://codeberg.org/thi.ng/umbrella/media/branch/develop/assets/examples/cellular-automata.png" width="240"/> | 2D transducer based cellular automata | [Demo](https://demo.thi.ng/umbrella/cellular-automata/) | [Source](https://codeberg.org/thi.ng/umbrella/src/branch/develop/examples/cellular-automata) |
|
|
104
|
+
| <img src="https://codeberg.org/thi.ng/umbrella/media/branch/develop/assets/examples/parse-playground.png" width="240"/> | Parser grammar livecoding editor/playground & codegen | [Demo](https://demo.thi.ng/umbrella/parse-playground/) | [Source](https://codeberg.org/thi.ng/umbrella/src/branch/develop/examples/parse-playground) |
|
|
105
|
+
| <img src="https://codeberg.org/thi.ng/umbrella/media/branch/develop/assets/examples/procedural-text.jpg" width="240"/> | Procedural stochastic text generation via custom DSL, parse grammar & AST transformation | [Demo](https://demo.thi.ng/umbrella/procedural-text/) | [Source](https://codeberg.org/thi.ng/umbrella/src/branch/develop/examples/procedural-text) |
|
|
106
|
+
| <img src="https://codeberg.org/thi.ng/umbrella/media/branch/develop/assets/examples/wolfram.png" width="240"/> | 1D Wolfram automata with OBJ point cloud export | [Demo](https://demo.thi.ng/umbrella/wolfram/) | [Source](https://codeberg.org/thi.ng/umbrella/src/branch/develop/examples/wolfram) |
|
|
106
107
|
|
|
107
108
|
## API
|
|
108
109
|
|
|
@@ -133,7 +134,7 @@ import { Smush32 } from "@thi.ng/random";
|
|
|
133
134
|
|
|
134
135
|
This is a higher-order transducer, purely composed from other
|
|
135
136
|
transducers. [See code
|
|
136
|
-
here](https://
|
|
137
|
+
here](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/transducers-binary/src/hex-dump.ts).
|
|
137
138
|
|
|
138
139
|
```ts
|
|
139
140
|
import { hexDump } from "@thi.ng/transducers-binary";
|
|
@@ -149,7 +150,7 @@ src = [65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 33, 48, 49, 50, 51, 126, 122, 121
|
|
|
149
150
|
### Structured byte buffer construction
|
|
150
151
|
|
|
151
152
|
The
|
|
152
|
-
[`bytes()`](https://
|
|
153
|
+
[`bytes()`](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/transducers-binary/src/bytes.ts)
|
|
153
154
|
reducer transforms a stream of declarative data definitions (optionally
|
|
154
155
|
with Little-Endian encoding) into an `Uint8Array`.
|
|
155
156
|
|
|
@@ -214,7 +215,7 @@ console.log(
|
|
|
214
215
|
```
|
|
215
216
|
|
|
216
217
|
Extended to transform longer strings (taken from the [bitmap-font
|
|
217
|
-
example](https://
|
|
218
|
+
example](https://codeberg.org/thi.ng/umbrella/src/branch/develop/examples/bitmap-font),
|
|
218
219
|
[live demo](https://demo.thi.ng/umbrella/bitmap-font/)):
|
|
219
220
|
|
|
220
221
|
```js
|
|
@@ -315,17 +316,17 @@ tx.transduce(tx.comp(base64Decode(), utf8Decode()), tx.str(), buf);
|
|
|
315
316
|
|
|
316
317
|
### Transducers
|
|
317
318
|
|
|
318
|
-
- [base64Decode](https://
|
|
319
|
-
- [base64Encode](https://
|
|
320
|
-
- [bits](https://
|
|
321
|
-
- [hexDump](https://
|
|
322
|
-
- [partitionBits](https://
|
|
323
|
-
- [utf8Decode](https://
|
|
324
|
-
- [utf8Encode](https://
|
|
319
|
+
- [base64Decode](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/transducers-binary/src/base64.ts)
|
|
320
|
+
- [base64Encode](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/transducers-binary/src/base64.ts)
|
|
321
|
+
- [bits](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/transducers-binary/src/bits.ts)
|
|
322
|
+
- [hexDump](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/transducers-binary/src/hex-dump.ts)
|
|
323
|
+
- [partitionBits](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/transducers-binary/src/partition-bits.ts)
|
|
324
|
+
- [utf8Decode](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/transducers-binary/src/utf8.ts)
|
|
325
|
+
- [utf8Encode](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/transducers-binary/src/utf8.ts)
|
|
325
326
|
|
|
326
327
|
### Reducers
|
|
327
328
|
|
|
328
|
-
- [bytes](https://
|
|
329
|
+
- [bytes](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/transducers-binary/src/bytes.ts)
|
|
329
330
|
|
|
330
331
|
## Authors
|
|
331
332
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/transducers-binary",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.205",
|
|
4
4
|
"description": "Binary data related transducers & reducers",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"sideEffects": false,
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
11
|
-
"url": "git+https://
|
|
11
|
+
"url": "git+https://codeberg.org/thi.ng/umbrella.git",
|
|
12
12
|
"directory": "packages/transducers-binary"
|
|
13
13
|
},
|
|
14
14
|
"homepage": "https://thi.ng/transducers-binary",
|
|
@@ -40,13 +40,13 @@
|
|
|
40
40
|
"tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@thi.ng/binary": "^3.6.
|
|
44
|
-
"@thi.ng/compose": "^3.0.
|
|
45
|
-
"@thi.ng/errors": "^2.6.
|
|
46
|
-
"@thi.ng/hex": "^2.4.
|
|
47
|
-
"@thi.ng/random": "^4.1.
|
|
48
|
-
"@thi.ng/strings": "^3.
|
|
49
|
-
"@thi.ng/transducers": "^9.6.
|
|
43
|
+
"@thi.ng/binary": "^3.6.7",
|
|
44
|
+
"@thi.ng/compose": "^3.0.55",
|
|
45
|
+
"@thi.ng/errors": "^2.6.7",
|
|
46
|
+
"@thi.ng/hex": "^2.4.10",
|
|
47
|
+
"@thi.ng/random": "^4.1.43",
|
|
48
|
+
"@thi.ng/strings": "^3.12.0",
|
|
49
|
+
"@thi.ng/transducers": "^9.6.31"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"esbuild": "^0.27.2",
|
|
@@ -117,5 +117,5 @@
|
|
|
117
117
|
],
|
|
118
118
|
"year": 2018
|
|
119
119
|
},
|
|
120
|
-
"gitHead": "
|
|
120
|
+
"gitHead": "929fb6590178a41cbb77cbb87e07c59c61381607\n"
|
|
121
121
|
}
|