Skip to main content
Module

x/sshutil/deps.ts

🧰 SSH utilities
Latest
import * as sshutil from "https://deno.land/x/sshutil@v0.0.0/deps.ts";

Classes

A variable-sized buffer of bytes with read() and write() methods.

BufReader implements buffering for a Reader object.

BufWriter implements buffering for an deno.Writer object. If an error occurs writing to a Writer, no more data will be accepted and all subsequent writes, and flush(), will return the error. After all data has been written, the client should call the flush() method to guarantee all data has been forwarded to the underlying deno.Writer.

BufWriterSync implements buffering for a deno.WriterSync object. If an error occurs writing to a WriterSync, no more data will be accepted and all subsequent writes, and flush(), will return the error. After all data has been written, the client should call the flush() method to guarantee all data has been forwarded to the underlying deno.WriterSync.

A LimitedReader reads from reader but limits the amount of data returned to just limit bytes. Each call to read updates limit to reflect the new amount remaining. read returns null when limit <= 0 or when the underlying reader returns null.

Reader utility for combining multiple readers

Reader utility for strings

Writer utility for buffering string chunks

Transform a stream into a stream where each chunk is divided by a given delimiter.

Transform a stream into a stream where each chunk is divided by a newline, be it \n or \r\n.

Functions

Copy N size at the most. If read size is lesser than N, then returns nread

Read delimited bytes from a Reader.

Read big endian 32bit integer from BufReader

Read strings line-by-line from a Reader.

Read big endian 64bit long from BufReader

Read big endian 16bit short from BufReader

Read delimited strings from a Reader.

Slice number into 64bit big endian byte array

Copies from src to dst until either EOF (null) is read from src or an error occurs. It resolves to the number of bytes copied or rejects with the first error encountered while copying.

Turns a Reader, r, into an async iterator.

Turns a ReaderSync, r, into an iterator.

Merge multiple streams into a single one, not taking order into account. If a stream ends before other ones, the other will continue adding data, and the finished one will not add any more data.

Create a ReadableStream from any kind of iterable.

Create a ReadableStream<Uint8Array> from from a Deno.Reader.

Read Reader r until EOF (null) and resolve to the content as Uint8Array`.

Synchronously reads Reader r until EOF (null) and returns the content as Uint8Array.

Create a Deno.Reader from an iterable of Uint8Arrays.

Create a Reader from a ReadableStreamDefaultReader.

Create a WritableStream from a Writer.

Write all the content of the array buffer (arr) to the writer (w).

Synchronously write all the content of the array buffer (arr) to the writer (w).

Create a Writer from a WritableStreamDefaultWriter.

Merge multiple streams into a single one, taking order into account, and each stream will wait for a chunk to enqueue before the next stream can append another chunk. If a stream ends before other ones, the other will continue adding data in order, and the finished one will not add any more data.