Skip to content

EncodeStream

Defined in: packages/format-core/src/encode-stream.ts:15

Values in, encoded chunks out — the write-side counterpart of DecodeStream.

An Encoder may return several chunks for one value so a length-prefixed format can emit [header, payload] without copying; each is enqueued separately, leaving any coalescing to the sink that eventually writes them.

flush() does not call the encoder’s reset(): reset exists for a protocol mode switch mid-stream, not for end of input.

  • TransformStream<Out, View>

Out

View = Uint8Array

new EncodeStream<Out, View>(encoder): EncodeStream<Out, View>

Defined in: packages/format-core/src/encode-stream.ts:19

Encoder<Out, View>

EncodeStream<Out, View>

TransformStream< Out, View >.constructor

readonly readable: ReadableStream<View>

Defined in: node_modules/.store/@types-web-npm-0.0.361-9908d15a9c/package/index.d.ts:37861

The readable read-only property of the TransformStream interface returns the ReadableStream instance controlled by this TransformStream. This stream emits the transformed output data.

MDN Reference

TransformStream.readable


readonly writable: WritableStream<Out>

Defined in: node_modules/.store/@types-web-npm-0.0.361-9908d15a9c/package/index.d.ts:37867

The writable read-only property of the TransformStream interface returns the WritableStream instance controlled by this TransformStream. This stream accepts input data that will be transformed and emitted to the readable stream.

MDN Reference

TransformStream.writable