Skip to content

h12w/go-zip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GO-ZIP

A wrapper around C library libzip. It tries to mimic standard library "archive/zip" but provides ability to modify existing ZIP archives.

libzip official site: http://www.nih.at/libzip/index.html

Quick Start

###Install libzip Please install the development version from the trunk, rather than current stable libzip 0.10.1 released on 2012-03-20. Otherwise, the writing will not function correctly. ####In Arch Linux packer -S libzip-hg ####In Others ...... ###Get the package

go get -u "github.com/hailiang/go-zip"

###Import the package

import "github.com/hailiang/go-zip"

###Open, read, modify, close

####Open

a, err := Open("a.zip")

####Read

for i := 0; i < a.Count(); i++ {
    file, err := a.File(i)
    // ......
}

####Modify

fw, err := a.Create("afile")
fw.Write("Hello world!")
fw.Close()

####Close

a.Close()

##Complete Documentation http://go.pkgdoc.org/github.com/hailiang/go-zip

About

A Go wrapper around C library libzip. It tries to mimic standard library "archive/zip" but provides ability to modify existing ZIP archives.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages