# @types/stream-buffers

> TypeScript definitions for stream-buffers

Latest version **3.0.8** (published 2025-10-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/stream-buffers
pnpm add @types/stream-buffers
yarn add @types/stream-buffers
bun add @types/stream-buffers
```

## Health

**Score 65/100 (B)** — status: stable.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 3.0.8 |
| Published | 2025-10-24 |
| First published | 2017-03-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51434 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/stream-buffers
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/stream-buffers
- npm.io page: https://npm.io/package/@types/stream-buffers

## Dependencies (1)

- [@types/node](https://npm.io/package/@types/node.md) *

## Recent versions

- 3.0.8 (latest) — 2025-10-24
- 3.0.7 (ts4.9) — 2023-11-07
- 3.0.4 (ts3.7) — 2021-07-02
- 3.0.3 (ts3.0) — 2019-04-24
- 3.0.6 — 2023-10-18
- 3.0.5 — 2023-09-25
- 3.0.2 — 2017-03-30
- 3.0.1 — 2017-03-28
- 3.0.0 — 2017-03-08

## README

# Installation
> `npm install --save @types/stream-buffers`

# Summary
This package contains type definitions for stream-buffers (https://github.com/samcday/node-stream-buffer#readme).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/stream-buffers.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/stream-buffers/index.d.ts)
````ts
/// <reference types="node" />
import stream = require("stream");

export interface WritableStreamBufferOptions extends stream.WritableOptions {
    initialSize?: number | undefined;
    incrementAmount?: number | undefined;
}

export class WritableStreamBuffer extends stream.Writable {
    constructor(options?: WritableStreamBufferOptions);
    size(): number;
    maxSize(): number;
    getContents(length?: number): Buffer | false;
    getContentsAsString(encoding?: string, length?: number): string | false;
}

export interface ReadableStreamBufferOptions extends stream.ReadableOptions {
    frequency?: number | undefined;
    chunkSize?: number | undefined;
    initialSize?: number | undefined;
    incrementAmount?: number | undefined;
}

export class ReadableStreamBuffer extends stream.Readable {
    constructor(options?: ReadableStreamBufferOptions);
    put(data: string | Buffer, encoding?: string): void;
    stop(): void;
    size(): number;
    maxSize(): number;
}

export const DEFAULT_INITIAL_SIZE: number;
export const DEFAULT_INCREMENT_AMOUNT: number;
export const DEFAULT_FREQUENCY: number;
export const DEFAULT_CHUNK_SIZE: number;

````

### Additional Details
 * Last updated: Fri, 24 Oct 2025 04:02:41 GMT
 * Dependencies: [@types/node](https://npmjs.com/package/@types/node)

# Credits
These definitions were written by [Jason Dent](https://github.com/Jason3S).

---
_Source: https://npm.io/package/@types/stream-buffers · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
