blockbuf

package
v1.15.21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 15, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package blockbuf implements a functionality similar to "mbuffer". This is useful for writing to tape drives that require large block sizes and continuous writes (without breaks).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Copy

func Copy(dst io.Writer, src io.Reader, n, bs, hwm int) error

Copy will copy from src to dst but ensures that writes are always of block size (bs) except for possibly the last write. Writes are not attempted until the high water mark (hwm) number of blocks are first read. At which point the buffer is written until empty. Then it waits until the high water mark is achieved again. The maximum buffer size is `n` blocks.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL