compress

package
v0.0.14-1 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 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.zip", "./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

This section is empty.

Functions

func NewSevenZip

func NewSevenZip() *sevenZip

Types

type Zip

type Zip struct{}

func NewZip

func NewZip() *Zip

func (Zip) Extract

func (uz Zip) Extract(source, destination string) ([]string, error)

Jump to

Keyboard shortcuts

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