zip

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package zip provides a reader that propagate calls to Close.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OpenReader

func OpenReader(name string) (*zip.ReadCloser, error)

OpenReader will open the Zip file specified by name and return a ReadCloser.

func ReadBytes

func ReadBytes(b []byte) (io.ReadCloser, error)

ReadBytes returns a reader for reading zip-compressed bytes from an input slice. b is the input slice of compressed bytes.

func ReadFile

func ReadFile(path string) (io.ReadCloser, error)

ReadFile returns a Reader for reading bytes from a zip-compressed file.

Types

type Reader

type Reader struct {
	*zip.Reader
	// contains filtered or unexported fields
}

func NewReader

func NewReader(r io.ReaderAt, size int64) (*Reader, error)

NewReader returns a new Reader reading from r, which is assumed to have the given size in bytes.

func (*Reader) Close

func (r *Reader) Close() error

Close closes the Zip file, rendering it unusable for I/O.

Jump to

Keyboard shortcuts

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