zopen

package module
v0.0.0-...-27ddacb Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2020 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Overview

zopen offers an io.ReadCloser that decompresses .gz files as it reads them, and passes through files that don't end in .gz.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OpenMany

func OpenMany(filenames []string) (<-chan string, error)

OpenMany will call Open on each of the filenames, and return a chan string that produces lines from those files. Lines from different files may be interleaved nondeterministically.

Types

type File

type File struct {
	io.ReadCloser
	// contains filtered or unexported fields
}

func Open

func Open(filename string) (*File, error)

Open acts exactly like os.Open when filename does not end in ".gz". When filename ends in ".gz", Open returns a File object that gives the uncompressed contents of the file.

func (*File) Close

func (f *File) Close() error

Jump to

Keyboard shortcuts

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