readerat

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package readerat adapts seekable streams to random-access readers for converters whose underlying formats (zip, pdf) need io.ReaderAt.

Index

Constants

This section is empty.

Variables

View Source
var ErrTooLarge = errors.New("readerat: stream exceeds size limit")

ErrTooLarge is returned by FromLimit when the stream exceeds its limit.

Functions

func From

func From(rs io.ReadSeeker) (io.ReaderAt, int64, error)

From returns rs as an io.ReaderAt plus its size, buffering into memory only when the concrete type doesn't already support ReadAt.

func FromLimit added in v0.2.0

func FromLimit(rs io.ReadSeeker, maxSize int64) (io.ReaderAt, int64, error)

FromLimit is like From but returns ErrTooLarge before buffering when the seekable stream exceeds maxSize. maxSize must be positive.

Types

This section is empty.

Jump to

Keyboard shortcuts

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