Skip to main content

@std/streams@0.215.0

latest
Works with
It is unknown whether this package works with Node.js, Deno, Browsers, Cloudflare Workers, Bun
It is unknown whether this package works with Node.js
It is unknown whether this package works with Deno
It is unknown whether this package works with Browsers
It is unknown whether this package works with Cloudflare Workers
It is unknown whether this package works with Bun
JSR Score70%
Published2 years ago (0.215.0)
class ByteSliceStream

A transform stream that only transforms from the zero-indexed start and end bytes (both inclusive).

Examples

Example 1

import { ByteSliceStream } from "@std/streams/byte_slice_stream";

const response = await fetch("https://example.com");
const rangedStream = response.body!
  .pipeThrough(new ByteSliceStream(3, 8));

Constructors

new ByteSliceStream(
start?,
end?: number
)

Constructs a new instance.

Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@std/streams

Import symbol

import { ByteSliceStream } from "@std/streams";
or

Import directly with a jsr specifier

import { ByteSliceStream } from "jsr:@std/streams";