zipcheck

package
v0.0.0-...-4655df8 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnalyzeFile

func AnalyzeFile(fname string) (float64, error)

AnalyzeFile will compress a sample of if the file and return estimated reduction percentage. 0 means no reduction, 50% means file might be resuduced to half.

func SampleFile

func SampleFile(w io.Writer, fp io.ReaderAt, count int, blockSize int64, step int64) (int64, error)

SampleFile reads count blocks of blockSize from fp, and copies them to w.

Types

type CompressResult

type CompressResult struct {
	T        time.Duration
	Samples  int
	Size     int64
	Bytes    int64
	ZipBytes int64
}

CompressResult returns resuls of comressibility check.

type Null

type Null struct {
	Bytes int64
}

Null is a /dev/null Writer that counts how many bytes have been written to it.

func (*Null) Write

func (n *Null) Write(b []byte) (int, error)

Jump to

Keyboard shortcuts

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