compress

package
v1.25.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

README

compress

form: https://github.com/artdarek/go-unzip

Wrapper for Zip and 7zip decompression.

Example

package main

import (
	"fmt"

	"github.com/ulib/fsutil/compress"
)

func main() {
	u := compress.NewSevenZip()

	files, err := u.Extract("./data/file.7z", "./data/directory")
	if err != nil {
		panic(err)
	}

	fmt.Printf("extracted files count: %d \n", len(files))
	fmt.Printf("files list: %v \n", files)
}

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrTargetType error = &err.Err{Op: "ulib.fsutil.compress", Err: "The target directory type is file"}

Functions

func ExtractAndWriteFile added in v1.20.0

func ExtractAndWriteFile(destination string, f *zip.File) error

Extract files

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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