iocopy

package
v0.16.1 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package iocopy is a wrapper around io.Copy() that recycles shared buffers.

Index

Constants

View Source
const BufSize = 65536

BufSize is the size (in bytes) of the shared copy buffers Kopia uses to copy data.

Variables

This section is empty.

Functions

func Copy

func Copy(dst io.Writer, src io.Reader) (int64, error)

Copy is equivalent to io.Copy().

func GetBuffer added in v0.9.0

func GetBuffer() []byte

GetBuffer allocates new temporary buffer suitable for copying data.

func JustCopy added in v0.9.0

func JustCopy(dst io.Writer, src io.Reader) error

JustCopy is just like Copy() but does not return the number of bytes.

func ReleaseBuffer added in v0.9.0

func ReleaseBuffer(b []byte)

ReleaseBuffer releases the buffer back to the pool.

Types

This section is empty.

Jump to

Keyboard shortcuts

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