@yume-chan/stream-extra 0.0.18 → 0.0.20
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/CHANGELOG.json +27 -0
- package/CHANGELOG.md +16 -1
- package/README.md +1 -1
- package/esm/buffered-transform.d.ts +10 -10
- package/esm/buffered-transform.d.ts.map +1 -1
- package/esm/buffered-transform.js +56 -55
- package/esm/buffered-transform.js.map +1 -1
- package/esm/buffered.d.ts +24 -27
- package/esm/buffered.d.ts.map +1 -1
- package/esm/buffered.js +132 -123
- package/esm/buffered.js.map +1 -1
- package/esm/consumable.d.ts +52 -0
- package/esm/consumable.d.ts.map +1 -0
- package/esm/consumable.js +178 -0
- package/esm/consumable.js.map +1 -0
- package/esm/decode-utf8.d.ts +4 -4
- package/esm/decode-utf8.js +11 -11
- package/esm/distribution.d.ts +21 -0
- package/esm/distribution.d.ts.map +1 -0
- package/esm/distribution.js +99 -0
- package/esm/distribution.js.map +1 -0
- package/esm/duplex.d.ts +44 -47
- package/esm/duplex.d.ts.map +1 -1
- package/esm/duplex.js +92 -92
- package/esm/duplex.js.map +1 -1
- package/esm/gather-string.d.ts +6 -6
- package/esm/gather-string.d.ts.map +1 -1
- package/esm/gather-string.js +15 -13
- package/esm/gather-string.js.map +1 -1
- package/esm/index.d.ts +16 -15
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +16 -15
- package/esm/index.js.map +1 -1
- package/esm/inspect.d.ts +4 -4
- package/esm/inspect.js +11 -11
- package/esm/pipe-from.d.ts +12 -11
- package/esm/pipe-from.d.ts.map +1 -1
- package/esm/pipe-from.js +23 -25
- package/esm/pipe-from.js.map +1 -1
- package/esm/push-readable.d.ts +19 -18
- package/esm/push-readable.d.ts.map +1 -1
- package/esm/push-readable.js +66 -61
- package/esm/push-readable.js.map +1 -1
- package/esm/split-string.d.ts +4 -4
- package/esm/split-string.d.ts.map +1 -1
- package/esm/split-string.js +24 -24
- package/esm/split-string.js.map +1 -1
- package/esm/stream.d.ts +25 -24
- package/esm/stream.d.ts.map +1 -1
- package/esm/stream.js +26 -26
- package/esm/stream.js.map +1 -1
- package/esm/struct-deserialize.d.ts +6 -6
- package/esm/struct-deserialize.d.ts.map +1 -1
- package/esm/struct-deserialize.js +8 -8
- package/esm/struct-serialize.d.ts +5 -5
- package/esm/struct-serialize.js +10 -10
- package/esm/wrap-readable.d.ts +21 -20
- package/esm/wrap-readable.d.ts.map +1 -1
- package/esm/wrap-readable.js +56 -56
- package/esm/wrap-readable.js.map +1 -1
- package/esm/wrap-writable.d.ts +14 -12
- package/esm/wrap-writable.d.ts.map +1 -1
- package/esm/wrap-writable.js +62 -52
- package/esm/wrap-writable.js.map +1 -1
- package/package.json +9 -8
- package/src/buffered-transform.ts +15 -22
- package/src/buffered.ts +41 -33
- package/src/consumable.ts +281 -0
- package/src/distribution.ts +113 -0
- package/src/duplex.ts +35 -34
- package/src/gather-string.ts +6 -4
- package/src/index.ts +16 -15
- package/src/inspect.ts +1 -1
- package/src/pipe-from.ts +8 -6
- package/src/push-readable.ts +12 -12
- package/src/split-string.ts +5 -2
- package/src/stream.ts +1 -1
- package/src/struct-deserialize.ts +1 -1
- package/src/wrap-readable.ts +9 -9
- package/src/wrap-writable.ts +21 -9
- package/tsconfig.build.json +6 -1
- package/tsconfig.build.tsbuildinfo +1 -1
- package/esm/chunk.d.ts +0 -5
- package/esm/chunk.d.ts.map +0 -1
- package/esm/chunk.js +0 -15
- package/esm/chunk.js.map +0 -1
- package/esm/trace.d.ts +0 -16
- package/esm/trace.d.ts.map +0 -1
- package/esm/trace.js +0 -131
- package/esm/trace.js.map +0 -1
- package/src/chunk.ts +0 -15
package/CHANGELOG.json
CHANGED
|
@@ -1,6 +1,33 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yume-chan/stream-extra",
|
|
3
3
|
"entries": [
|
|
4
|
+
{
|
|
5
|
+
"version": "0.0.20",
|
|
6
|
+
"tag": "@yume-chan/stream-extra_v0.0.20",
|
|
7
|
+
"date": "Mon, 05 Jun 2023 02:51:41 GMT",
|
|
8
|
+
"comments": {
|
|
9
|
+
"none": [
|
|
10
|
+
{
|
|
11
|
+
"comment": "Fix a bug where `BufferedReadableStream#release` might output duplicate data."
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"comment": "Use ECMAScript private class fields syntax (supported by Chrome 74, Firefox 90, Safari 14.1 and Node.js 12.0.0)."
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"version": "0.0.19",
|
|
21
|
+
"tag": "@yume-chan/stream-extra_v0.0.19",
|
|
22
|
+
"date": "Sun, 09 Apr 2023 05:55:33 GMT",
|
|
23
|
+
"comments": {
|
|
24
|
+
"none": [
|
|
25
|
+
{
|
|
26
|
+
"comment": "Add an option to combine small chunks into target size in `ChunkStream`, and rename it to `DistributionStream`"
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
},
|
|
4
31
|
{
|
|
5
32
|
"version": "0.0.18",
|
|
6
33
|
"tag": "@yume-chan/stream-extra_v0.0.18",
|
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,21 @@
|
|
|
1
1
|
# Change Log - @yume-chan/stream-extra
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Mon, 05 Jun 2023 02:51:41 GMT and should not be manually modified.
|
|
4
|
+
|
|
5
|
+
## 0.0.20
|
|
6
|
+
Mon, 05 Jun 2023 02:51:41 GMT
|
|
7
|
+
|
|
8
|
+
### Updates
|
|
9
|
+
|
|
10
|
+
- Fix a bug where `BufferedReadableStream#release` might output duplicate data.
|
|
11
|
+
- Use ECMAScript private class fields syntax (supported by Chrome 74, Firefox 90, Safari 14.1 and Node.js 12.0.0).
|
|
12
|
+
|
|
13
|
+
## 0.0.19
|
|
14
|
+
Sun, 09 Apr 2023 05:55:33 GMT
|
|
15
|
+
|
|
16
|
+
### Updates
|
|
17
|
+
|
|
18
|
+
- Add an option to combine small chunks into target size in `ChunkStream`, and rename it to `DistributionStream`
|
|
4
19
|
|
|
5
20
|
## 0.0.18
|
|
6
21
|
Wed, 25 Jan 2023 21:33:49 GMT
|
package/README.md
CHANGED
|
@@ -40,4 +40,4 @@ web-streams-polyfill package's `ReadableStream#pipeTo` only uses public methods,
|
|
|
40
40
|
|
|
41
41
|
Allowing reading specified amount of data by buffering incoming data.
|
|
42
42
|
|
|
43
|
-
It's not a Web
|
|
43
|
+
It's not a Web Streams API `ReadableStream`, because `ReadableStream` doesn't allow hinting the desired read size (except using BYOB readable, but causes extra allocations for small reads).
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { BufferedReadableStream } from "./buffered.js";
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
get writable(): WritableStream<Uint8Array>;
|
|
9
|
-
constructor(transform: (stream: BufferedReadableStream) => ValueOrPromise<T>);
|
|
10
|
-
}
|
|
1
|
+
import type { ValueOrPromise } from "@yume-chan/struct";
|
|
2
|
+
import { BufferedReadableStream } from "./buffered.js";
|
|
3
|
+
import type { ReadableWritablePair } from "./stream.js";
|
|
4
|
+
import { ReadableStream, WritableStream } from "./stream.js";
|
|
5
|
+
export declare class BufferedTransformStream<T> implements ReadableWritablePair<T, Uint8Array> {
|
|
6
|
+
#private;
|
|
7
|
+
get readable(): ReadableStream<T>;
|
|
8
|
+
get writable(): WritableStream<Uint8Array>;
|
|
9
|
+
constructor(transform: (stream: BufferedReadableStream) => ValueOrPromise<T>);
|
|
10
|
+
}
|
|
11
11
|
//# sourceMappingURL=buffered-transform.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buffered-transform.d.ts","sourceRoot":"","sources":["../src/buffered-transform.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"buffered-transform.d.ts","sourceRoot":"","sources":["../src/buffered-transform.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAGxD,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAGvD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAG7D,qBAAa,uBAAuB,CAAC,CAAC,CAClC,YAAW,oBAAoB,CAAC,CAAC,EAAE,UAAU,CAAC;;IAG9C,IAAW,QAAQ,sBAElB;IAGD,IAAW,QAAQ,+BAElB;gBAGG,SAAS,EAAE,CAAC,MAAM,EAAE,sBAAsB,KAAK,cAAc,CAAC,CAAC,CAAC;CA8CvE"}
|
|
@@ -1,56 +1,57 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
//
|
|
29
|
-
//
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
//
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}
|
|
1
|
+
import { StructEmptyError } from "@yume-chan/struct";
|
|
2
|
+
import { BufferedReadableStream } from "./buffered.js";
|
|
3
|
+
import { PushReadableStream } from "./push-readable.js";
|
|
4
|
+
import { ReadableStream, WritableStream } from "./stream.js";
|
|
5
|
+
// TODO: BufferedTransformStream: find better implementation
|
|
6
|
+
export class BufferedTransformStream {
|
|
7
|
+
#readable;
|
|
8
|
+
get readable() {
|
|
9
|
+
return this.#readable;
|
|
10
|
+
}
|
|
11
|
+
#writable;
|
|
12
|
+
get writable() {
|
|
13
|
+
return this.#writable;
|
|
14
|
+
}
|
|
15
|
+
constructor(transform) {
|
|
16
|
+
// Convert incoming chunks to a `BufferedReadableStream`
|
|
17
|
+
let sourceStreamController;
|
|
18
|
+
const buffered = new BufferedReadableStream(new PushReadableStream((controller) => {
|
|
19
|
+
sourceStreamController = controller;
|
|
20
|
+
}));
|
|
21
|
+
this.#readable = new ReadableStream({
|
|
22
|
+
async pull(controller) {
|
|
23
|
+
try {
|
|
24
|
+
const value = await transform(buffered);
|
|
25
|
+
controller.enqueue(value);
|
|
26
|
+
}
|
|
27
|
+
catch (e) {
|
|
28
|
+
// Treat `StructEmptyError` as a normal end.
|
|
29
|
+
// If the `transform` method doesn't have enough data to return a value,
|
|
30
|
+
// it should throw another error to indicate that.
|
|
31
|
+
if (e instanceof StructEmptyError) {
|
|
32
|
+
controller.close();
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
throw e;
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
cancel: (reason) => {
|
|
39
|
+
// Propagate cancel to the source stream
|
|
40
|
+
// So future writes will be rejected
|
|
41
|
+
return buffered.cancel(reason);
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
this.#writable = new WritableStream({
|
|
45
|
+
async write(chunk) {
|
|
46
|
+
await sourceStreamController.enqueue(chunk);
|
|
47
|
+
},
|
|
48
|
+
abort() {
|
|
49
|
+
sourceStreamController.close();
|
|
50
|
+
},
|
|
51
|
+
close() {
|
|
52
|
+
sourceStreamController.close();
|
|
53
|
+
},
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
}
|
|
56
57
|
//# sourceMappingURL=buffered-transform.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buffered-transform.js","sourceRoot":"","sources":["../src/buffered-transform.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"buffered-transform.js","sourceRoot":"","sources":["../src/buffered-transform.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAErD,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAEvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAExD,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7D,4DAA4D;AAC5D,MAAM,OAAO,uBAAuB;IAGhC,SAAS,CAAoB;IAC7B,IAAW,QAAQ;QACf,OAAO,IAAI,CAAC,SAAS,CAAC;IAC1B,CAAC;IAED,SAAS,CAA6B;IACtC,IAAW,QAAQ;QACf,OAAO,IAAI,CAAC,SAAS,CAAC;IAC1B,CAAC;IAED,YACI,SAAgE;QAEhE,wDAAwD;QACxD,IAAI,sBAAiE,CAAC;QAEtE,MAAM,QAAQ,GAAG,IAAI,sBAAsB,CACvC,IAAI,kBAAkB,CAAa,CAAC,UAAU,EAAE,EAAE;YAC9C,sBAAsB,GAAG,UAAU,CAAC;QACxC,CAAC,CAAC,CACL,CAAC;QAEF,IAAI,CAAC,SAAS,GAAG,IAAI,cAAc,CAAI;YACnC,KAAK,CAAC,IAAI,CAAC,UAAU;gBACjB,IAAI;oBACA,MAAM,KAAK,GAAG,MAAM,SAAS,CAAC,QAAQ,CAAC,CAAC;oBACxC,UAAU,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;iBAC7B;gBAAC,OAAO,CAAC,EAAE;oBACR,4CAA4C;oBAC5C,wEAAwE;oBACxE,kDAAkD;oBAClD,IAAI,CAAC,YAAY,gBAAgB,EAAE;wBAC/B,UAAU,CAAC,KAAK,EAAE,CAAC;wBACnB,OAAO;qBACV;oBACD,MAAM,CAAC,CAAC;iBACX;YACL,CAAC;YACD,MAAM,EAAE,CAAC,MAAM,EAAE,EAAE;gBACf,wCAAwC;gBACxC,oCAAoC;gBACpC,OAAO,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;YACnC,CAAC;SACJ,CAAC,CAAC;QAEH,IAAI,CAAC,SAAS,GAAG,IAAI,cAAc,CAAC;YAChC,KAAK,CAAC,KAAK,CAAC,KAAK;gBACb,MAAM,sBAAsB,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;YAChD,CAAC;YACD,KAAK;gBACD,sBAAsB,CAAC,KAAK,EAAE,CAAC;YACnC,CAAC;YACD,KAAK;gBACD,sBAAsB,CAAC,KAAK,EAAE,CAAC;YACnC,CAAC;SACJ,CAAC,CAAC;IACP,CAAC;CACJ"}
|
package/esm/buffered.d.ts
CHANGED
|
@@ -1,28 +1,25 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
release(): ReadableStream<Uint8Array>;
|
|
26
|
-
cancel(reason?: unknown): Promise<void>;
|
|
27
|
-
}
|
|
1
|
+
import type { AsyncExactReadable } from "@yume-chan/struct";
|
|
2
|
+
import type { ReadableStream, ReadableStreamDefaultReader } from "./stream.js";
|
|
3
|
+
export declare class BufferedReadableStream implements AsyncExactReadable {
|
|
4
|
+
#private;
|
|
5
|
+
get position(): number;
|
|
6
|
+
protected readonly stream: ReadableStream<Uint8Array>;
|
|
7
|
+
protected readonly reader: ReadableStreamDefaultReader<Uint8Array>;
|
|
8
|
+
constructor(stream: ReadableStream<Uint8Array>);
|
|
9
|
+
private readSource;
|
|
10
|
+
private readAsync;
|
|
11
|
+
/**
|
|
12
|
+
*
|
|
13
|
+
* @param length
|
|
14
|
+
* @returns
|
|
15
|
+
*/
|
|
16
|
+
readExactly(length: number): Uint8Array | Promise<Uint8Array>;
|
|
17
|
+
/**
|
|
18
|
+
* Return a readable stream with unconsumed data (if any) and
|
|
19
|
+
* all data from the wrapped stream.
|
|
20
|
+
* @returns A `ReadableStream`
|
|
21
|
+
*/
|
|
22
|
+
release(): ReadableStream<Uint8Array>;
|
|
23
|
+
cancel(reason?: unknown): Promise<void>;
|
|
24
|
+
}
|
|
28
25
|
//# sourceMappingURL=buffered.d.ts.map
|
package/esm/buffered.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buffered.d.ts","sourceRoot":"","sources":["../src/buffered.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"buffered.d.ts","sourceRoot":"","sources":["../src/buffered.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAI5D,OAAO,KAAK,EAAE,cAAc,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAC;AAM/E,qBAAa,sBAAuB,YAAW,kBAAkB;;IAM7D,IAAW,QAAQ,WAElB;IAED,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC,UAAU,CAAC,CAAC;IACtD,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,2BAA2B,CAAC,UAAU,CAAC,CAAC;gBAEhD,MAAM,EAAE,cAAc,CAAC,UAAU,CAAC;YAKvC,UAAU;YASV,SAAS;IAmDvB;;;;OAIG;IACI,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;IAsBpE;;;;OAIG;IACI,OAAO,IAAI,cAAc,CAAC,UAAU,CAAC;IA6BrC,MAAM,CAAC,MAAM,CAAC,EAAE,OAAO;CAGjC"}
|
package/esm/buffered.js
CHANGED
|
@@ -1,124 +1,133 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
this.
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
this
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
this
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
*
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
1
|
+
import { ExactReadableEndedError } from "@yume-chan/struct";
|
|
2
|
+
import { PushReadableStream } from "./push-readable.js";
|
|
3
|
+
const NOOP = () => {
|
|
4
|
+
// no-op
|
|
5
|
+
};
|
|
6
|
+
export class BufferedReadableStream {
|
|
7
|
+
#buffered;
|
|
8
|
+
#bufferedOffset = 0;
|
|
9
|
+
#bufferedLength = 0;
|
|
10
|
+
#position = 0;
|
|
11
|
+
get position() {
|
|
12
|
+
return this.#position;
|
|
13
|
+
}
|
|
14
|
+
stream;
|
|
15
|
+
reader;
|
|
16
|
+
constructor(stream) {
|
|
17
|
+
this.stream = stream;
|
|
18
|
+
this.reader = stream.getReader();
|
|
19
|
+
}
|
|
20
|
+
async readSource() {
|
|
21
|
+
const { done, value } = await this.reader.read();
|
|
22
|
+
if (done) {
|
|
23
|
+
throw new ExactReadableEndedError();
|
|
24
|
+
}
|
|
25
|
+
this.#position += value.byteLength;
|
|
26
|
+
return value;
|
|
27
|
+
}
|
|
28
|
+
async readAsync(length, initial) {
|
|
29
|
+
let result;
|
|
30
|
+
let index;
|
|
31
|
+
if (initial) {
|
|
32
|
+
result = new Uint8Array(length);
|
|
33
|
+
result.set(initial);
|
|
34
|
+
index = initial.byteLength;
|
|
35
|
+
length -= initial.byteLength;
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
const array = await this.readSource();
|
|
39
|
+
if (array.byteLength === length) {
|
|
40
|
+
return array;
|
|
41
|
+
}
|
|
42
|
+
if (array.byteLength > length) {
|
|
43
|
+
this.#buffered = array;
|
|
44
|
+
this.#bufferedOffset = length;
|
|
45
|
+
this.#bufferedLength = array.byteLength - length;
|
|
46
|
+
return array.subarray(0, length);
|
|
47
|
+
}
|
|
48
|
+
result = new Uint8Array(length);
|
|
49
|
+
result.set(array);
|
|
50
|
+
index = array.byteLength;
|
|
51
|
+
length -= array.byteLength;
|
|
52
|
+
}
|
|
53
|
+
while (length > 0) {
|
|
54
|
+
const array = await this.readSource();
|
|
55
|
+
if (array.byteLength === length) {
|
|
56
|
+
result.set(array, index);
|
|
57
|
+
return result;
|
|
58
|
+
}
|
|
59
|
+
if (array.byteLength > length) {
|
|
60
|
+
this.#buffered = array;
|
|
61
|
+
this.#bufferedOffset = length;
|
|
62
|
+
this.#bufferedLength = array.byteLength - length;
|
|
63
|
+
result.set(array.subarray(0, length), index);
|
|
64
|
+
return result;
|
|
65
|
+
}
|
|
66
|
+
result.set(array, index);
|
|
67
|
+
index += array.byteLength;
|
|
68
|
+
length -= array.byteLength;
|
|
69
|
+
}
|
|
70
|
+
return result;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
*
|
|
74
|
+
* @param length
|
|
75
|
+
* @returns
|
|
76
|
+
*/
|
|
77
|
+
readExactly(length) {
|
|
78
|
+
// PERF: Add a synchronous path for reading from internal buffer
|
|
79
|
+
if (this.#buffered) {
|
|
80
|
+
const array = this.#buffered;
|
|
81
|
+
const offset = this.#bufferedOffset;
|
|
82
|
+
if (this.#bufferedLength > length) {
|
|
83
|
+
// PERF: `subarray` is slow
|
|
84
|
+
// don't use it until absolutely necessary
|
|
85
|
+
this.#bufferedOffset += length;
|
|
86
|
+
this.#bufferedLength -= length;
|
|
87
|
+
return array.subarray(offset, offset + length);
|
|
88
|
+
}
|
|
89
|
+
this.#buffered = undefined;
|
|
90
|
+
this.#bufferedLength = 0;
|
|
91
|
+
this.#bufferedOffset = 0;
|
|
92
|
+
return this.readAsync(length, array.subarray(offset));
|
|
93
|
+
}
|
|
94
|
+
return this.readAsync(length);
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Return a readable stream with unconsumed data (if any) and
|
|
98
|
+
* all data from the wrapped stream.
|
|
99
|
+
* @returns A `ReadableStream`
|
|
100
|
+
*/
|
|
101
|
+
release() {
|
|
102
|
+
if (this.#bufferedLength > 0) {
|
|
103
|
+
return new PushReadableStream(async (controller) => {
|
|
104
|
+
// Put the remaining data back to the stream
|
|
105
|
+
const buffered = this.#buffered.subarray(this.#bufferedOffset);
|
|
106
|
+
await controller.enqueue(buffered);
|
|
107
|
+
controller.abortSignal.addEventListener("abort", () => {
|
|
108
|
+
// NOOP: the reader might already be released
|
|
109
|
+
this.reader.cancel().catch(NOOP);
|
|
110
|
+
});
|
|
111
|
+
// Manually pipe the stream
|
|
112
|
+
while (true) {
|
|
113
|
+
const { done, value } = await this.reader.read();
|
|
114
|
+
if (done) {
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
else {
|
|
118
|
+
await controller.enqueue(value);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
else {
|
|
124
|
+
// Simply release the reader and return the stream
|
|
125
|
+
this.reader.releaseLock();
|
|
126
|
+
return this.stream;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
cancel(reason) {
|
|
130
|
+
return this.reader.cancel(reason);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
124
133
|
//# sourceMappingURL=buffered.js.map
|
package/esm/buffered.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buffered.js","sourceRoot":"","sources":["../src/buffered.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"buffered.js","sourceRoot":"","sources":["../src/buffered.ts"],"names":[],"m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M,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;gBACrC,CAAC,CAAC,CAAC;gBAEH,2BAA2B;gBAC3B,OAAO,IAAI,EAAE;oBACT,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;oBACjD,IAAI,IAAI,EAAE;wBACN,OAAO;qBACV;yBAAM;wBACH,MAAM,UAAU,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;qBACnC;iBACJ;YACL,CAAC,CAAC,CAAC;SACN;aAAM;YACH,kDAAkD;YAClD,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC;YAC1B,OAAO,IAAI,CAAC,MAAM,CAAC;SACtB;IACL,CAAC;IAEM,MAAM,CAAC,MAAgB;QAC1B,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACtC,CAAC;CACJ"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { QueuingStrategy, WritableStreamDefaultWriter } from "./stream.js";
|
|
2
|
+
import { ReadableStream, TransformStream, WritableStream } from "./stream.js";
|
|
3
|
+
export declare class Consumable<T> {
|
|
4
|
+
#private;
|
|
5
|
+
readonly value: T;
|
|
6
|
+
readonly consumed: Promise<void>;
|
|
7
|
+
constructor(value: T);
|
|
8
|
+
consume(): void;
|
|
9
|
+
error(error: any): void;
|
|
10
|
+
tryConsume<U>(callback: (value: T) => U): Promise<U>;
|
|
11
|
+
}
|
|
12
|
+
export declare class WrapConsumableStream<T> extends TransformStream<T, Consumable<T>> {
|
|
13
|
+
constructor();
|
|
14
|
+
}
|
|
15
|
+
export declare class UnwrapConsumableStream<T> extends TransformStream<Consumable<T>, T> {
|
|
16
|
+
constructor();
|
|
17
|
+
}
|
|
18
|
+
export interface ConsumableReadableStreamController<T> {
|
|
19
|
+
enqueue(chunk: T): Promise<void>;
|
|
20
|
+
close(): void;
|
|
21
|
+
error(reason: any): void;
|
|
22
|
+
}
|
|
23
|
+
export interface ConsumableReadableStreamSource<T> {
|
|
24
|
+
start?(controller: ConsumableReadableStreamController<T>): void | PromiseLike<void>;
|
|
25
|
+
pull?(controller: ConsumableReadableStreamController<T>): void | PromiseLike<void>;
|
|
26
|
+
cancel?(reason: any): void | PromiseLike<void>;
|
|
27
|
+
}
|
|
28
|
+
export declare class ConsumableReadableStream<T> extends ReadableStream<Consumable<T>> {
|
|
29
|
+
constructor(source: ConsumableReadableStreamSource<T>, strategy?: QueuingStrategy<T>);
|
|
30
|
+
}
|
|
31
|
+
export interface ConsumableWritableStreamSink<T> {
|
|
32
|
+
start?(): void | PromiseLike<void>;
|
|
33
|
+
write?(chunk: T): void | PromiseLike<void>;
|
|
34
|
+
abort?(reason: any): void | PromiseLike<void>;
|
|
35
|
+
close?(): void | PromiseLike<void>;
|
|
36
|
+
}
|
|
37
|
+
export declare class ConsumableWritableStream<T> extends WritableStream<Consumable<T>> {
|
|
38
|
+
static write<T>(writer: WritableStreamDefaultWriter<Consumable<T>>, value: T): Promise<void>;
|
|
39
|
+
constructor(sink: ConsumableWritableStreamSink<T>, strategy?: QueuingStrategy<T>);
|
|
40
|
+
}
|
|
41
|
+
export interface ConsumableTransformer<I, O> {
|
|
42
|
+
start?(controller: ConsumableReadableStreamController<O>): void | PromiseLike<void>;
|
|
43
|
+
transform?(chunk: I, controller: ConsumableReadableStreamController<O>): void | PromiseLike<void>;
|
|
44
|
+
flush?(controller: ConsumableReadableStreamController<O>): void | PromiseLike<void>;
|
|
45
|
+
}
|
|
46
|
+
export declare class ConsumableTransformStream<I, O> extends TransformStream<Consumable<I>, Consumable<O>> {
|
|
47
|
+
constructor(transformer: ConsumableTransformer<I, O>);
|
|
48
|
+
}
|
|
49
|
+
export declare class ConsumableInspectStream<T> extends TransformStream<Consumable<T>, Consumable<T>> {
|
|
50
|
+
constructor(callback: (value: T) => void);
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=consumable.d.ts.map
|
|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