rezip

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: GPL-3.0 Imports: 9 Imported by: 1

Documentation

Overview

Package rezip provides compression for files and directories to create zip archives using the universal Store and Deflate compression methods.

Index

Constants

This section is empty.

Variables

View Source
var ErrTest = errors.New("rezip test failed")

Functions

func Compress

func Compress(name, dest string) (int, error)

Compress compresses the named file into the dest zip file using the Deflate method. The total number of bytes written to the zip file is returned.

The dest must be a valid file path and should include the .zip extension. If the dest file already exists, an error is returned.

func CompressDir

func CompressDir(root, dest string) (int64, error)

CompressDir compresses the named root directory into the dest zip file using both the Deflate method. The total number of bytes written to the zip file is returned.

The dest must be a valid file path and should include the .zip extension. If the dest file already exists, an error is returned.

func Test

func Test(name string) error

Test runs the rezip test command on the named file. If the file is a directory or empty, an error is returned. If the test command fails, an error is returned.

Types

This section is empty.

Jump to

Keyboard shortcuts

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